diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2015-10-23 16:51:47 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2015-10-23 16:51:47 +0000 |
commit | 51e559a37da26027634af425a11ebeb08456cd37 (patch) | |
tree | 15d643373cfcf018228003670288a7c7a95c946f | |
parent | 04fd60fdf2b1255d323210f536556eabe2b23f8a (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=400038
-rw-r--r-- | irc/ircd-ratbox-devel/Makefile | 5 | ||||
-rw-r--r-- | irc/ircd-ratbox-devel/files/pkg-install.in | 44 | ||||
-rw-r--r-- | irc/ircd-ratbox-devel/pkg-plist | 10 |
3 files changed, 9 insertions, 50 deletions
diff --git a/irc/ircd-ratbox-devel/Makefile b/irc/ircd-ratbox-devel/Makefile index 1fe2ebac46d6..0e451087c556 100644 --- a/irc/ircd-ratbox-devel/Makefile +++ b/irc/ircd-ratbox-devel/Makefile @@ -3,7 +3,7 @@ PORTNAME= ircd-ratbox PORTVERSION= 3.0.7 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= irc ipv6 MASTER_SITES= http://www.ratbox.org/download/ \ http://www.ratbox.org/download/old/ @@ -17,7 +17,6 @@ LICENSE= GPLv2 CONFLICTS= ircd-ratbox-[0-9]* charybdis-[0-9]* USES= libtool perl5 tar:bzip2 -#MAN8= ircd.8 USE_RC_SUBR= ircd-ratbox USE_SQLITE= 3 USE_PERL5= build @@ -29,7 +28,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} diff --git a/irc/ircd-ratbox-devel/files/pkg-install.in b/irc/ircd-ratbox-devel/files/pkg-install.in deleted file mode 100644 index 189cf6ec4f46..000000000000 --- a/irc/ircd-ratbox-devel/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 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, skipping perms setting." -fi - -#----------------------------------------------------------------------- -fi -#----------------------------------------------------------------------- - -exit 0 diff --git a/irc/ircd-ratbox-devel/pkg-plist b/irc/ircd-ratbox-devel/pkg-plist index c79eb5110c88..3c05a4537bd0 100644 --- a/irc/ircd-ratbox-devel/pkg-plist +++ b/irc/ircd-ratbox-devel/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%% |