aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-02-15 04:30:10 +0800
committerpav <pav@FreeBSD.org>2005-02-15 04:30:10 +0800
commite65cd2b6f9ce2a458bace51ae86fbcab03a986b4 (patch)
tree50e3d7ac246b94d362cb8695647898599c328181 /sysutils
parent75e4b077f54e1bbd87b83071ed1f21b3b0b5892a (diff)
downloadfreebsd-ports-gnome-e65cd2b6f9ce2a458bace51ae86fbcab03a986b4.tar.gz
freebsd-ports-gnome-e65cd2b6f9ce2a458bace51ae86fbcab03a986b4.tar.zst
freebsd-ports-gnome-e65cd2b6f9ce2a458bace51ae86fbcab03a986b4.zip
- 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 <flz@xbsd.org> Approved by: maintainer timeout (2 weeks)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/LPRngTool/Makefile20
-rw-r--r--sysutils/LPRngTool/pkg-plist6
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 <bsd.port.mk>
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