diff options
author | jpaetzel <jpaetzel@FreeBSD.org> | 2010-12-18 05:42:33 +0800 |
---|---|---|
committer | jpaetzel <jpaetzel@FreeBSD.org> | 2010-12-18 05:42:33 +0800 |
commit | 33d315e8663d393e7431ccd3b4b9d51974f52878 (patch) | |
tree | 03437fa241a7e9ff7a3218f350bc5f98ce6ba855 | |
parent | 0cd3f5a46e1231e3d22c94fa81363d1019399a80 (diff) | |
download | freebsd-ports-graphics-33d315e8663d393e7431ccd3b4b9d51974f52878.tar.gz freebsd-ports-graphics-33d315e8663d393e7431ccd3b4b9d51974f52878.tar.zst freebsd-ports-graphics-33d315e8663d393e7431ccd3b4b9d51974f52878.zip |
Update to latest version.
Add files to pkg-plist
Add needed user and group if installed standalone
Smarter handling of magic file installed if used standalone
PR: ports/152932
Submitted by: Richard Neese <r.neese@gmail.com>
-rw-r--r-- | misc/freeswitch-scripts/Makefile | 35 | ||||
-rw-r--r-- | misc/freeswitch-scripts/distinfo | 5 | ||||
-rw-r--r-- | misc/freeswitch-scripts/files/pkg-install.in | 35 | ||||
-rw-r--r-- | misc/freeswitch-scripts/pkg-plist | 4 |
4 files changed, 64 insertions, 15 deletions
diff --git a/misc/freeswitch-scripts/Makefile b/misc/freeswitch-scripts/Makefile index 7220e541a02..a1e55697909 100644 --- a/misc/freeswitch-scripts/Makefile +++ b/misc/freeswitch-scripts/Makefile @@ -6,19 +6,22 @@ # PORTNAME= freeswitch-scripts -PORTVERSION= 1.0.6 -PORTREVISION= 1 +PORTVERSION= 201044 CATEGORIES= misc -MASTER_SITES= http://files.freeswitch.org/ +MASTER_SITES= ftp://ftp.secure-computing.net/pub/freeswitch/ \ + ftp://ftp2.secure-computing.net/pub/freeswitch/ DISTNAME= ${BASE_PORTNAME}-${PORTVERSION} +DIST_SUBDIR= ${BASE_PORTNAME} MAINTAINER= r.neese@gmail.com COMMENT= FreeSwitch Scripts -RUN_DEPENDS+= ${LOCALBASE}/bin/freeswitch:${PORTSDIR}/net/freeswitch-core - NO_BUILD= yes BASE_PORTNAME= freeswitch +SUB_FILES= pkg-install + +FREESWITCH_USER= freeswitch +FREESWITCH_GROUP= ${FREESWITCH_USER} WRKSRC= ${WRKDIR}/${BASE_PORTNAME}-${PORTVERSION}/scripts/ @@ -39,41 +42,49 @@ PLIST_SUB+= WITH_${i}="" .endif .endfor -do-install: +pre-install: + @${SH} ${PKGINSTALL} ${BASE_PORTNAME} PRE-INSTALL + +.if ! exists(${PREFIX}/etc/${BASE_PORTNAME}/scripts) + ${MKDIR} ${PREFIX}/etc/${BASE_PORTNAME}/scripts + ${CHOWN} ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts +.endif ${TOUCH} ${PREFIX}/etc/${BASE_PORTNAME}/scripts/.freeswitch-scripts + ${CHOWN} ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts/.freeswitch-scripts +do-install: .if defined(WITH_JAVASCRIPT) @${RM} ${WRKSRC}/javascript/ps_pizza.js @${RM} ${WRKSRC}/javascript/pizza.js @${RM} -rf ${WRKSRC}/javascript/js_modules @cd ${WRKSRC}; ${FIND} javascript \ - | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}/etc/${BASE_PORTNAME}/scripts + | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_PERL) @cd ${WRKSRC}; ${FIND} perl \ - | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}/etc/${BASE_PORTNAME}/scripts + | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_PYTHON) @cd ${WRKSRC}; ${FIND} python \ - | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}/etc/${BASE_PORTNAME}/scripts + | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_PHP) @cd ${WRKSRC}; ${FIND} php \ - | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}/etc/${BASE_PORTNAME}/scripts + | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_RSS) @cd ${WRKSRC}; ${FIND} rss \ - | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}/etc/${BASE_PORTNAME}/scripts + | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_LUA) @cd ${WRKSRC}; ${FIND} lua \ - | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}/etc/${BASE_PORTNAME}/scripts + | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .include <bsd.port.mk> diff --git a/misc/freeswitch-scripts/distinfo b/misc/freeswitch-scripts/distinfo index 7dbf3ccf30e..40ee1bf569a 100644 --- a/misc/freeswitch-scripts/distinfo +++ b/misc/freeswitch-scripts/distinfo @@ -1,3 +1,2 @@ -MD5 (freeswitch-1.0.6.tar.gz) = 388effee587887a81fe7f411b7350590 -SHA256 (freeswitch-1.0.6.tar.gz) = 5610f478307b5c06d38e1ea4029298142c2960e426c3297378857d8734770215 -SIZE (freeswitch-1.0.6.tar.gz) = 36400963 +SHA256 (freeswitch/freeswitch-201044.tar.gz) = cea3583bcc1febc8b6ad85ca38c991d2d7319945784dd915834c1479b33bbd4b +SIZE (freeswitch/freeswitch-201044.tar.gz) = 42320468 diff --git a/misc/freeswitch-scripts/files/pkg-install.in b/misc/freeswitch-scripts/files/pkg-install.in new file mode 100644 index 00000000000..75fa008aa5e --- /dev/null +++ b/misc/freeswitch-scripts/files/pkg-install.in @@ -0,0 +1,35 @@ +#!/bin/sh +# $FreeBSD: /tmp/pcvs/ports/misc/freeswitch-scripts/files/pkg-install.in,v 1.1 2010-12-17 21:42:33 jpaetzel Exp $ +# + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +FREESWITCHUSER=freeswitch +FREESWITCHGROUP=${FREESWITCHUSER} +FREESWITCHUID=610 +FREESWITCHGID=${FREESWITCHUID} + +if ! pw groupshow "${FREESWITCHGROUP}" 2>/dev/null 1>&2; then + if pw groupadd ${FREESWITCHGROUP} -g ${FREESWITCHGID}; then + echo "Added group \"${FREESWITCHGROUP}\"." + else + echo "Adding group \"${FREESWITCHGROUP}\" failed..." + exit 1 + fi +fi + +if ! pw usershow "${FREESWITCHUSER}" 2>/dev/null 1>&2; then + if pw useradd ${FREESWITCHUSER} -u ${FREESWITCHUID} -g ${FREESWITCHGROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "FREESWITCH Owner"; \ + then + echo "Added user \"${FREESWITCHUSER}\"." + else + echo "Adding user \"${FREESWITCHUSER}\" failed..." + exit 1 + fi +fi + +exit 0 diff --git a/misc/freeswitch-scripts/pkg-plist b/misc/freeswitch-scripts/pkg-plist index 5bb8ae759d0..3c7a518c155 100644 --- a/misc/freeswitch-scripts/pkg-plist +++ b/misc/freeswitch-scripts/pkg-plist @@ -29,12 +29,14 @@ etc/freeswitch/scripts/.freeswitch-scripts %%WITH_PERL%%etc/freeswitch/scripts/perl/POE-Filter-FSSocket/examples/poetest.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/POE-Filter-FSSocket/lib/POE/Filter/FSSocket.pm %%WITH_PERL%%etc/freeswitch/scripts/perl/POE-Filter-FSSocket/t/01_basic.t +%%WITH_PERL%%etc/freeswitch/scripts/perl/blacklist.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/call.cgi %%WITH_PERL%%etc/freeswitch/scripts/perl/combineconf.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/dhcp-inform.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/extract_log_range.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/fs.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/fsconsole.pl +%%WITH_PERL%%etc/freeswitch/scripts/perl/honeypot.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/multicast/recv.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/multicast/send.pl %%WITH_PERL%%etc/freeswitch/scripts/perl/mwi_event.pl @@ -88,3 +90,5 @@ etc/freeswitch/scripts/.freeswitch-scripts %%WITH_LUA%%@dirrm etc/freeswitch/scripts/lua %%WITH_JAVASCRIPT%%@dirrm etc/freeswitch/scripts/javascript/aadir %%WITH_JAVASCRIPT%%@dirrm etc/freeswitch/scripts/javascript +@dirrmtry etc/freeswitch/scripts +@dirrmtry etc/freeswitch |