diff options
author | krion <krion@FreeBSD.org> | 2004-03-26 19:37:46 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-03-26 19:37:46 +0800 |
commit | c42526fdcca70547470e0a7492e15cfd3a05d417 (patch) | |
tree | d1bde781dc301419238a330ef0036c15844f5aab /net | |
parent | c30686b0b149f474475d385a21c5997597c0fa2a (diff) | |
download | freebsd-ports-gnome-c42526fdcca70547470e0a7492e15cfd3a05d417.tar.gz freebsd-ports-gnome-c42526fdcca70547470e0a7492e15cfd3a05d417.tar.zst freebsd-ports-gnome-c42526fdcca70547470e0a7492e15cfd3a05d417.zip |
- Do not override config files
Submitted by: Mark Daniel Reidel <mark@reidel.info>
Diffstat (limited to 'net')
-rw-r--r-- | net/bfilter/Makefile | 30 | ||||
-rw-r--r-- | net/bfilter/pkg-plist | 13 |
2 files changed, 38 insertions, 5 deletions
diff --git a/net/bfilter/Makefile b/net/bfilter/Makefile index 98ffc6808a63..bb0ee53fb353 100644 --- a/net/bfilter/Makefile +++ b/net/bfilter/Makefile @@ -7,6 +7,7 @@ PORTNAME= bfilter PORTVERSION= 0.9.3 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -29,11 +30,38 @@ CONFIGURE_ARGS+= --enable-debug .if defined(WITH_GUI) USE_GNOME= gtk20 pkgconfig -LIB_DEPENDS= gtkmm-2.0:${PORTSDIR}/x11-toolkits/gtk--2 +LIB_DEPENDS+= gtkmm-2.0:${PORTSDIR}/x11-toolkits/gtk--2 CONFIGURE_ARGS+= --with-gui PLIST_SUB+= WITH_GUI="" .else PLIST_SUB+= WITH_GUI="@comment " .endif +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/main/bfilter ${PREFIX}/bin +.if defined(WITH_GUI) + ${INSTALL_PROGRAM} ${WRKSRC}/main/gui/gtk/bfilter-gui ${PREFIX}/bin +.endif + ${MKDIR} ${PREFIX}/etc/bfilter + ${INSTALL_DATA} ${WRKSRC}/conf/config.default \ + ${PREFIX}/etc/bfilter/config.default + ${INSTALL_DATA} ${WRKSRC}/conf/rules \ + ${PREFIX}/etc/bfilter/rules.sample + ${INSTALL_DATA} ${WRKSRC}/conf/rules.local \ + ${PREFIX}/etc/bfilter/rules.local.sample + +post-install: + @${ECHO_MSG} "-----------------------------------------------" + @${ECHO_MSG} "Sample configuration files placed in" + @${ECHO_MSG} "${PREFIX}/etc/bfilter/config.default" + @${ECHO_MSG} "${PREFIX}/etc/bfilter/rules.sample" + @${ECHO_MSG} "${PREFIX}/etc/bfilter/rules.local.sample" + @${ECHO_MSG} "-----------------------------------------------" + @[ -f ${PREFIX}/etc/bfilter/config ] || \ + ${CP} ${PREFIX}/etc/bfilter/config.default ${PREFIX}/etc/bfilter/config + @[ -f ${PREFIX}/etc/bfilter/rules ] || \ + ${CP} ${PREFIX}/etc/bfilter/rules.sample ${PREFIX}/etc/bfilter/rules + @[ -f ${PREFIX}/etc/bfilter/rules.local ] || \ + ${CP} ${PREFIX}/etc/bfilter/rules.local.sample ${PREFIX}/etc/bfilter/rules.local + .include <bsd.port.mk> diff --git a/net/bfilter/pkg-plist b/net/bfilter/pkg-plist index 8750c233c5cd..2f9551927bd5 100644 --- a/net/bfilter/pkg-plist +++ b/net/bfilter/pkg-plist @@ -1,7 +1,12 @@ bin/bfilter %%WITH_GUI%%bin/bfilter-gui -etc/bfilter/config +@unexec if cmp -s %D/etc/bfilter/config %D/etc/bfilter/config.default; then rm -f %D/etc/bfilter/config; fi etc/bfilter/config.default -etc/bfilter/rules -etc/bfilter/rules.local -@dirrm /etc/bfilter +@exec [ -f %B/config ] || cp %B/%f %B/config +@unexec if cmp -s %D/etc/bfilter/rules %D/etc/bfilter/rules.sample; then rm -f %D/etc/bfilter/rules; fi +etc/bfilter/rules.sample +@exec [ -f %B/rules ] || cp %B/%f %B/rules +@unexec if cmp -s %D/etc/bfilter/rules.local %D/etc/bfilter/rules.local.sample; then rm -f %D/etc/bfilter/rules.local; fi +etc/bfilter/rules.local.sample +@exec [ -f %B/rules.local ] || cp %B/%f %B/rules.local +@unexec rmdir %B 2>/dev/null || true |