aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/asterisk14-sounds/Makefile
blob: cc9056c25cf956f2eb1dc76387356b5904f163ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# New ports collection makefile for:    asterisk-sounds-jp
# Date created:             27 June 2007
# Whom:     Fumihiko Kimura <jfkimura@yahoo.co.jp>
#
# $FreeBSD$
#

PORTNAME=   asterisk
PORTVERSION=    1.4
PORTREVISION=   7
CATEGORIES= japanese net
MASTER_SITES=   ftp://ftp.voip-info.jp/asterisk/sounds/${PORTVERSION:S|.|_|}/ \
        http://ftp.voip-info.jp/asterisk/sounds/${PORTVERSION:S|.|_|}/
PKGNAMESUFFIX=  -sounds
DISTNAME=   ${PORTNAME}${PKGNAMESUFFIX:S|s$||}-jp_${PORTVERSION:S|.||}_beta

MAINTAINER= jfkimura@yahoo.co.jp
COMMENT=    Japanese sound files for Asterisk

RUN_DEPENDS=    asterisk:${PORTSDIR}/net/asterisk14

NO_BUILD=   yes
ASTERISKDIR=    ${DATADIR}/${PKGNAMESUFFIX:S|-||}
DOCSDIR=    ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
SUB_FILES=  pkg-message
SUB_LIST=   PORTSDIR=${PORTSDIR}

post-extract:
    ${MV} ${WRKDIR}/jp/README.txt ${WRKDIR}

do-install:
    @-${MKDIR} ${ASTERISKDIR}
    @${CP} -pR ${WRKDIR}/jp ${ASTERISKDIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}/ja
    @cd ${WRKDIR} && ${INSTALL_DATA} README.txt ${DOCSDIR}/ja
.endif

post-install:
    @${CAT} ${PKGMESSAGE}

# This target is only meant to be used by the port maintainer.
x-generate-plist:
    @${FIND} ${ASTERISKDIR}/jp -type f -o -type l | ${SORT} | ${SED} -e 's,^${PREFIX}/,,' > pkg-plist.new
    @${FIND} ${ASTERISKDIR}/jp -type d -depth | ${SORT} -r | ${SED} -e 's,^${PREFIX}/,@dirrm ,' >> pkg-plist.new
    @${ECHO} %%PORTDOCS%%%%DOCSDIR%%/ja/README.txt >> pkg-plist.new
    @${ECHO} %%PORTDOCS%%@dirrm %%DOCSDIR%%/ja >> pkg-plist.new
    @${ECHO} %%PORTDOCS%%@dirrm %%DOCSDIR%% >> pkg-plist.new

.include <bsd.port.mk>