2002-05-04 19:18:33 +04:00
----------------------------------------------------------------------
Patch name: patch.fhs
Author: Robert Millan
2002-05-15 13:10:14 +04:00
Date: May, 16th 2002
2002-05-04 19:18:33 +04:00
Detailed description:
see patch [ 551811 ]
Location of some files on Bochs installation breaks the
Filesystem Hierrachy Standard, to be found at:
http://www.pathname.com/fhs/
It is important to comply with FHS because most
distributions require it in order to accept packages.
2002-06-26 21:08:55 +04:00
We have to change some more files to make them work with the new file
locations. (Volker)
2002-05-04 19:18:33 +04:00
Patch was created with:
diff -u
Apply patch to what version:
2002-05-15 13:10:14 +04:00
CVS as May, 16th 2002
2002-05-04 19:18:33 +04:00
Instructions:
To patch, go to main bochs directory.
2002-05-15 13:10:14 +04:00
Type "patch -p0 < THIS_PATCH_FILE".
2002-05-04 19:18:33 +04:00
----------------------------------------------------------------------
2002-05-15 13:10:14 +04:00
diff -u -r1.68 Makefile.in
--- Makefile.in 18 Apr 2002 00:22:18 -0000 1.68
+++ Makefile.in 15 May 2002 09:06:13 -0000
@@ -30,19 +30,21 @@
2002-05-04 19:18:33 +04:00
bindir = @bindir@
mandir = @mandir@
man1dir = $(mandir)/man1
+docdir = $(prefix)/share/doc/bochs
+sharedir = $(prefix)/share/bochs
DESTDIR =
VERSION=@VERSION@
VER_STRING=@VER_STRING@
REL_STRING=@REL_STRING@
-BOCHSDIR=$(prefix)/bochs
-VERSIONDIR=$(BOCHSDIR)/$(VERSION)
MAN_PAGE_LIST=bochs bochsrc bximage bochs-dlx
-INSTALL_LIST=bios/BIOS-* CHANGES COPYING README bios/VGABIOS* bochs bochsdbg bximage @INSTALL_LIST_FOR_PLATFORM@
+INSTALL_LIST_SHARE=bios/BIOS-* bios/VGABIOS* @INSTALL_LIST_FOR_PLATFORM@
+INSTALL_LIST_DOC=CHANGES COPYING README
2002-05-15 13:10:14 +04:00
+INSTALL_LIST_BIN=bochs bochsdbg bximage $(srcdir)/build/linux/bochs-docs
2002-05-04 19:18:33 +04:00
+INSTALL_LIST=$(INSTALL_LIST_SHARE) $(INSTALL_LIST_DOC) $(INSTALL_LIST_BIN)
INSTALL_LIST_X11=install-x11-fonts test-x11-fonts
INSTALL_LIST_SED=DOC-linux.html
2002-05-15 13:10:14 +04:00
-BOCHS_SCRIPTS=bochs-docs
CP=cp
CAT=cat
RM=rm
@@ -58,7 +60,7 @@
2002-05-04 19:18:33 +04:00
RMDIR=rmdir
TAR=tar
CHMOD=chmod
-GZIP=gzip
+GZIP=gzip -9
GUNZIP=gunzip
ZIP=zip
UNIX2DOS=unix2dos
2002-05-15 13:10:14 +04:00
@@ -287,35 +289,31 @@
2002-05-04 19:18:33 +04:00
# install target for unix
#####################################################################
-install_unix: install_bin install_man install_fonts unpack_dlx install_dlx
-
-install_fonts::
- -srcdir=$(srcdir) $(VERSIONDIR)/install-x11-fonts
+install_unix: install_bin install_man install_share install_doc
install_bin::
- -mkdir -p $(DESTDIR)$(BOCHSDIR)
- -mkdir -p $(DESTDIR)$(VERSIONDIR)
- -mkdir -p $(DESTDIR)$(bindir)
- test -d $(DESTDIR)$(VERSIONDIR)
- test -w $(DESTDIR)$(VERSIONDIR)
- for i in bochs-docs; do cp $(srcdir)/build/linux/$$i $(DESTDIR)$(bindir)/$$i; $(CHMOD) 755 $(DESTDIR)$(bindir)/$$i; done
- for i in $(INSTALL_LIST_SED); do cp $(srcdir)/build/linux/$$i $(DESTDIR)$(VERSIONDIR)/$$i; $(CHMOD) 644 $(DESTDIR)$(VERSIONDIR)/$$i; done
+ for i in $(DESTDIR)$(bindir); do mkdir -p $$i && test -d $$i && test -w $$i; done
$(CHMOD) a+x install-x11-fonts test-x11-fonts
- for i in $(INSTALL_LIST); do if test -f $$i; then cp $$i $(DESTDIR)$(VERSIONDIR); else cp $(srcdir)/$$i $(DESTDIR)$(VERSIONDIR); fi; done
- $(LN_S) $(VERSIONDIR)/bochs $(DESTDIR)$(bindir)/bochs
- $(LN_S) $(VERSIONDIR)/bximage $(DESTDIR)$(bindir)/bximage
- $(CP) -r $(srcdir)/docs-html $(DESTDIR)$(VERSIONDIR)
- $(CP) -r $(srcdir)/gui/keymaps $(DESTDIR)$(VERSIONDIR)
- $(RM) -f $(DESTDIR)$(VERSIONDIR)/README
- $(CAT) $(srcdir)/build/linux/README.linux-binary $(srcdir)/README > $(DESTDIR)$(VERSIONDIR)/README
- $(CP) $(srcdir)/font/vga.pcf $(DESTDIR)$(VERSIONDIR)
- $(CP) $(srcdir)/.bochsrc $(DESTDIR)$(VERSIONDIR)/bochsrc-sample.txt
- $(RM) -f $(DESTDIR)$(BOCHSDIR)/latest
- $(LN_S) $(VERSION) $(DESTDIR)$(BOCHSDIR)/latest
+ for i in $(INSTALL_LIST_BIN); do if test -f $$i; then cp $$i $(DESTDIR)$(bindir); else cp $(srcdir)/$$i $(DESTDIR)$(bindir); fi; done
+
+install_share::
+ for i in $(DESTDIR)$(sharedir); do mkdir -p $$i && test -d $$i && test -w $$i; done
+ for i in $(INSTALL_LIST_SHARE); do if test -f $$i; then cp $$i $(DESTDIR)$(sharedir); else cp $(srcdir)/$$i $(DESTDIR)$(sharedir); fi; done
+ $(CP) -r $(srcdir)/gui/keymaps $(DESTDIR)$(sharedir)
+ $(CP) $(srcdir)/font/vga.pcf $(DESTDIR)$(sharedir)/vga.pcf
+
+install_doc::
+ for i in $(DESTDIR)$(docdir); do mkdir -p $$i && test -d $$i && test -w $$i; done
+ for i in $(INSTALL_LIST_SED); do install -m644 $(srcdir)/build/linux/$$i $(DESTDIR)$(docdir)/$$i; done
+ for i in $(INSTALL_LIST_DOC); do if test -f $$i; then cp $$i $(DESTDIR)$(docdir); else cp $(srcdir)/$$i $(DESTDIR)$(docdir); fi; done
+ $(CP) -r $(srcdir)/docs-html $(DESTDIR)$(docdir)
+ $(RM) -f $(DESTDIR)$(docdir)/README
+ $(CAT) $(srcdir)/build/linux/README.linux-binary $(srcdir)/README > $(DESTDIR)$(docdir)/README
+ $(CP) $(srcdir)/.bochsrc $(DESTDIR)$(docdir)/bochsrc-sample.txt
install_man::
-mkdir -p $(DESTDIR)$(man1dir)
- for i in $(MAN_PAGE_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) -e 's/@VERSION@/$(VERSION)/g' > $(DESTDIR)$(man1dir)/$$i.1; chmod 644 $(DESTDIR)$(man1dir)/$$i.1; done
2002-05-15 13:10:14 +04:00
+ for i in $(MAN_PAGE_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) 's/@VERSION@/$(VERSION)/g' | $(GZIP) -c > $(DESTDIR)$(man1dir)/$$i.1.gz; chmod 644 $(DESTDIR)$(man1dir)/$$i.1.gz; done
2002-05-04 19:18:33 +04:00
download_dlx: $(DLXLINUX_TAR)
2002-05-15 13:10:14 +04:00
@@ -331,20 +329,18 @@
2002-05-04 19:18:33 +04:00
(cd dlxlinux; $(MV) bochsrc.txt bochsrc.txt.orig; $(SED) -e "s/1\.1\.2/$(VERSION)/g" -e 's,/usr/local,$(prefix),g' < bochsrc.txt.orig > bochsrc.txt; rm -f bochsrc.txt.orig)
install_dlx:
- $(RM) -rf $(BOCHSDIR)/dlxlinux
- cp -r dlxlinux $(BOCHSDIR)/dlxlinux
- $(CHMOD) 755 $(BOCHSDIR)/dlxlinux
- $(GZIP) $(BOCHSDIR)/dlxlinux/hd10meg.img
- $(CHMOD) 644 $(BOCHSDIR)/dlxlinux/*
- for i in bochs-dlx; do cp $(srcdir)/build/linux/$$i $(bindir)/$$i; $(CHMOD) 755 $(bindir)/$$i; done
+ $(RM) -rf $(DESTDIR)$(sharedir)/dlxlinux
+ cp -r dlxlinux $(DESTDIR)$(sharedir)/dlxlinux
+ $(CHMOD) 755 $(DESTDIR)$(sharedir)/dlxlinux
+ $(GZIP) $(DESTDIR)$(sharedir)/dlxlinux/hd10meg.img
+ $(CHMOD) 644 $(DESTDIR)$(sharedir)/dlxlinux/*
+ for i in bochs-dlx; do cp $(srcdir)/build/linux/$$i $(bindir)/$$i; $(CHMOD) 755 $(DESTDIR)$(bindir)/$$i; done
uninstall::
- $(RM) -rf $(VERSIONDIR)
- $(RM) -rf $(BOCHSDIR)/dlxlinux
- $(RM) -rf $(BOCHSDIR)/latest
- -$(RMDIR) $(BOCHSDIR)
+ $(RM) -rf $(DESTDIR)$(sharedir)
+ $(RM) -rf $(DESTDIR)$(docdir)
for i in bochs bximage bochs-dlx $(BOCHS_SCRIPTS); do rm -f $(DESTDIR)$(bindir)/$$i; done
- for i in $(MAN_PAGE_LIST); do $(RM) -f $(man1dir)/$$i.1; done
+ for i in $(MAN_PAGE_LIST); do $(RM) -f $(man1dir)/$$i.1.gz; done
V6WORKSPACE_ZIP=build/win32/workspace.zip
V6WORKSPACE_FILES=bochs.dsw bochs.dsp bochs.opt cpu/cpu.dsp \
2002-06-27 19:36:27 +04:00
diff -urN ../bochs/build/linux/bochs-dlx.in ./build/linux/bochs-dlx.in
--- ../bochs/build/linux/bochs-dlx.in Fri Dec 7 16:46:13 2001
+++ ./build/linux/bochs-dlx.in Wed Jun 26 21:08:22 2002
@@ -1,6 +1,6 @@
#!/bin/sh
BOCHS=@prefix@/bin/bochs
-DLXINST=@prefix@/bochs/dlxlinux
+DLXINST=@prefix@/share/bochs/dlxlinux
GZIP=@GZIP@
if [ ! -z $1 ]; then
DLXPATH=$1
2002-06-26 21:08:55 +04:00
diff -urN ../bochs/build/linux/bochs-docs.in ./build/linux/bochs-docs.in
--- ../bochs/build/linux/bochs-docs.in Fri May 31 09:57:56 2002
+++ ./build/linux/bochs-docs.in Wed Jun 26 18:41:55 2002
@@ -1,6 +1,6 @@
#!/bin/sh
BROWSER=netscape
-URL=@prefix@/bochs/@VERSION@/DOC-linux.html
+URL=@prefix@/share/doc/bochs/DOC-linux.html
MY_PATH=@prefix@/bin/bochs-docs
cat <<EOF
diff -urN ../bochs/build/redhat/bochs.rpmspec.template ./build/redhat/bochs.rpmspec.template
--- ../bochs/build/redhat/bochs.rpmspec.template Sun Dec 9 00:38:55 2001
+++ ./build/redhat/bochs.rpmspec.template Wed Jun 26 18:42:43 2002
@@ -34,31 +34,26 @@
for i in "" usr usr/bin usr/man usr/man/man1; do
if ! test -d $RPM_BUILD_ROOT/$i; then mkdir $RPM_BUILD_ROOT/$i; fi
done
- make install_bin install_man install_fonts install_dlx prefix=$RPM_BUILD_ROOT/usr
- # fix up symlinks that point to buildroot
- cd $RPM_BUILD_ROOT/usr/bin
- rm -f bochs; ln -sf /usr/bochs/@SEDVERSION@/bochs .
- rm -f bximage; ln -sf /usr/bochs/@SEDVERSION@/bximage .
+ make install install_dlx prefix=$RPM_BUILD_ROOT/usr
%files
/usr/bin/bochs
/usr/bin/bochs-docs
/usr/bin/bochs-dlx
/usr/bin/bximage
- /usr/bochs/@SEDVERSION@
- /usr/bochs/dlxlinux
- /usr/bochs/latest
- /usr/man/man1/*
+ /usr/share/bochs/*
+ /usr/share/doc/*
+ /usr/man/*
%clean
rm -rf $RPM_BUILD_DIR/bochs-@SEDVERSION@
if test "/" != $RPM_BUILD_ROOT; then
rm -rf $RPM_BUILD_ROOT
fi
%post
- /usr/bochs/@SEDVERSION@/install-x11-fonts
+ /usr/share/bochs/install-x11-fonts
%preun
# clean up the bochsout.txt that is always produced if you
# run bochs-dlx.
- rm -rf /usr/bochs/dlxlinux/bochsout.txt core
+ rm -rf /usr/share/bochs/dlxlinux/bochsout.txt core
%postun
- rmdir /usr/bochs > /dev/null 2>&1
+ rmdir /usr/share/bochs > /dev/null 2>&1
diff -urN ../bochs/install-x11-fonts.in ./install-x11-fonts.in
--- ../bochs/install-x11-fonts.in Mon Mar 18 12:39:57 2002
+++ ./install-x11-fonts.in Wed Jun 26 18:35:53 2002
@@ -9,7 +9,7 @@
X11_FONT_PATH_CHOICES="/usr/X11R6/lib/X11/fonts /usr/local/lib/X11/fonts /usr/lib/X11/fonts /usr/openwin/lib/X11/fonts"
FONTS=vga.pcf
-FONT_SOURCE_PATH_CHOICES="font ${srcdir+$srcdir/font} @prefix@/bochs/latest"
+FONT_SOURCE_PATH_CHOICES="font ${srcdir+$srcdir/font} @prefix@/share/bochs"
die () {
cat <<EOF