summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmmv <jmmv>2002-11-26 11:26:31 +0000
committerjmmv <jmmv>2002-11-26 11:26:31 +0000
commitb23bfbb7e1abe799567ad693d25295286b452f8f (patch)
treec548d9349ad1ca02a34bdbeb52305218dff90a1c
parent4afb6ec69e6674d4085ec6a92faa2b9a12fc3b07 (diff)
downloadpkgsrc-b23bfbb7e1abe799567ad693d25295286b452f8f.tar.gz
Make this package behave properly when installing configuration files, that
is, using the PKG_SYSCONFDIR stuff. apsfilter needs a symlink in the configuration directory, so add an INSTALL script to create it (which handles all DEINSTALL stuff too). Bump PKGREVISION to 2. Approved by wiz. This closes PR 18994.
-rw-r--r--print/apsfilter/DEINSTALL17
-rw-r--r--print/apsfilter/INSTALL23
-rw-r--r--print/apsfilter/Makefile21
-rw-r--r--print/apsfilter/PLIST3
-rw-r--r--print/apsfilter/distinfo6
-rw-r--r--print/apsfilter/patches/patch-aa29
-rw-r--r--print/apsfilter/patches/patch-ac12
-rw-r--r--print/apsfilter/patches/patch-ad13
8 files changed, 94 insertions, 30 deletions
diff --git a/print/apsfilter/DEINSTALL b/print/apsfilter/DEINSTALL
deleted file mode 100644
index 900057318ac..00000000000
--- a/print/apsfilter/DEINSTALL
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/10/31 23:27:30 zuntum Exp $
-
-PKGNAME=$1
-
-case "$2" in
- DEINSTALL) cat << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to
-remove apsfilter's configuration directory (usually /etc/apsfilter) and
-SETUP.cfg from apsfilter's directory
-(usually @LOCALBASE@/share/apsfilter/SETUP.cfg)
-===========================================================================
-EOF
- ;;
-esac
diff --git a/print/apsfilter/INSTALL b/print/apsfilter/INSTALL
new file mode 100644
index 00000000000..49e95e50432
--- /dev/null
+++ b/print/apsfilter/INSTALL
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2002/11/26 11:26:32 jmmv Exp $
+
+PREFIX="@PREFIX@"
+
+case ${STAGE} in
+POST-INSTALL)
+ ${LN} -s ${PREFIX}/share/apsfilter ${PKG_SYSCONFDIR}/basedir
+ ;;
+DEINSTALL)
+ ${RM} ${PKG_SYSCONFDIR}/basedir
+
+ cat << EOF
+===========================================================================
+If you will not be using apsfilter any longer, you may want to remove
+apsfilter's configuration directory (${PKG_SYSCONFDIR}) and the
+SETUP.cfg configuration file from apsfilter's directory
+(${PREFIX}/share/apsfilter/SETUP.cfg).
+===========================================================================
+EOF
+ ;;
+esac
diff --git a/print/apsfilter/Makefile b/print/apsfilter/Makefile
index d548fc5e89d..393ceeea46e 100644
--- a/print/apsfilter/Makefile
+++ b/print/apsfilter/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2002/09/13 06:53:35 jlam Exp $
+# $NetBSD: Makefile,v 1.8 2002/11/26 11:26:32 jmmv Exp $
#
DISTNAME= apsfilter-7.2.2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= print
MASTER_SITES= http://www.apsfilter.org/download/
@@ -18,8 +18,6 @@ DEPENDS+= netpbm>=9.7nb1:../../graphics/netpbm
DEPENDS+= a2ps-[0-9]*:../../print/a2ps
DEPENDS+= psutils-[0-9]*:../../print/psutils
-DEINSTALL_FILE= ${WRKDIR}/.DEINSTALL
-
WRKSRC= ${WRKDIR}/apsfilter
HAS_CONFIGURE= YES
@@ -27,6 +25,16 @@ USE_BZIP2= YES
CONFIGURE_ARGS+=--prefix=${LOCALBASE}
CONFIGURE_ARGS+=--with-shell=${SH}
+CONFIGURE_ARGS+=--sysconfdir=${PKG_SYSCONFDIR}
+
+PKG_SYSCONFSUBDIR?= apsfilter
+CONF_FILES= ${PREFIX}/share/apsfilter/template/apsfilterrc \
+ ${PKG_SYSCONFDIR}/apsfilterrc
+
+DEINSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
+INSTALL_EXTRA_TMPL= ${.CURDIR}/INSTALL
+
+FILES_SUBST+= PREFIX="${PREFIX}"
post-patch:
for i in bin/apsfilter.in SETUP.in tools/prtmgmt; do \
@@ -35,8 +43,9 @@ post-patch:
${MV} ${WRKSRC}/$$i.done ${WRKSRC}/$$i; \
done
- ${SED} "s,@LOCALBASE@,${LOCALBASE},g" ${PKGDIR}/DEINSTALL \
- > ${DEINSTALL_FILE}
+# ${SED} "s,@LOCALBASE@,${LOCALBASE},g" ${PKGDIR}/DEINSTALL \
+# > ${DEINSTALL_FILE}
.include "../../mk/ghostscript.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/print/apsfilter/PLIST b/print/apsfilter/PLIST
index 0976228718c..a2775b48931 100644
--- a/print/apsfilter/PLIST
+++ b/print/apsfilter/PLIST
@@ -1,8 +1,7 @@
-@comment $NetBSD: PLIST,v 1.4 2002/03/09 13:58:03 martti Exp $
+@comment $NetBSD: PLIST,v 1.5 2002/11/26 11:26:33 jmmv Exp $
bin/aps2file
bin/apsfilter-bug
bin/apspreview
-etc/apsfilter/basedir
man/man1/aps2file.1
man/man1/apsfilter-bug.1
man/man1/apsfilter.1
diff --git a/print/apsfilter/distinfo b/print/apsfilter/distinfo
index 54ba9a42d53..054c797a9af 100644
--- a/print/apsfilter/distinfo
+++ b/print/apsfilter/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.4 2002/05/14 17:27:26 tron Exp $
+$NetBSD: distinfo,v 1.5 2002/11/26 11:26:33 jmmv Exp $
SHA1 (apsfilter-7.2.2.tar.gz) = be43c7651cbec09cef09d6855c8e9b0fb59fb3c6
Size (apsfilter-7.2.2.tar.gz) = 352011 bytes
-SHA1 (patch-aa) = 144c2cfeb15d00d036dc468a9be7579d39c4581d
+SHA1 (patch-aa) = 200031f114ae994843c1961eba49b09a20fdb970
SHA1 (patch-ab) = 0da86a8669845a62ea356a61ad97bc961e2d01b8
+SHA1 (patch-ac) = a8ace4d2f9fcdf049981bb8f2c3f48b28e4f4cf9
+SHA1 (patch-ad) = 4a692324f2452aee9c588bd4ba8b15e3529de710
diff --git a/print/apsfilter/patches/patch-aa b/print/apsfilter/patches/patch-aa
index f0d4063e733..9e084dbc589 100644
--- a/print/apsfilter/patches/patch-aa
+++ b/print/apsfilter/patches/patch-aa
@@ -1,8 +1,15 @@
-$NetBSD: patch-aa,v 1.2 2002/03/09 13:58:04 martti Exp $
+$NetBSD: patch-aa,v 1.3 2002/11/26 11:26:34 jmmv Exp $
--- Makefile.in.orig Sun Feb 24 21:47:45 2002
-+++ Makefile.in Wed Feb 27 10:41:18 2002
-@@ -18,9 +18,9 @@
++++ Makefile.in
+@@ -12,15 +12,15 @@ docdir=${DESTDIR}@docdir@
+
+ APSSHARE=${datadir}/apsfilter
+ APSDOC=${docdir}/apsfilter
+-APSCONF=${sysconfdir}/apsfilter
++APSCONF=${sysconfdir}
+
+ MKDIR=mkdir -p
RM=rm -f
LN=ln -sfn
@@ -15,3 +22,19 @@ $NetBSD: patch-aa,v 1.2 2002/03/09 13:58:04 martti Exp $
.PHONY: all install update clean distclean
+@@ -33,7 +33,6 @@ update:
+ ${MKDIR} ${mandir}/man1
+ ${MKDIR} ${mandir}/man5
+ ${MKDIR} ${APSDOC}
+- ${MKDIR} ${APSCONF}
+ ${MKDIR} ${APSSHARE}
+ ${MKDIR} ${APSSHARE}/bin
+ ${MKDIR} ${APSSHARE}/setup
+@@ -79,7 +78,6 @@ update:
+ ${INSTALL_DATA} man/apsfilter-bug.1 ${mandir}/man1/apsfilter-bug.1
+ ${INSTALL_DATA} man/apsfilterrc.5 ${mandir}/man5/apsfilterrc.5
+ tar cf - driver | ( cd ${APSSHARE} && tar xf -)
+- ${LN} ${APSSHARE} ${APSCONF}/basedir
+
+ clean:
+ (cd doc; make clean)
diff --git a/print/apsfilter/patches/patch-ac b/print/apsfilter/patches/patch-ac
new file mode 100644
index 00000000000..ba00901aec0
--- /dev/null
+++ b/print/apsfilter/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.1 2002/11/26 11:26:35 jmmv Exp $
+
+--- configure.orig Thu Jan 10 21:44:48 2002
++++ configure
+@@ -237,7 +237,6 @@ Using following values as defaults:
+ datadir $datadir
+ (will become $datadir/apsfilter)
+ sysconfdir $sysconfdir
+- (will become $sysconfdir/apsfilter)
+ mandir $mandir
+ docdir $docdir
+ (will become $docdir/apsfilter)
diff --git a/print/apsfilter/patches/patch-ad b/print/apsfilter/patches/patch-ad
new file mode 100644
index 00000000000..7a3e8791225
--- /dev/null
+++ b/print/apsfilter/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2002/11/26 11:26:35 jmmv Exp $
+
+--- SETUP.in.orig Sun Feb 24 21:47:45 2002
++++ SETUP.in
+@@ -1816,7 +1816,7 @@ fail()
+
+ export APS_BASEDIR="@datadir@/apsfilter"
+ cd "$APS_BASEDIR"
+-CONF_DIR="@sysconfdir@/apsfilter"
++CONF_DIR="@sysconfdir@"
+ SPOOL="@spooldir@"
+
+ # check read/write permissions