blob: 0812f8b9313e6cdc1275f249edce9d0d821caf79 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# New ports collection makefile for: zh-firefox-zh_TW
# Date created: 2005/06/25
# Whom: chinsan <chinsan.tw@gmail.com>
#
# $FreeBSD$
#
PORTNAME= firefox
PORTVERSION= 1.0.4
CATEGORIES= chinese www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTVERSION}/win32/xpi/
PKGNAMESUFFIX= -zh_TW
DISTNAME= zh-TW
EXTRACT_SUFX= .xpi
# Maintainership available: drop me a line if interested :p
MAINTAINER= chinsan.tw@gmail.com
COMMENT= Firefox Traditional Chinese(zh-TW) Language Pack
BUILD_DEPENDS= ${X11BASE}/lib/${FIREFOX}/regxpcom:${PORTSDIR}/www/${FIREFOX}
RUN_DEPENDS= ${FIREFOX}:${PORTSDIR}/www/${FIREFOX}
USE_X_PREFIX= yes
USE_ZIP= yes
EXTRACT_BEFORE_ARGS= -qo
FIREFOX= ${PORTNAME}
FIREFOX_HOME= ${PREFIX}/lib/${FIREFOX}
REGXPCOM= ${FIREFOX_HOME}/regxpcom
REGCHROME= ${FIREFOX_HOME}/regchrome
FIREFOX_BIN= ${FIREFOX_HOME}/${PORTNAME}-bin
PLIST_SUB= FIREFOX=${FIREFOX}
.include <bsd.port.pre.mk>
LOCALENAME= zh_TW.UTF-8
do-build:
${SED} -e "s^%%PREFIX%%^${PREFIX}^g" \
-e "s^%%LOCALBASE%%^${LOCALBASE}^g" \
-e "s^%%LOCALENAME%%^${LOCALENAME}^g" \
-e "s^%%FIREFOX%%^${FIREFOX}^g" \
${FILESDIR}/firefox.sh > ${WRKDIR}/${FIREFOX}
do-install:
echo "===> Backup setting files..."
(cd ${FIREFOX_HOME}/chrome; \
${MV} -f chrome.rdf chrome.rdf.orig; \
${MV} -f installed-chrome.txt installed-chrome.txt.orig)
echo "===> Copying locale files..."
(cd ${WRKDIR}; ${TAR} -cf - chrome) | \
${TAR} -xf - -C ${FIREFOX_HOME}
echo "===> Copying locale setting file..."
(cd ${FIREFOX_HOME}/chrome; \
${CP} installed-chrome.txt.orig installed-chrome.txt; \
${CAT} ${FILESDIR}/installed-chrome.txt >> installed-chrome.txt)
echo "===> Cleaning Chrome's registry..."
${RM} -rf ${FIREFOX_HOME}/chrome/overlayinfo
${RM} -f ${FIREFOX_HOME}/chrome/*.rdf
${MKDIR} ${FIREFOX_HOME}/chrome/overlayinfo
${RM} -f ${FIREFOX_HOME}/component.reg
${RM} -rf ${FIREFOX_HOME}/extensions
echo "===> Building Chrome's registry..."
(cd ${FIREFOX_HOME} || exit 1 ; \
./run-mozilla.sh ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. \
${REGXPCOM} || true ; \
./run-mozilla.sh ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. \
${REGCHROME} || true ; \
./run-mozilla.sh ${FIREFOX_BIN} -register )
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|