$NetBSD: patch-ab,v 1.9 2009/09/23 13:52:11 tnn Exp $ --- Makefile.orig 2005-08-23 17:22:44.000000000 +0200 +++ Makefile @@ -8,12 +8,12 @@ ZIPVERSION = 360 # Change these to locations you need, also # remember to edit cdlabelgen and its @where_is_the_template as needed. -BASE_DIR = /usr/local +BASE_DIR = ${PREFIX} # BASE_DIR = /usr/local # BASE_DIR = /opt BIN_DIR = $(BASE_DIR)/bin -LIB_DIR = $(BASE_DIR)/lib/cdlabelgen -MAN_DIR = $(BASE_DIR)/man +LIB_DIR = $(BASE_DIR)/share/cdlabelgen +MAN_DIR = $(BASE_DIR)/$(PKGMANDIR) SOURCES = cdlabelgen ChangeLog INSTALL README Makefile ../cdinsert.pl INSTALL.WEB cdlabelgen.pod cdlabelgen.1 cdlabelgen.html spec.template POSTSCRIPT = template.ps *.eps DISTFILES = $(SOURCES) $(POSTSCRIPT) @@ -31,6 +31,14 @@ INSTALL_FILE := install -m 0644 # --------------- all: cdlabelgen.html cdlabelgen.1 + ${SED} s=@PREFIX@=${PREFIX}=g cdlabelgen.new + ${MV} cdlabelgen.new cdlabelgen + if [ `id -u` -eq 0 ]; then \ + perldoc_flags="-U"; \ + else \ + perldoc_flags=""; \ + fi; \ + ${LOCALBASE}/bin/perldoc $$perldoc_flags cdlabelgen >cdlabelgen.0 cdlabelgen.html: cdlabelgen.pod pod2html --outfile=$@ --infile=$? @@ -43,13 +51,13 @@ cdlabelgen.1: cdlabelgen.pod install: all @echo "Installing cdlabelgen in $(BIN_DIR) and $(LIB_DIR)" @echo "" - $(INSTALL_DIR) $(BIN_DIR) - $(INSTALL) cdlabelgen $(BIN_DIR) - $(INSTALL_FILE) cdlabelgen.1 $(MAN_DIR)/man1 - $(INSTALL_DIR) $(LIB_DIR) + + ${BSD_INSTALL_SCRIPT} cdlabelgen ${DESTDIR}${BIN_DIR} + ${BSD_INSTALL_MAN} cdlabelgen.1 ${DESTDIR}${MAN_DIR}/man1 + ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${LIB_DIR} set -e; \ for file in $(POSTSCRIPT); do \ - $(INSTALL_FILE) postscript/$$file $(LIB_DIR)/; \ + ${BSD_INSTALL_DATA} postscript/$$file ${DESTDIR}${LIB_DIR}; \ done @echo "** Done. Check $(BIN_DIR)/cdlabelgen and fix @where_is_the_template - if needed!"