ports/148759: update for freeswitch-sounds
Richard Neese
r.neese at gmail.com
Mon Jul 19 15:20:01 UTC 2010
>Number: 148759
>Category: ports
>Synopsis: update for freeswitch-sounds
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 19 15:20:00 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Richard Neese
>Release: 8.1-rc2
>Organization:
>Environment:
FreeBSD daemonswitch.homeip.net 8.1-RC2 FreeBSD 8.1-RC2 #2: Wed Jul 14 20:44:20 EDT 2010 root at daemonswitch.homeip.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
update to fix freeswitch-sounds to work with the meta port
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/audio/freeswitch-sounds/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile 11 Jun 2010 22:33:44 -0000 1.1
+++ Makefile 19 Jul 2010 13:29:45 -0000
@@ -5,20 +5,23 @@
# $FreeBSD: ports/audio/freeswitch-sounds/Makefile,v 1.1 2010/06/11 22:33:44 jpaetzel Exp $
#
-PORTNAME= freeswitch
-PORTVERSION= 1.0.13
-CATEGORIES= audio
+PORTNAME= freeswitch-sounds
+PORTVERSION= 1.0.13
+CATEGORIES= audio
MASTER_SITES= http://files.freeswitch.org/
-PKGNAMESUFFIX= -sounds
-DIST_SUBDIR= freeswitch-sounds
+DIST_SUBDIR= freeswitch-sounds
-MAINTAINER= ecrist at secure-computing.net
-COMMENT= FreeSwitch Sounds (All Bitrates)
+MAINTAINER= ecrist at secure-computing.net
+COMMENT= FreeSwitch Sounds (All Bitrates)
-PLIST= ${WRKDIR}/plist
-NO_WRKSUBDIR= yes
+RUN_DEPENDS+= ${LOCALBASE}/bin/freeswitch:${PORTSDIR}/net/freeswitch-core
-OPTIONS= 8K "Compile sounds for 8K" on \
+PLIST= ${WRKDIR}/plist
+NO_WRKSUBDIR= yes
+
+BASE_PORTNAME= freeswitch
+
+OPTIONS= 8K "Compile sounds for 8K" on \
16K "Compile sounds for 16K" on \
32K "Compile sounds for 32K" on \
48K "Compile sounds for 48K" on \
@@ -27,37 +30,35 @@
.include <bsd.port.options.mk>
.if defined(WITH_ENGLISH)
-DISTFILES+= ${PORTNAME}${PKGNAMESUFFIX}-en-us-callie-48000-${PORTVERSION}${EXTRACT_SUFX}
+DISTFILES+= ${PORTNAME}-en-us-callie-48000-${PORTVERSION}${EXTRACT_SUFX}
.endif
.if defined(WITH_RUSSIAN)
-DISTFILES+= ${PORTNAME}${PKGNAMESUFFIX}-ru-RU-elena-48000-1.0.12${EXTRACT_SUFX}
+DISTFILES+= ${PORTNAME}-ru-RU-elena-48000-1.0.12${EXTRACT_SUFX}
.endif
.if ! defined(WITH_ENGLISH) && ! defined(WITH_RUSSIAN)
-BROKEN= "You must build with either English, Russian, or both"
+BROKEN= you must build with either English, Russian, or both
.endif
.if ! defined(WITH_8K) && ! defined(WITH_16K) && ! defined(WITH_32K) && \
! defined(WITH_48K)
-BROKEN= "You must build with at least one of 8K, 16K, 32K, or 48K sounds"
+BROKEN= you must build with at least one of 8K, 16K, 32K, or 48K sounds
.endif
.if defined(WITH_8K)
-BUILD_DEPENDS+= sox:${PORTSDIR}/audio/sox
-BITRATES+= 8000
+BUILD_DEPENDS+= sox:${PORTSDIR}/audio/sox
+BITRATES+= 8000
.endif
.if defined(WITH_16K)
-BUILD_DEPENDS+= sox:${PORTSDIR}/audio/sox
-BITRATES+= 16000
+BUILD_DEPENDS+= sox:${PORTSDIR}/audio/sox
+BITRATES+= 16000
.endif
.if defined(WITH_32K)
-BUILD_DEPENDS+= sox:${PORTSDIR}/audio/sox
-BITRATES+= 32000
+BUILD_DEPENDS+= sox:${PORTSDIR}/audio/sox
+BITRATES+= 32000
.endif
.if defined(WITH_48K)
-BITRATES+= 48000
+BITRATES+= 48000
.endif
-#RUN_DEPENDS+= freeswitch:${PORTSDIR}/net/freeswitch-core
-
do-build:
@${ECHO_MSG} "Building for bitrates: ${BITRATES}"
if [ "${WITH_ENGLISH}" != "" -a ! -e "${WRKDIR}/ENGLISH.done" ]; then \
@@ -89,9 +90,9 @@
else \
for dir in `ls ${WRKSRC}/ru/RU/elena/`; do \
${MKDIR} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/; \
- echo "@rmdir ${DATADIR}/sounds/ru/RU/elena/$${dir}/$${rate}/" >> ${PLIST}; \
+ echo "@rmdir ${PREFIX}share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/" >> ${PLIST}; \
for filename in `ls ${WRKSRC}/ru/RU/elena/$${dir}/48000`; do \
- echo "${DATADIR}/sounds/ru/RU/elena/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
+ echo "${PREFIX}share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
if [ ! -e "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}" ]; then \
${ECHO_MSG} "${LOCALBASE}/bin/sox -v 0.2 ${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename} -r $${rate} -c 1 ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
${LOCALBASE}/bin/sox -v 0.2 "${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
@@ -108,15 +109,15 @@
@cd ${WRKDIR}/tmp && ${FIND} * ! -type d | ${SORT} >> ${PLIST}; \
${ECHO} .freeswitch-sounds >> ${PLIST}; \
${SED} -i "" -e "s:^:%%DATADIR%%/sounds/:" ${PLIST}; \
- ${FIND} * -type d ! -empty | ${SORT} -r | ${SED} -e "s:^:@dirrm %%DATADIR%%/sounds/:" | ${GREP} / >> ${PLIST}; \
- ${ECHO} "@dirrmtry %%DATADIR%%/sounds 2> /dev/null || /usr/bin/true" >> ${PLIST}; \
- ${ECHO} "@dirrmtry %%DATADIR%% 2> /dev/null || /usr/bin/true" >> ${PLIST};
+ ${FIND} * -type d ! -empty | ${SORT} -r | ${SED} -e "s:^:@dirrm ${PREFIX}share/${BASE_PORTNAME}/sounds/:" | ${GREP} / >> ${PLIST}; \
+ ${ECHO} "@dirrmtry ${PREFIX}share/${BASE_PORTNAME}/sounds 2> /dev/null || /usr/bin/true" >> ${PLIST}; \
+ ${ECHO} "@dirrmtry ${PREFIX}share/${BASE_PORTNAME} 2> /dev/null || /usr/bin/true" >> ${PLIST};
${CHMOD} -R 0755 ${WRKDIR}/tmp/
do-install:
@${ECHO_MSG} "Installing files..."
- ${MKDIR} ${DATADIR}/sounds
- ${TOUCH} ${DATADIR}/sounds/.freeswitch-sounds
- (cd ${WRKDIR}/tmp/ &&${COPYTREE_SHARE} \* ${DATADIR}/sounds/)
+ ${TOUCH} ${PREFIX}share/${BASE_PORTNAME}/sounds/.freeswitch-sounds
+ @cd ${WRKSRC}/tmp; ${FIND} . \
+ | ${CPIO} -pdm -R freeswitch:freeswitch ${PREFIX}share/${BASE_PORTNAME}/sounds/
.include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list