blob: f181d08c2a14a5620273bd8197a4d5cab84167e7 (
plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# $NetBSD: Makefile,v 1.7 2000/05/12 05:19:09 sakamoto Exp $
#
DISTNAME= locales-2.1-1mdk
PKGNAME= linux-locale-2.1.1
CATEGORIES= emulators
MASTER_SITES= http://www.linuxi18n.org/locales/
EXTRACT_SUFX= .noarch.rpm
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= sakamoto@netbsd.org
HOMEPAGE= http://www.linuxi18n.org/locales/
BUILD_DEPENDS+= rpm2cpio:../../misc/rpm
.include "../../mk/bsd.prefs.mk"
.if !defined(LINUX_LOCALES)
LINUX_LOCALES= \
af ar bg br ca cs cy da de el en eo es et eu fi fo fr ga gl \
he hr hu hy id is it ja ka kl ko lo lt lv nl no oc pl pt ro \
ru sk sl sr sv th tr uk vi wa zh
# fa gd gv iu kw ml ms pd
.endif
.for locale in ${LINUX_LOCALES}
DISTFILES+= locales-${locale}-2.1-1mdk${EXTRACT_SUFX}
.endfor
DIST_SUBDIR= linux-locale
ONLY_FOR_PLATFORM=NetBSD-*-i386
DEPENDS= suse_base-6.3:../../emulators/suse_linux
EXTRACT_ONLY= # empty
NO_PATCH= yes
NO_CONFIGURE= yes
NO_BUILD= yes
EMULSUBDIR= emul/linux
EMULDIR= ${PREFIX}/${EMULSUBDIR}
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
EXCLUDELIST= ${WRKDIR}/EXCLUDE
CPIOLIST= ${WRKDIR}/CPIOLIST
do-install:
@${RM} -f ${CPIOLIST}
@(cd ${EMULDIR}; \
${FIND} usr/share/locale -name "*" > ${EXCLUDELIST})
.for f in ${DISTFILES}
@rpm2cpio ${DISTDIR}/${DIST_SUBDIR}/${f} | \
cpio -t -v -f -E ${EXCLUDELIST} >> ${CPIOLIST}
@(cd ${EMULDIR}; rpm2cpio ${DISTDIR}/${DIST_SUBDIR}/${f} | \
cpio -i -d -f -E ${EXCLUDELIST})
.endfor
post-install:
@${CAT} ${CPIOLIST}|${GREP} "^d"|${SED} -e "s|.* \(usr\/.*\)|@exec ${MKDIR} ${EMULDIR}/\1|"|sort >> ${PLIST_SRC}
@${CAT} ${CPIOLIST}|${GREP} "^-"|${SED} -e "s|.* \(usr\/.*\)|${EMULSUBDIR}/\1|"|sort >> ${PLIST_SRC}
@${CAT} ${CPIOLIST}|${GREP} "^l"|${SED} -e "s|.* \(usr\/.*\) -> \(.*\)|@exec ln -s \2 %D/${EMULSUBDIR}/\1|"|sort >> ${PLIST_SRC}
@${CAT} ${CPIOLIST}|${GREP} "^l"|${SED} -e "s|.* \(usr\/.*\) -> .*|@unexec rm -f %D/${EMULSUBDIR}/\1|"|sort >> ${PLIST_SRC}
@${CAT} ${CPIOLIST}|${GREP} "^d"|${SED} -e "s|.* \(usr\/.*\)|@dirrm ${EMULSUBDIR}/\1|"|sort -r >> ${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"
|