diff --git a/net/Makefile b/net/Makefile index e055f562a0d8..f6d12dc49985 100644 --- a/net/Makefile +++ b/net/Makefile @@ -165,6 +165,7 @@ SUBDIR += ggsd SUBDIR += ghtool SUBDIR += gicq + SUBDIR += gini SUBDIR += gkrellm_snmp SUBDIR += gkrellmqst SUBDIR += gkrellmwireless diff --git a/net/gini/Makefile b/net/gini/Makefile new file mode 100644 index 000000000000..e70cabf66658 --- /dev/null +++ b/net/gini/Makefile @@ -0,0 +1,38 @@ +# New ports collection makefile for: GINI +# Date created: 23 April 2003 +# Whom: Kimura Fuyuki +# +# $FreeBSD$ +# + +PORTNAME= gini +PORTVERSION= 0.5.1 +CATEGORIES= net multimedia +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} + +MAINTAINER= fuyuki@hadaly.org +COMMENT= A lightweight media streaming server + +LIB_DEPENDS= vorbis.2:${PORTSDIR}/audio/libvorbis + +USE_BZIP2= yes +USE_GNOME= glib12 +GNU_CONFIGURE= yes +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" +USE_GMAKE= yes + +MAN1= ginicon.1 ginifeed.1 +MAN8= gini.8 + +pre-install: + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + +post-install: + ${INSTALL_SCRIPT} ${FILESDIR}/gini.sh.sample ${PREFIX}/etc/rc.d +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif + +.include diff --git a/net/gini/distinfo b/net/gini/distinfo new file mode 100644 index 000000000000..cbde6a5611d3 --- /dev/null +++ b/net/gini/distinfo @@ -0,0 +1 @@ +MD5 (gini-0.5.1.tar.bz2) = 4b925392f0b44bcd561aea03f312057e diff --git a/net/gini/files/gini.sh.sample b/net/gini/files/gini.sh.sample new file mode 100644 index 000000000000..4a2658c40a1e --- /dev/null +++ b/net/gini/files/gini.sh.sample @@ -0,0 +1,23 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + if [ -x ${PREFIX}/sbin/gini ]; then + su -m gini -c "cd /var/log/gini && ${PREFIX}/sbin/gini -z >/dev/null" \ + && echo -n ' gini' + fi + ;; +stop) + killall gini && echo -n ' gini' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/net/gini/pkg-descr b/net/gini/pkg-descr new file mode 100644 index 000000000000..4168bee0bd4c --- /dev/null +++ b/net/gini/pkg-descr @@ -0,0 +1,5 @@ +GINI is a lightweight, mostly Icecast/Shoutcast compatible streaming +server for broadcasting Ogg Vorbis, MP3, RIFF AVI, ASF/WMV, QuickTime +and RealMedia format files. + +WWW: http://gini.sourceforge.net/ diff --git a/net/gini/pkg-install b/net/gini/pkg-install new file mode 100644 index 000000000000..1024c4cc7230 --- /dev/null +++ b/net/gini/pkg-install @@ -0,0 +1,37 @@ +#!/bin/sh + +LOGDIR=/var/log/gini + +case $2 in +PRE-INSTALL) + USER=gini + GROUP=${USER} + + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -g ${GROUP} -h - \ + -s /sbin/nologin -d /nonexistent -c 'GINI streaming server' + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + mkdir -p ${LOGDIR} + chown -R gini:gini ${LOGDIR} + ;; +esac diff --git a/net/gini/pkg-plist b/net/gini/pkg-plist new file mode 100644 index 000000000000..bcb7b0052be9 --- /dev/null +++ b/net/gini/pkg-plist @@ -0,0 +1,6 @@ +bin/ginicon +bin/ginifeed +etc/rc.d/gini.sh.sample +sbin/gini +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%%