aboutsummaryrefslogtreecommitdiffstats
path: root/irc
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2014-04-09 02:53:31 +0800
committerrene <rene@FreeBSD.org>2014-04-09 02:53:31 +0800
commit2637e1de4f44ef61c0b628336196022d2d43c8f8 (patch)
tree9f9b0685cc47dc384ed2e23bd99b5f67b8e1f252 /irc
parentc2873e2d283d9cc33f467111390b884b63c37efd (diff)
downloadfreebsd-ports-gnome-2637e1de4f44ef61c0b628336196022d2d43c8f8.tar.gz
freebsd-ports-gnome-2637e1de4f44ef61c0b628336196022d2d43c8f8.tar.zst
freebsd-ports-gnome-2637e1de4f44ef61c0b628336196022d2d43c8f8.zip
irc/ircd-ru: Fix staging and add forgotten patch file.
Prodded by: swills Approved by: portmgr (implicit, PR followup)
Diffstat (limited to 'irc')
-rw-r--r--irc/ircd-ru/Makefile15
-rw-r--r--irc/ircd-ru/files/patch-tools__install_ircd.in10
-rw-r--r--irc/ircd-ru/files/pkg-install.in6
-rw-r--r--irc/ircd-ru/pkg-plist11
4 files changed, 27 insertions, 15 deletions
diff --git a/irc/ircd-ru/Makefile b/irc/ircd-ru/Makefile
index d9d7f1aad28a..44b2cf25f169 100644
--- a/irc/ircd-ru/Makefile
+++ b/irc/ircd-ru/Makefile
@@ -20,9 +20,8 @@ WRKSRC= ${WRKDIR}/ircd-RU-${PORTVERSION}-03-rc
USERS= ircd
GROUPS= ${USERS}
-
-VARDIR= /var
-PLIST_SUB= VARDIR=${VARDIR}
+SUB_LIST= USERS=${USERS} GROUPS=${GROUPS}
+SUB_FILES= pkg-install
OPTIONS_DEFINE= WENET HUB ENCRYPTION SYSLOGFILE DRONEMODULE AUTHMODULE \
DNSBL SELECT DOCS
@@ -56,6 +55,9 @@ LIB_DEPENDS+= libgmp.so:${PORTSDIR}/math/gmp
# log to file instead of syslog
.if ${PORT_OPTIONS:MSYSLOGFILE}
CONFIGURE_ARGS+=--enable-syslogfile
+PLIST_SUB+=SYSLOGFILE=""
+.else
+PLIST_SUB+=SYSLOGFILE="@comment "
.endif
# enable dronemodule support
@@ -85,9 +87,12 @@ post-patch:
.endif
#FIXME rene DESTDIR support is broken upstream
@${REINPLACE_CMD} -e 's|-d $$dir_LPATH|-d ${STAGEDIR}$$dir_LPATH|g' \
+ -e 's|-d $$dir_FNAME_|-d ${STAGEDIR}$$dir_FNAME_|g' \
-e 's|-d $$dir_PPATH|-d ${STAGEDIR}$$dir_PPATH|g' \
-e 's|-d $$dir_EPATH|-d ${STAGEDIR}$$dir_EPATH|g' \
-e 's|-d $$dir_MCPATH|-d ${STAGEDIR}$$dir_MCPATH|g' \
+ -e 's|f $$FNAME_|f ${STAGEDIR}$$FNAME_|g' \
+ -e 's|h $$FNAME_|h ${STAGEDIR}$$FNAME_|g' \
-e 's|STAGE|${STAGEDIR}|g' \
${WRKSRC}/tools/install_ircd.in
@@ -97,8 +102,4 @@ pre-build:
@${ECHO_MSG} " Edit ${WRKSRC}/include/config.h for specific settings "
@${ECHO_MSG} ""
-post-install:
- @${MKDIR} ${STAGEDIR}${VARDIR}/log/ircd-ru
- @${MKDIR} ${STAGEDIR}${VARDIR}/run/ircd-ru
-
.include <bsd.port.mk>
diff --git a/irc/ircd-ru/files/patch-tools__install_ircd.in b/irc/ircd-ru/files/patch-tools__install_ircd.in
new file mode 100644
index 000000000000..9cb2bddf26ee
--- /dev/null
+++ b/irc/ircd-ru/files/patch-tools__install_ircd.in
@@ -0,0 +1,10 @@
+--- tools/install_ircd.in.orig 2006-07-14 15:53:59.000000000 +0200
++++ tools/install_ircd.in 2014-04-06 16:22:09.000000000 +0200
+@@ -6,6 +6,7 @@
+ # $Id: install_ircd.in,v 1.1.8.14 2003/08/10 16:12:58 rzhe Exp $
+
+ DPATH=`awk '/^#define@AWKSP@DPATH/ {print $3}' include/paths.h | tr -d \"`
++DPATH=STAGE/$DPATH
+ SPATH=`awk '/^#define@AWKSP@SPATH/ {print $3}' include/paths.h | tr -d \"`
+ if [ -z `echo $SPATH | awk '/^\// {print $1}'` ] ; then
+ SPATH=$DPATH/$SPATH
diff --git a/irc/ircd-ru/files/pkg-install.in b/irc/ircd-ru/files/pkg-install.in
new file mode 100644
index 000000000000..27e54f643d2a
--- /dev/null
+++ b/irc/ircd-ru/files/pkg-install.in
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ "$2" != "POST-INSTALL" ] && exit 0
+
+install -d -m 0755 -o %%USERS%% -g %%GROUPS%% /var/run/ircd-ru
+install -d -m 0755 -o %%USERS%% -g %%GROUPS%% /var/log/ircd-ru
diff --git a/irc/ircd-ru/pkg-plist b/irc/ircd-ru/pkg-plist
index 23203c663b1c..8983a7642fd5 100644
--- a/irc/ircd-ru/pkg-plist
+++ b/irc/ircd-ru/pkg-plist
@@ -16,14 +16,6 @@
@dirrmtry etc/ircd-ru
@dirrmtry etc/ircd-ru/ru_RU.CP1251
@dirrmtry etc/ircd-ru/ru_RU.KOI8-R
-@mode 755
-@owner ircd
-@group ircd
-%%VARDIR%%/log/ircd-ru
-%%VARDIR%%/run/ircd-ru
-@group
-@owner
-@mode
bin/ircdpasswd
etc/ircd-ru/ircd.conf-dist
etc/ircd-ru/ircd.motd-dist
@@ -33,3 +25,6 @@ etc/ircd-ru/ru_RU.CP1251/ircd.motd-dist
etc/ircd-ru/ru_RU.CP1251/ircd.smotd-dist
etc/ircd-ru/ru_RU.KOI8-R/ircd.conf-dist
sbin/ircd
+%%SYSLOGFILE%%/var/log/ircd-ru/syslog
+@unexec rmdir /var/log/ircd-ru
+@unexec rmdir /var/run/ircd-ru