2004-04-16 15:13:30 +02:00
# Ports collection makefile for: slimserver
# Date created: Wed Apr 14, 2004
# Whom: Brooks Davis <brooks@freebsd.org>
#
# $FreeBSD$
#
PORTNAME = slimserver
2004-10-20 02:52:23 +02:00
PORTVERSION ?= 5.3.1
2004-04-16 15:13:30 +02:00
CATEGORIES = audio
2004-09-23 07:21:42 +02:00
MASTER_SITES = http://www.slimdevices.com/downloads/${ NIGHTLY } SlimServer_v${ DISTVERSION } /
DISTNAME = SlimServer_v${ DISTVERSION }
2004-04-16 15:13:30 +02:00
MAINTAINER = brooks@FreeBSD.org
COMMENT = Slim Devices audio streaming server
2004-09-23 07:21:42 +02:00
DISTVERSION ?= ${ PORTVERSION }
2004-04-16 15:13:30 +02:00
RUN_DEPENDS += ${ LOCALBASE } /bin/mDNSResponderPosix:${ PORTSDIR } /net/mDNSResponder \
${ SITE_PERL } /Audio/Wav.pm:${ PORTSDIR } /audio/p5-Audio-Wav \
2004-09-23 07:21:42 +02:00
${ SITE_PERL } /MP3/Info.pm:${ PORTSDIR } /audio/p5-MP3-Info \
${ SITE_PERL } /${ PERL_ARCH } /MIME/Base64.pm:${ PORTSDIR } /converters/p5-MIME-Base64 \
${ SITE_PERL } /Data/Page.pm:${ PORTSDIR } /databases/p5-Data-Page \
${ SITE_PERL } /DBIx/ContextualFetch.pm:${ PORTSDIR } /databases/p5-DBIx-ContextualFetch \
${ SITE_PERL } /Ima/DBI.pm:${ PORTSDIR } /databases/p5-Ima-DBI \
2004-04-16 15:13:30 +02:00
${ SITE_PERL } /Class/Accessor.pm:${ PORTSDIR } /devel/p5-Class-Accessor \
${ SITE_PERL } /File/Spec.pm:${ PORTSDIR } /devel/p5-File-Spec \
${ SITE_PERL } /IO/String.pm:${ PORTSDIR } /devel/p5-IO-String \
2004-09-23 07:21:42 +02:00
${ SITE_PERL } /${ PERL_ARCH } /Time/HiRes.pm:${ PORTSDIR } /devel/p5-Time-HiRes \
2004-04-16 15:13:30 +02:00
${ SITE_PERL } /${ PERL_ARCH } /Net/DNS.pm:${ PORTSDIR } /dns/p5-Net-DNS \
2004-09-23 07:21:42 +02:00
${ SITE_PERL } /File/Which.pm:${ PORTSDIR } /sysutils/p5-File-Which \
${ SITE_PERL } /XML/NamespaceSupport.pm:${ PORTSDIR } /textproc/p5-XML-NamespaceSupport \
${ SITE_PERL } /XML/SAX.pm:${ PORTSDIR } /textproc/p5-XML-SAX \
${ SITE_PERL } /XML/Simple.pm:${ PORTSDIR } /textproc/p5-XML-Simple \
${ SITE_PERL } /LWP.pm:${ PORTSDIR } /www/p5-libwww \
${ SITE_PERL } /${ PERL_ARCH } /Template.pm:${ PORTSDIR } /www/p5-Template-Toolkit
2004-04-16 15:13:30 +02:00
. i n c l u d e < b s d . p o r t . p r e . m k >
. i f $ { O S V E R S I O N } < 5 0 2 1 1 0
RUN_DEPENDS += ${ LOCALBASE } /bin/pgrep:${ PORTSDIR } /sysutils/pkill
2004-05-04 00:59:03 +02:00
PGREPBASE = ${ LOCALBASE }
. e l s e
PGREPBASE = /usr
2004-04-16 15:13:30 +02:00
. e n d i f
USE_RC_SUBR = yes
2004-09-23 07:21:42 +02:00
TMP_SLIMDIR = ${ WRKDIR } /slimserver
TMP_DOCSDIR = ${ WRKDIR } /doc
2004-04-16 15:13:30 +02:00
DOCFILES = Changelog.html Installation.txt
2004-05-04 00:59:03 +02:00
EXCEPTFILES = ${ DOCFILES }
2004-04-16 15:13:30 +02:00
EXCEPTDIRS = Bin \
CPAN/arch \
CPAN/Audio/Wav \
2004-09-23 07:21:42 +02:00
CPAN/Bundle \
2004-04-16 15:13:30 +02:00
CPAN/Class \
2004-09-23 07:21:42 +02:00
CPAN/Data \
CPAN/DBIx \
2004-04-16 15:13:30 +02:00
CPAN/File \
2004-05-04 00:59:03 +02:00
CPAN/HTML \
2004-04-16 15:13:30 +02:00
CPAN/HTTP \
2004-09-23 07:21:42 +02:00
CPAN/Ima \
2004-04-16 15:13:30 +02:00
CPAN/IO \
CPAN/LWP \
CPAN/MIME \
CPAN/MP3 \
CPAN/Net \
2004-05-04 00:59:03 +02:00
CPAN/Template \
2004-09-23 07:21:42 +02:00
CPAN/URI \
CPAN/XML
2004-04-16 15:13:30 +02:00
CPIOARGS = --quiet -pdum -R
2004-09-23 07:21:42 +02:00
PLIST = ${ WRKDIR } /pkg-plist
2004-04-16 15:13:30 +02:00
PLIST_SUB = SLIMDIR = ${ SLIMDIR }
SED_SCRIPT += -e 's,%%PREFIX%%,${PREFIX},g' \
2004-05-04 00:59:03 +02:00
-e 's,%%PGREPBASE%%,${PGREPBASE},g' \
2004-04-16 15:13:30 +02:00
-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
-e 's,%%SLIMDIR%%,${SLIMDIR},g'
pre-fetch :
. i f ! d e f i n e d ( S L I M D I R )
@${ ECHO_MSG } ""
2004-05-04 00:59:03 +02:00
@${ ECHO_MSG } "Define SLIMDIR to override default of 'slimserver'."
2004-04-16 15:13:30 +02:00
@${ ECHO_MSG } ""
. e n d i f
post-patch :
@${ SED } ${ SED_SCRIPT } <${ FILESDIR } /slimserver.sh >${ WRKDIR } /slimserver.sh
SLIMDIR ?= slimserver
pre-install :
2004-09-23 07:21:42 +02:00
@${ SH } ${ PKGINSTALL } ${ PKGNAME } PRE-INSTALL
2004-04-16 15:13:30 +02:00
2004-09-23 07:21:42 +02:00
do-build :
@${ MKDIR } -m 0755 ${ TMP_SLIMDIR }
2004-04-16 15:13:30 +02:00
@cd ${ WRKSRC } && \
${ FIND } . -name \* .orig ${ EXCEPTFILES : S /^/-o -name / } \
${ EXCEPTDIRS : S / $/ \* / : S /^/-o -path . \/ / } -o -print | \
2004-09-23 07:21:42 +02:00
${ CPIO } ${ CPIOARGS } ${ BINOWN } :${ BINGRP } ${ TMP_SLIMDIR }
. i f ! d e f i n e d ( N O P O R T D O C S )
@${ MKDIR } ${ TMP_DOCSDIR }
@cd ${ WRKSRC } && ${ INSTALL_DATA } ${ DOCFILES } ${ TMP_DOCSDIR }
. e n d i f
@${ ECHO } " etc/rc.d/slimserver ${ PKGNAMESUFFIX } .sh " > ${ PLIST }
. i f ! d e f i n e d ( N O P O R T D O C S )
@${ FIND } ${ TMP_DOCSDIR } -type f | \
${ SED } -e 's|${TMP_DOCSDIR}|%%DOCSDIR%%|' | \
${ SORT } >> ${ PLIST }
. e n d i f
@${ FIND } ${ TMP_SLIMDIR } /* -type f | \
${ SED } -e 's|${TMP_SLIMDIR}|%%SLIMDIR%%|' | \
${ SORT } >> ${ PLIST }
@${ ECHO } " ${ SLIMDIR } /Cache " >> ${ PLIST }
@${ FIND } ${ TMP_SLIMDIR } -type d | \
${ SED } -e 's|${TMP_SLIMDIR}|@dirrm %%SLIMDIR%%|' | \
${ SORT } -r >> ${ PLIST }
. i f ! d e f i n e d ( N O P O R T D O C S )
@${ FIND } ${ TMP_DOCSDIR } -type d | \
${ SED } -e 's|${TMP_DOCSDIR}|@dirrm %%DOCSDIR%%|' | \
${ SORT } -r >> ${ PLIST }
. e n d i f
@${ ECHO } '@unexec rmdir /var/db/slimserver 2>/dev/null || (echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove /var/db/slimserver and its contents manually.")' >> ${ PLIST }
do-install :
@${ MKDIR } -m 0755 ${ PREFIX } /${ SLIMDIR }
@${ LN } -s /var/db/slimserver/cache ${ PREFIX } /${ SLIMDIR } /Cache
@cd ${ TMP_SLIMDIR } && \
${ FIND } . | \
2004-04-16 15:13:30 +02:00
${ CPIO } ${ CPIOARGS } ${ BINOWN } :${ BINGRP } ${ PREFIX } /${ SLIMDIR }
2004-09-23 07:21:42 +02:00
@${ INSTALL_SCRIPT } ${ WRKDIR } /slimserver.sh \
${ PREFIX } /etc/rc.d/slimserver${ PKGNAMESUFFIX } .sh
2004-04-16 15:13:30 +02:00
. i f ! d e f i n e d ( N O P O R T D O C S )
@${ MKDIR } ${ DOCSDIR }
2004-09-23 07:21:42 +02:00
@cd ${ TMP_DOCSDIR } && \
${ FIND } . | \
${ CPIO } ${ CPIOARGS } ${ BINOWN } :${ BINGRP } ${ DOCSDIR }
2004-04-16 15:13:30 +02:00
. e n d i f
post-install :
2004-09-23 07:21:42 +02:00
@${ SH } ${ PKGINSTALL } ${ PKGNAME } POST-INSTALL
2004-05-04 00:59:03 +02:00
@${ ECHO }
@${ CAT } ${ PKGMESSAGE }
2004-04-16 15:13:30 +02:00
. i n c l u d e < b s d . p o r t . p o s t . m k >