From e65cd2b6f9ce2a458bace51ae86fbcab03a986b4 Mon Sep 17 00:00:00 2001 From: pav Date: Mon, 14 Feb 2005 20:30:10 +0000 Subject: - Fix packing list. - Respect SYSCONFDIR in pkg-plist. - Remove useless test on PREFIX. - Remove useless HAS_CONFIGURE's. PR: ports/76789 Submitted by: Florent Thoumie Approved by: maintainer timeout (2 weeks) --- sysutils/LPRngTool/Makefile | 20 +++++++++++--------- sysutils/LPRngTool/pkg-plist | 6 +++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sysutils/LPRngTool/Makefile b/sysutils/LPRngTool/Makefile index ff4f45d51144..c75b6bf7717f 100644 --- a/sysutils/LPRngTool/Makefile +++ b/sysutils/LPRngTool/Makefile @@ -28,21 +28,18 @@ BUILD_DEPENDS= \ #RUN_DEPENDS= ifhp:${PORTSDIR}/print/ifhp -.if defined(PREFIX) - CONFIGURE_ARGS+= --prefix="${PREFIX}" -.endif .if defined(SYSCONFDIR) - CONFIGURE_ARGS+= --with-sysconfdir="${SYSCONFDIR}" +PLIST_SUB+= CWD="" SYSCONFDIR="${SYSCONFDIR:S,^/,,}" +.else +SYSCONFDIR= ${PREFIX}/etc +PLIST_SUB+= CWD="@comment " SYSCONFDIR="${SYSCONFDIR:S,^${PREFIX}/,,}" .endif -HAS_CONFIGURE= yes GNU_CONFIGURE= yes INSTALLS_SHLIB= yes -HAS_CONFIGURE= yes - -CONFIGURE_ARGS+=\ - --with-spool_directory=/var/spool/lpd +CONFIGURE_ARGS+= --with-spool_directory=/var/spool/lpd \ + --with-sysconfdir="${SYSCONFDIR}" MAN1=lprngtool.1 @@ -61,4 +58,9 @@ pre-everything:: fi @${ECHO_MSG} "Configuring with '${CONFIGURE_ARGS}'" +post-install: + @if [ ! -f ${SYSCONFDIR}/lprngtool.conf ]; then \ + ${CP} ${SYSCONFDIR}/lprngtool.conf.sample ${SYSCONFDIR}/lprngtool.conf; \ + fi + .include diff --git a/sysutils/LPRngTool/pkg-plist b/sysutils/LPRngTool/pkg-plist index bf899e18d4cd..a494e02f367f 100644 --- a/sysutils/LPRngTool/pkg-plist +++ b/sysutils/LPRngTool/pkg-plist @@ -1,4 +1,3 @@ -etc/lprngtool.conf.sample bin/lprngtool libexec/filters/atalkprint libexec/filters/ncpprint @@ -7,3 +6,8 @@ libexec/filters/printerdb libexec/filters/testpage.asc libexec/filters/testpage.ps libexec/filters/testpage-a4.ps +@unexec rmdir %D/libexec/filters 2> /dev/null || true +%%CWD%%@cwd / +@unexec if cmp -s %D/%%SYSCONFDIR%%/lprngtool.conf %D/%%SYSCONFDIR%%/lprngtool.conf.sample; then rm -f %D/%%SYSCONFDIR%%/lprngtool.conf; fi +%%SYSCONFDIR%%/lprngtool.conf.sample +@exec [ -f %B/lprngtool.conf ] || cp %B/%f %B/lprngtool.conf -- cgit