1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

- Do not override config files

Submitted by:	Mark Daniel Reidel <mark@reidel.info>
This commit is contained in:
Kirill Ponomarev 2004-03-26 11:37:46 +00:00
parent fb5e575226
commit a6eb63897d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105316
2 changed files with 38 additions and 5 deletions

View File

@ -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>

View File

@ -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