--- debiandoc-sgml-1.1.101/Makefile 2006-03-12 09:43:27.000000000 +0100 +++ debiandoc-sgml-1.1.101/Makefile-gil 2008-10-03 10:48:59.000000000 +0200 @@ -4,7 +4,7 @@ ## ---------------------------------------------------------------------- ## General directory definitions -prefix := /usr/local +prefix := /usr bin_dir := $(prefix)/bin share_dir := $(prefix)/share ifeq ($(prefix),/usr/local) @@ -16,10 +16,11 @@ perl_version := 5.8.2 perl_dir := $(share_dir)/perl/$(perl_version) else -perl_dir := $(share_dir)/perl5 +perl_dir := /usr/lib/perl5 endif sgml_dir := $(share_dir)/sgml +DESTDIR := /var/tmp/debiandoc-sgml-root ## ---------------------------------------------------------------------- ## Manual pages directory definitions man1 := 1 @@ -67,7 +68,7 @@ ## General (un)install definitions SHELL := bash INSTALL := /usr/bin/install -INSTALL_DIR := $(INSTALL) -d -m 755 +INSTALL_DIR := mkdir -p INSTALL_SCRIPT := $(INSTALL) -p -m 755 INSTALL_FILE := $(INSTALL) -p -m 644 LN := /bin/ln -sf @@ -92,83 +93,84 @@ install: all set -e; \ - $(INSTALL_DIR) $(pkg_dtd_dir); \ + + $(INSTALL_DIR) $(DESTDIR)$(pkg_dtd_dir); \ for f in $(DTDS); \ do \ - $(INSTALL_FILE) sgml/dtd/$$f $(pkg_dtd_dir); \ + $(INSTALL_FILE) sgml/dtd/$$f $(DESTDIR)$(pkg_dtd_dir); \ done set -e; \ - $(INSTALL_DIR) $(pkg_ent_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_ent_dir); \ for f in $(ENTITIES); \ do \ - $(INSTALL_FILE) sgml/entities/$$f $(pkg_ent_dir); \ + $(INSTALL_FILE) sgml/entities/$$f $(DESTDIR)$(pkg_ent_dir); \ done set -e; \ - $(INSTALL_DIR) $(pkg_format_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_format_dir); \ for f in `ls tools/lib/Format/*.pm`; \ do \ - $(INSTALL_FILE) $$f $(pkg_format_dir); \ + $(INSTALL_FILE) $$f $(DESTDIR)$(pkg_format_dir); \ done set -e; \ - $(INSTALL_DIR) $(pkg_locale_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_locale_dir); \ for f in `ls tools/lib/Locale/*.pm`; \ do \ - $(INSTALL_FILE) $$f $(pkg_locale_dir); \ + $(INSTALL_FILE) $$f $(DESTDIR)$(pkg_locale_dir); \ done for d in `ls -d tools/lib/Locale/*_*`; \ do \ - $(INSTALL_DIR) $(pkg_locale_dir)/`basename $$d`; \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_locale_dir)/`basename $$d`; \ for f in $(FORMATS); \ do \ - $(INSTALL_FILE) $$d/$$f $(pkg_locale_dir)/`basename $$d`; \ + $(INSTALL_FILE) $$d/$$f $(DESTDIR)$(pkg_locale_dir)/`basename $$d`; \ done; \ done for d in `ls -d tools/lib/Locale/*_*`; \ do \ - $(INSTALL_DIR) $(pkg_locale_dir)/`basename $$d`; \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_locale_dir)/`basename $$d`; \ for f in $(XFORMATS); \ do \ - $(INSTALL_FILE) tools/lib/Locale/$$f $(pkg_locale_dir)/`basename $$d`; \ + $(INSTALL_FILE) tools/lib/Locale/$$f $(DESTDIR)$(pkg_locale_dir)/`basename $$d`; \ done; \ done set -e; \ - $(INSTALL_DIR) $(pkg_map_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_map_dir); \ for f in `ls tools/lib/Map/*.pm`; \ do \ - $(INSTALL_FILE) $$f $(pkg_map_dir); \ + $(INSTALL_FILE) $$f $(DESTDIR)$(pkg_map_dir); \ done set -e; \ - $(INSTALL_DIR) $(pkg_bin_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(pkg_bin_dir); \ for f in $(HELPERS); \ do \ - $(INSTALL_SCRIPT) tools/bin/$$f $(pkg_bin_dir); \ + $(INSTALL_SCRIPT) tools/bin/$$f $(DESTDIR)$(pkg_bin_dir); \ done set -e; \ - $(INSTALL_DIR) $(bin_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(bin_dir); \ for f in $(BCONVS); \ do \ - $(INSTALL_SCRIPT) tools/bin/$$f $(bin_dir); \ + $(INSTALL_SCRIPT) tools/bin/$$f $(DESTDIR)$(bin_dir); \ done for f in $(PSPECS); \ do \ - $(LN) $(dtd_name)2latex$$f $(bin_dir)/$(dtd_name)2$$f; \ + $(LN) $(dtd_name)2latex$$f $(DESTDIR)$(bin_dir)/$(dtd_name)2$$f; \ done set -e; \ - $(INSTALL_DIR) $(man1_dir); \ + $(INSTALL_DIR) $(DESTDIR)$(man1_dir); \ for f in $(MAN1S); \ do \ - $(INSTALL_FILE) tools/man/$$f.$(man1) $(man1_dir)/$$f.$(man1); \ + $(INSTALL_FILE) tools/man/$$f.$(man1) $(DESTDIR)$(man1_dir)/$$f.$(man1); \ done; \ for f in $(TOOLS); \ do \ - $(LN) $(firstword $(MAN1S)).$(man1) $(man1_dir)/$$f.$(man1); \ + $(LN) $(firstword $(MAN1S)).$(man1) $(DESTDIR)$(man1_dir)/$$f.$(man1); \ done uninstall: