diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2015-10-23 16:51:42 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2015-10-23 16:51:42 +0000 |
commit | 04fd60fdf2b1255d323210f536556eabe2b23f8a (patch) | |
tree | 1f5b17fc1c4b55b326c34b09a35c7fd186d88f1e /irc | |
parent | - Handle owner/group in plist, fixing install as non-root (diff) |
- Move owner/permission to plist, fixing installation from non-root and simplifying the port
PR: 203564
Submitted by: amdmi3
Approved by: maintainer timeout (moggie@elasticmind.net, 2 weeks)
Notes
Notes:
svn path=/head/; revision=400037
Diffstat (limited to 'irc')
-rw-r--r-- | irc/ircd-ratbox/Makefile | 9 | ||||
-rw-r--r-- | irc/ircd-ratbox/files/pkg-install.in | 44 | ||||
-rw-r--r-- | irc/ircd-ratbox/pkg-plist | 10 |
3 files changed, 13 insertions, 50 deletions
diff --git a/irc/ircd-ratbox/Makefile b/irc/ircd-ratbox/Makefile index e2617b333994..a0eec2d6d810 100644 --- a/irc/ircd-ratbox/Makefile +++ b/irc/ircd-ratbox/Makefile @@ -3,7 +3,7 @@ PORTNAME= ircd-ratbox PORTVERSION= 3.0.8 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= irc ipv6 MASTER_SITES= http://www.ratbox.org/download/ \ http://www.ratbox.org/download/old/ @@ -17,7 +17,6 @@ CONFLICTS= ircd-ratbox-devel-[0-9]* charybdis-[0-9]* USES= cpe libtool tar:bzip2 CPE_VENDOR= ratbox -#MAN8= ircd.8 USE_RC_SUBR= ircd-ratbox USE_SQLITE= 3 USE_LDCONFIG= ${PREFIX}/lib/ircd-ratbox @@ -30,7 +29,7 @@ GROUPS= ${USERS} LOGDIR?= /var/log/${PORTNAME} RUNDIR?= /var/run/${PORTNAME} DBDIR?= /var/db/${PORTNAME} -SUB_FILES= pkg-message pkg-install +SUB_FILES= pkg-message PLIST_SUB= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} DBDIR=${DBDIR} SUB_LIST= LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} DBDIR=${DBDIR} @@ -226,6 +225,10 @@ pre-install: post-install: ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}${RUNDIR} + ${MKDIR} ${STAGEDIR}${DBDIR} + ${MKDIR} ${STAGEDIR}${LOGDIR} + cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} diff --git a/irc/ircd-ratbox/files/pkg-install.in b/irc/ircd-ratbox/files/pkg-install.in deleted file mode 100644 index 74fc38e357b1..000000000000 --- a/irc/ircd-ratbox/files/pkg-install.in +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -# -# Adapted from irc/ircd-hybrid's script -# - -#----------------------------------------------------------------------- -if [ "x$2" = "xPRE-INSTALL" ]; then -#----------------------------------------------------------------------- - -# ${DO_NADA} - -#----------------------------------------------------------------------- -elif [ "x$2" = "xPOST-INSTALL" ]; then -#----------------------------------------------------------------------- - -mkdir -p %%LOGDIR%% \ -&& chown ircd:ircd %%LOGDIR%% \ -&& chmod 750 %%LOGDIR%% - -mkdir -p %%RUNDIR%% \ -&& chown ircd:ircd %%RUNDIR%% \ -&& chmod 750 %%RUNDIR%% - -mkdir -p %%DBDIR%% \ -&& chown ircd:ircd %%DBDIR%% \ -&& chmod 750 %%DBDIR%% - -# Secure permissions if we think this is a fresh install -conffile="%%PREFIX%%/etc/ircd-ratbox/ircd.conf" -samplefile="%%PREFIX%%/etc/ircd-ratbox/ircd.conf.sample" -if cmp -s $conffile $samplefile; then - echo "Setting default permissions for config dir and files." - chown -R root:ircd %%PREFIX%%/etc/ircd-ratbox/ - chmod 750 %%PREFIX%%/etc/ircd-ratbox/ - chmod 640 %%PREFIX%%/etc/ircd-ratbox/* -else - echo "Modified ircd.conf file found, permissions unchanged." -fi - -#----------------------------------------------------------------------- -fi -#----------------------------------------------------------------------- - -exit 0 diff --git a/irc/ircd-ratbox/pkg-plist b/irc/ircd-ratbox/pkg-plist index a6bf7ec88be5..3d01b518da0c 100644 --- a/irc/ircd-ratbox/pkg-plist +++ b/irc/ircd-ratbox/pkg-plist @@ -227,6 +227,10 @@ lib/ircd-ratbox/modules/m_quit.so lib/ircd-ratbox/modules/m_server.so lib/ircd-ratbox/modules/m_squit.so etc/ircd-ratbox/genssl.sh -@sample etc/ircd-ratbox/ircd-efnet.conf.sample -@sample etc/ircd-ratbox/ircd.conf.sample -@sample etc/ircd-ratbox/ircd.motd.sample +@sample(,ircd,640) etc/ircd-ratbox/ircd-efnet.conf.sample +@sample(,ircd,640) etc/ircd-ratbox/ircd.conf.sample +@sample(,ircd,640) etc/ircd-ratbox/ircd.motd.sample +@dir(,ircd,750) etc/ircd-ratbox +@dir(ircd,ircd,750) %%RUNDIR%% +@dir(ircd,ircd,750) %%LOGDIR%% +@dir(ircd,ircd,750) %%DBDIR%% |