- Convert to USES=libtool and add INSTALL_TARGET=install-strip
- Store pid file under /var/run instead of /var/log - Add patch to fix DESTDIR problems - Use @sample - Replace pkg-deinstall and @exec with @dirrmtry
This commit is contained in:
parent
4639f95c6b
commit
3a740b3d95
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=367660
6 changed files with 43 additions and 56 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= bopm
|
||||
PORTVERSION= 3.1.3
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= irc
|
||||
MASTER_SITES= http://static.blitzed.org/www.blitzed.org/bopm/files/ \
|
||||
ftp://rusunix.org/pub/FreeBSD/distfiles/
|
||||
|
@ -13,27 +13,21 @@ COMMENT= Open proxy and DNSBL monitor designed for use with ircds
|
|||
|
||||
LOGDIR= /var/log/${PORTNAME}
|
||||
|
||||
USE_AUTOTOOLS= libtool
|
||||
LIBTOOLFILES= configure src/libopm/configure
|
||||
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc --localstatedir=${LOGDIR}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --localstatedir=${LOGDIR}
|
||||
INSTALL_TARGET= install-strip
|
||||
USES= libtool
|
||||
USE_LDCONFIG= yes
|
||||
USE_RC_SUBR= bopm
|
||||
|
||||
SUB_FILES= pkg-message pkg-deinstall
|
||||
PLIST_SUB= LOGDIR=${LOGDIR}
|
||||
SUB_LIST= LOGDIR=${LOGDIR}
|
||||
|
||||
USERS= bopm
|
||||
GROUPS= bopm
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's,data_DATA = bopm.conf.sample,data_DATA =,g' \
|
||||
-e 's,$$(sysconfdir)/bopm.conf,$$(DESTDIR)&.sample,g' \
|
||||
-e '/localstatedir/d' ${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's,/some/path/bopm.pid,${LOGDIR}/bopm.pid,g' \
|
||||
-e 's,/some/path/bopm.pid,/var/run/bopm.pid,g' \
|
||||
-e 's,/some/path/scan.log,${LOGDIR}/scan.log,g' \
|
||||
${WRKSRC}/bopm.conf.sample
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ load_rc_config $name
|
|||
: ${bopm_config="%%PREFIX%%/etc/bopm.conf"}
|
||||
|
||||
bopm_user="bopm"
|
||||
pidfile="%%LOGDIR%%/bopm.pid"
|
||||
pidfile="/var/run/bopm.pid"
|
||||
required_files="${bopm_config}"
|
||||
|
||||
# NOTE: bopm behaves differently with or without the -d flag.
|
||||
|
|
31
irc/bopm/files/patch-Makefile.in
Normal file
31
irc/bopm/files/patch-Makefile.in
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- Makefile.in.orig 2007-05-15 20:54:14 UTC
|
||||
+++ Makefile.in
|
||||
@@ -194,7 +194,7 @@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = src
|
||||
-data_DATA = bopm.conf.sample bopm.conf.blitzed
|
||||
+data_DATA = bopm.conf.blitzed
|
||||
EXTRA_DIST = ChangeLog contrib INSTALL README bopm.conf.sample bopm.conf.blitzed network-bopm
|
||||
all: all-recursive
|
||||
|
||||
@@ -636,14 +636,14 @@
|
||||
|
||||
|
||||
install-data-local:
|
||||
- @if test -f $(sysconfdir)/bopm.conf ; then \
|
||||
+ @if test -f $(DESTDIR)$(sysconfdir)/bopm.conf ; then \
|
||||
echo "$@ will not overwrite existing $(sysconfdir)/bopm.conf"; \
|
||||
else \
|
||||
- $(mkinstalldirs) $(sysconfdir); \
|
||||
- echo "$(INSTALL_DATA) bopm.conf.sample $(sysconfdir)/bopm.conf"; \
|
||||
- $(INSTALL_DATA) bopm.conf.sample $(sysconfdir)/bopm.conf; \
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir); \
|
||||
+ echo "$(INSTALL_DATA) bopm.conf.sample $(DESTDIR)$(sysconfdir)/bopm.conf.sample"; \
|
||||
+ $(INSTALL_DATA) bopm.conf.sample $(DESTDIR)$(sysconfdir)/bopm.conf.sample; \
|
||||
fi
|
||||
- $(mkinstalldirs) $(localstatedir)
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)
|
||||
|
||||
uninstall-local:
|
||||
@if test -f $(sysconfdir)/bopm.conf ; then \
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
if [ "x$2" = "xPOST-DEINSTALL" ]; then
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
if [ -d %%LOGDIR%% ]
|
||||
then
|
||||
rm -f %%LOGDIR%%/bopm.pid 2>/dev/null
|
||||
rmdir %%LOGDIR%% 2>/dev/null || echo "The logs in %%LOGDIR%% will remain untouched after the port is deinstalled."
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
fi
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
exit 0
|
|
@ -1,13 +0,0 @@
|
|||
-----------------------------------------------------------------
|
||||
bopm has been installed. Here are some installation details:
|
||||
|
||||
user bopm (uid 717) and group bopm (gid 717) have been added
|
||||
to passwd(5) and group(5).
|
||||
|
||||
bopm sample conf: %%PREFIX%%/etc/bopm.conf.sample
|
||||
bopm rc script: %%PREFIX%%/etc/rc.d/bopm
|
||||
bopm log dir: %%LOGDIR%%
|
||||
|
||||
Please be sure to create %%PREFIX%%/etc/bopm.conf before
|
||||
starting this daemon.
|
||||
-----------------------------------------------------------------
|
|
@ -1,20 +1,12 @@
|
|||
@unexec /bin/echo "===>" Stopping bopm...
|
||||
@unexec /usr/bin/killall bopm 2>/dev/null || true
|
||||
bin/bopm
|
||||
@owner bopm
|
||||
@group bopm
|
||||
@mode 640
|
||||
etc/bopm.conf.sample
|
||||
@owner
|
||||
@group
|
||||
@mode
|
||||
@sample(bopm,bopm,640) etc/bopm.conf.sample
|
||||
include/opm.h
|
||||
include/opm_error.h
|
||||
include/opm_types.h
|
||||
include/opm_common.h
|
||||
share/bopm.conf.blitzed
|
||||
lib/libopm.so.0
|
||||
lib/libopm.so
|
||||
lib/libopm.la
|
||||
lib/libopm.a
|
||||
@exec install -d -m 750 -o bopm -g bopm %%LOGDIR%% 2>/dev/null || true
|
||||
lib/libopm.so
|
||||
lib/libopm.so.0
|
||||
lib/libopm.so.0.0.0
|
||||
@dirrmtry(bopm,bopm,750) %%LOGDIR%%
|
||||
|
|
Loading…
Reference in a new issue