pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Include freeswitch user/group | Fix pkglint errors



Module Name:	pkgsrc-wip
Committed By:	Angel M. Adames <angelmadames%gmail.com@localhost>
Pushed By:	angelmadames
Date:		Thu Jun 1 13:56:38 2017 -0400
Changeset:	b46ff15372d455d0bd844e6052e03247e6be0b76

Modified Files:
	freeswitch-core/Makefile
	freeswitch-core/files/freeswitch.sh

Log Message:
Include freeswitch user/group | Fix pkglint errors

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b46ff15372d455d0bd844e6052e03247e6be0b76

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 freeswitch-core/Makefile            | 19 ++++++++++++++++++-
 freeswitch-core/files/freeswitch.sh |  4 ++--
 2 files changed, 20 insertions(+), 3 deletions(-)

diffs:
diff --git a/freeswitch-core/Makefile b/freeswitch-core/Makefile
index b49326ad1f..b0dde3aef8 100644
--- a/freeswitch-core/Makefile
+++ b/freeswitch-core/Makefile
@@ -17,7 +17,7 @@ LIBTOOL_OVERRIDE=	libtool */libtool */*/libtool */*/*/libtool
 USE_LANGUAGES=  	c c++
 USE_TOOLS+=     	automake autoconf gmake perl pkg-config
 
-BUILD_DEFS+=		VARBASE
+BUILD_DEFS+=		VARBASE FREESWITCH_CONFDIR FREESWITCH_DATADIR FREESWITCH_SHAREDIR
 
 CONFIGURE_ARGS+=	--prefix=${PREFIX}
 CONFIGURE_ARGS+=	--exec-prefix=${PREFIX}/bin
@@ -163,6 +163,23 @@ INSTALLATION_DIRS+= 	${PREFIX}/freeswitch/modules
 INSTALLATION_DIRS+= 	${PREFIX}/freeswitch/sounds
 INSTALLATION_DIRS+= 	${PREFIX}/freeswitch/recordings
 
+.include "../../mk/bsd.prefs.mk"
+
+FREESWITCH_USER?=		freeswitch
+FREESWITCH_GROUP?=		freeswitch
+PKG_GROUPS=			${FREESWITCH_GROUP}
+PKG_USERS=			${FREESWITCH_USER}:${FREESWITCH_GROUP}
+PKG_GECOS.${FREESWITCH_USER}=	FreeSWITCH
+PKG_GROUPS_VARS=		FREESWITCH_GROUP
+PKG_USERS_VARS=			FREESWITCH_USER
+
+FREESWITCH_CONFDIR?=	${PREFIX}/etc/freeswitch
+FREESWITCH_DATADIR?=	${PREFIX}/freeswitch
+FREESWITCH_SHAREDIR?=	${PREFIX}/share/freeswitch
+
+PKG_SYSCONFSUBDIR=      freeswitch
+PKG_SYSCONFDIR_PERMS=   ${FREESWITCH_USER} ${FREESWITCH_GROUP} 0755
+
 BUILDLINK_TRANSFORM+= rm:-Werror
 
 post-install:
diff --git a/freeswitch-core/files/freeswitch.sh b/freeswitch-core/files/freeswitch.sh
index fe03c883f7..d901a2a3ee 100755
--- a/freeswitch-core/files/freeswitch.sh
+++ b/freeswitch-core/files/freeswitch.sh
@@ -12,9 +12,9 @@
 #
 . /etc/rc.subr
 name="freeswitch"
-rcvar=${name}_enable
+rcvar=${name}
 load_rc_config $name
-: ${freeswitch_enable="NO"}
+: ${freeswitch="NO"}
 : ${freeswitch_pidfile="${VARBASE}/run/freeswitch/freeswitch.pid"}
 start_cmd=${name}_start
 stop_cmd=${name}_stop


Home | Main Index | Thread Index | Old Index