diff options
author | jmmv <jmmv@pkgsrc.org> | 2010-04-22 11:58:51 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2010-04-22 11:58:51 +0000 |
commit | 60bbf8bb29920cf55b08ab29aa0cb35689c1e8ef (patch) | |
tree | e24e93dee219c8c2ad4849f8a383a8b787f3f603 /print | |
parent | 075acd24ef1887549e51c2cb86e76162dc8ed769 (diff) | |
download | pkgsrc-60bbf8bb29920cf55b08ab29aa0cb35689c1e8ef.tar.gz |
Generate the sample configuration file during the build stage and install
it as any other configuration file, instead of creating it in-place during
package installation.
This makes the configuration file go away upon package deinstallation,
unless it was modified by the administrator.
Bump PKGREVISION to 1.
Diffstat (limited to 'print')
-rw-r--r-- | print/libpaper/INSTALL | 8 | ||||
-rw-r--r-- | print/libpaper/Makefile | 16 | ||||
-rw-r--r-- | print/libpaper/PLIST | 3 |
3 files changed, 16 insertions, 11 deletions
diff --git a/print/libpaper/INSTALL b/print/libpaper/INSTALL deleted file mode 100644 index c31406682f5..00000000000 --- a/print/libpaper/INSTALL +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# $NetBSD: INSTALL,v 1.1.1.1 2007/09/04 20:10:12 drochner Exp $ - -case ${STAGE} in - POST-INSTALL) - ${PREFIX}/sbin/paperconfig -p @PAPERSIZE@ - ;; -esac diff --git a/print/libpaper/Makefile b/print/libpaper/Makefile index a9333d69e8f..583c6c83a40 100644 --- a/print/libpaper/Makefile +++ b/print/libpaper/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.4 2009/03/01 21:51:22 sno Exp $ +# $NetBSD: Makefile,v 1.5 2010/04/22 11:58:51 jmmv Exp $ # DISTNAME= libpaper_1.1.23 PKGNAME= ${DISTNAME:S/_/-/} +PKGREVISION= 1 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/libp/libpaper/} @@ -17,8 +18,19 @@ GNU_CONFIGURE= yes CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} USE_LIBTOOL= yes USE_TOOLS+= gmake -FILES_SUBST+= PAPERSIZE=${PAPERSIZE} + +EGDIR= ${PREFIX}/share/examples/libpaper +CONF_FILES= ${EGDIR}/papersize ${PKG_SYSCONFDIR}/papersize .include "../../devel/libgetopt/buildlink3.mk" +post-build: + @${ECHO} 'Creating default papersize configuration file' + @PAPERCONF=${WRKDIR}/papersize ${SH} ${WRKSRC}/src/paperconfig \ + -p ${PAPERSIZE} + +post-install: + ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} + ${INSTALL_DATA} ${WRKDIR}/papersize ${DESTDIR}${EGDIR}/papersize + .include "../../mk/bsd.pkg.mk" diff --git a/print/libpaper/PLIST b/print/libpaper/PLIST index 653d24a2ef6..6b47add81cd 100644 --- a/print/libpaper/PLIST +++ b/print/libpaper/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2007/09/04 20:10:12 drochner Exp $ +@comment $NetBSD: PLIST,v 1.2 2010/04/22 11:58:51 jmmv Exp $ bin/paperconf include/paper.h lib/libpaper.la @@ -21,3 +21,4 @@ man/man3/systempapersizefile.3 man/man5/papersize.5 man/man8/paperconfig.8 sbin/paperconfig +share/examples/libpaper/papersize |