Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 2010 08:59:36 -0500 (CDT)
From:      Eric F Crist <ecrist@secure-computing.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Josh Paetzel <jpaetzel@FreeBSD.org>
Subject:   ports/149526: audio/freeswitch-sounds: update to Makefile
Message-ID:  <20100811135936.230EB6D437@cartman.secure-computing.net>
Resent-Message-ID: <201008111400.o7BE0JPm039427@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         149526
>Category:       ports
>Synopsis:       audio/freeswitch-sounds: update to Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 11 14:00:19 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Eric F Crist
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
Secure Computing Networks
>Environment:
System: FreeBSD cartman.secure-computing.net 9.0-CURRENT FreeBSD 9.0-CURRENT #2: Mon Apr 12 12:46:23 CDT 2010 root@cartman.secure-computing.net:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	This update helps this port fit better with the schema required for the freeswitch meta port to funciton properly.

>How-To-Repeat:
>Fix:

--- fs-sounds.diff begins here ---
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	11 Aug 2010 13:48:57 -0000
@@ -5,20 +5,21 @@
 # $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@secure-computing.net
-COMMENT=        FreeSwitch Sounds (All Bitrates)
+MAINTAINER=	ecrist@secure-computing.net
+COMMENT=	FreeSwitch Sounds (All Bitrates)
 
-PLIST= ${WRKDIR}/plist
-NO_WRKSUBDIR=   yes
+PLIST=		${WRKDIR}/plist
+NO_WRKSUBDIR=	yes
 
-OPTIONS=        8K           "Compile sounds for 8K" on \
+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 +28,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 \
@@ -68,9 +67,9 @@
 			else \
 				for dir in `ls ${WRKSRC}/en/us/callie/`; do \
 					${MKDIR} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/; \
-					echo "@rmdir ${LOCALBASE}/share/freeswitch/sounds/en/us/callie/$${dir}/$${rate}/" >> ${PLIST}; \
+					echo "@rmdir share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/" >> ${PLIST}; \
 					for filename in `ls ${WRKSRC}/en/us/callie/$${dir}/48000`; do \
-						echo "${LOCALBASE}/share/freeswitch/sounds/en/us/callie/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
+						echo "share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
 						if [ ! -e "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" ]; then \
 							${ECHO_MSG} "${LOCALBASE}/bin/sox -v 0.2 ${WRKSRC}/en/us/callie/$${dir}/48000/$${filename} -r $${rate} -c 1 ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
 							${LOCALBASE}/bin/sox -v 0.2 "${WRKSRC}/en/us/callie/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
@@ -89,9 +88,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 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 "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}"; \
@@ -107,16 +106,16 @@
 	@${RM} -rf ${PLIST}
 	@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};
+	${SED} -i "" -e "s:^:share/${BASE_PORTNAME}/sounds/:" ${PLIST}; \
+	${FIND} * -type d ! -empty | ${SORT} -r | ${SED} -e "s:^:@dirrm share/${BASE_PORTNAME}/sounds/:" | ${GREP} / >> ${PLIST}; \
+	${ECHO} "@dirrmtry share/${BASE_PORTNAME}/sounds 2> /dev/null || /usr/bin/true" >> ${PLIST}; \
+	${ECHO} "@dirrmtry 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/)
+	${MKDIR} ${PREFIX}/share/${BASE_PORTNAME}/sounds
+	${TOUCH} ${PREFIX}/share/${BASE_PORTNAME}/sounds/.freeswitch-sounds
+	(cd ${WRKDIR}/tmp/ &&${COPYTREE_SHARE} \* ${PREFIX}/share/${BASE_PORTNAME}/sounds/)
 
 .include <bsd.port.mk>
--- fs-sounds.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100811135936.230EB6D437>