Bochs/bochs/patches/patch.fhs
2002-05-15 09:10:14 +00:00

147 lines
6.2 KiB
Plaintext

----------------------------------------------------------------------
Patch name: patch.fhs
Author: Robert Millan
Date: May, 16th 2002
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.
Patch was created with:
diff -u
Apply patch to what version:
CVS as May, 16th 2002
Instructions:
To patch, go to main bochs directory.
Type "patch -p0 < THIS_PATCH_FILE".
----------------------------------------------------------------------
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 @@
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
+INSTALL_LIST_BIN=bochs bochsdbg bximage $(srcdir)/build/linux/bochs-docs
+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
-BOCHS_SCRIPTS=bochs-docs
CP=cp
CAT=cat
RM=rm
@@ -58,7 +60,7 @@
RMDIR=rmdir
TAR=tar
CHMOD=chmod
-GZIP=gzip
+GZIP=gzip -9
GUNZIP=gunzip
ZIP=zip
UNIX2DOS=unix2dos
@@ -287,35 +289,31 @@
# 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
+ 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
download_dlx: $(DLXLINUX_TAR)
@@ -331,20 +329,18 @@
(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 \