From c0ef8053b996b092aac718193b5cd56de594ca1e Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Thu, 13 Dec 2012 04:31:58 +0000 Subject: [PATCH] - Add LICENSE. - Add MAKE_JOBS_SAFE. - Support USE_READLINE. - Support PORTDOCS. - Trim header. PR: ports/171961 Submitted by: KATO Tsuguru --- audio/icecast/Makefile | 54 ++++++++++++++++++++++++----------------- audio/icecast/pkg-plist | 54 ++++++++++++++++++++--------------------- 2 files changed, 59 insertions(+), 49 deletions(-) diff --git a/audio/icecast/Makefile b/audio/icecast/Makefile index 08f4335e9ac4..eafc052eab4e 100644 --- a/audio/icecast/Makefile +++ b/audio/icecast/Makefile @@ -1,9 +1,5 @@ -# New ports collection makefile for: icecast -# Date created: 28 Jan 1999 -# Whom: Chip Marshall -# +# Created by: Chip Marshall # $FreeBSD$ -# PORTNAME= icecast PORTVERSION= 1.3.12 @@ -14,32 +10,46 @@ MASTER_SITES= http://downloads.xiph.org/releases/icecast/ MAINTAINER= ports@FreeBSD.org COMMENT= A streaming mp3 audio server -HAS_CONFIGURE= yes +LICENSE= GPLv2 # (or later) + +OPTIONS_DEFINE= DOCS + +USE_READLINE= yes +GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-libwrap +MAKE_JOBS_SAFE= yes + +CPPFLAGS+= ${PTHREAD_CFLAGS} +LDFLAGS+= ${PTHREAD_LIBS} + SUB_FILES= pkg-message +.include + pre-patch: - @${REINPLACE_CMD} -e 's|||' \ - -e 's|||' \ - ${WRKSRC}/src/admin.c - @${REINPLACE_CMD} -e 's|#undef HAVE_HISTORY_H|#undef HAVE_READLINE_HISTORY_H|g' \ - ${WRKSRC}/config.h.in + @${REINPLACE_CMD} -e \ + 's||| ; \ + s|||' ${WRKSRC}/src/admin.c + @${REINPLACE_CMD} -e \ + 's|HAVE_HISTORY_H|HAVE_READLINE_HISTORY_H|g' ${WRKSRC}/config.h.in do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/icecast ${PREFIX}/sbin - ${MKDIR} ${PREFIX}/etc/icecast/conf - ${MKDIR} ${PREFIX}/etc/icecast/templates + @${MKDIR} ${ETCDIR}/conf .for CONF in groups.aut.dist icecast.conf.dist mounts.aut.dist users.aut.dist - ${INSTALL_DATA} ${WRKSRC}/conf/${CONF} ${PREFIX}/etc/icecast/conf + ${INSTALL_DATA} ${WRKSRC}/conf/${CONF} ${ETCDIR}/conf .endfor -.for TEMPL in 306.html 400.html 403.html 404.html 504.html bodytag.html info.html \ - list_directory.html mountlist.html statistics.html admin_describe.html \ - admin.html alias_add.html manual.html alias_del.html header.html \ - footer.html admin_change.html - ${INSTALL_DATA} ${WRKSRC}/templates/${TEMPL} ${PREFIX}/etc/icecast/templates + @${MKDIR} ${ETCDIR}/templates +.for TEMPL in 306.html 400.html 403.html 404.html 504.html bodytag.html \ + info.html list_directory.html mountlist.html statistics.html \ + admin_describe.html admin.html alias_add.html manual.html \ + alias_del.html header.html footer.html admin_change.html + ${INSTALL_DATA} ${WRKSRC}/templates/${TEMPL} ${ETCDIR}/templates .endfor - ${MKDIR} ${PREFIX}/share/doc/icecast/ - ${INSTALL_DATA} ${WRKSRC}/doc/manual.html ${PREFIX}/share/doc/icecast/ - @${CAT} ${PKGMESSAGE} | ${SED} -e 's,%%PREFIX%%,${PREFIX},g' +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/manual.html ${DOCSDIR} +.endif + @${CAT} ${PKGMESSAGE} .include diff --git a/audio/icecast/pkg-plist b/audio/icecast/pkg-plist index 78d6b10be701..5f0a48c34808 100644 --- a/audio/icecast/pkg-plist +++ b/audio/icecast/pkg-plist @@ -1,28 +1,28 @@ -etc/icecast/conf/groups.aut.dist -etc/icecast/conf/icecast.conf.dist -etc/icecast/conf/mounts.aut.dist -etc/icecast/conf/users.aut.dist -etc/icecast/templates/306.html -etc/icecast/templates/400.html -etc/icecast/templates/403.html -etc/icecast/templates/404.html -etc/icecast/templates/504.html -etc/icecast/templates/admin.html -etc/icecast/templates/admin_change.html -etc/icecast/templates/admin_describe.html -etc/icecast/templates/alias_add.html -etc/icecast/templates/alias_del.html -etc/icecast/templates/bodytag.html -etc/icecast/templates/footer.html -etc/icecast/templates/header.html -etc/icecast/templates/info.html -etc/icecast/templates/list_directory.html -etc/icecast/templates/manual.html -etc/icecast/templates/mountlist.html -etc/icecast/templates/statistics.html +%%ETCDIR%%/conf/groups.aut.dist +%%ETCDIR%%/conf/icecast.conf.dist +%%ETCDIR%%/conf/mounts.aut.dist +%%ETCDIR%%/conf/users.aut.dist +%%ETCDIR%%/templates/306.html +%%ETCDIR%%/templates/400.html +%%ETCDIR%%/templates/403.html +%%ETCDIR%%/templates/404.html +%%ETCDIR%%/templates/504.html +%%ETCDIR%%/templates/admin.html +%%ETCDIR%%/templates/admin_change.html +%%ETCDIR%%/templates/admin_describe.html +%%ETCDIR%%/templates/alias_add.html +%%ETCDIR%%/templates/alias_del.html +%%ETCDIR%%/templates/bodytag.html +%%ETCDIR%%/templates/footer.html +%%ETCDIR%%/templates/header.html +%%ETCDIR%%/templates/info.html +%%ETCDIR%%/templates/list_directory.html +%%ETCDIR%%/templates/manual.html +%%ETCDIR%%/templates/mountlist.html +%%ETCDIR%%/templates/statistics.html sbin/icecast -%%DOCSDIR%%/manual.html -@dirrm etc/icecast/conf -@dirrm etc/icecast/templates -@dirrm etc/icecast -@dirrm %%DOCSDIR%% +%%PORTDOCS%%%%DOCSDIR%%/manual.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%ETCDIR%%/templates +@dirrm %%ETCDIR%%/conf +@dirrm %%ETCDIR%%