wok-6.x view firefox-langpack-zh_TW/receipt @ rev 7499

Made all firefox-langpack copy files right. Looks like mv can't move folders even with -f option. Used a cp -af then rm -rf instead.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Dec 04 00:03:00 2010 +0000 (2010-12-04)
parents eae5abfd796b
children 0192b7b7169c
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox-langpack-zh_TW"
4 VERSION="3.6.12"
5 CATEGORY="network"
6 SHORT_DESC="Chinese Language Package for firefox"
7 MAINTAINER="lufeng369@gmail.com"
8 DEPENDS="firefox"
9 BUILD_DEPENDS="unzip"
10 WEB_SITE="http://www.mozilla.com"
11 TARBALL="zh-TW.xpi"
12 Path="langpack-${TARBALL%.xpi}@firefox.mozilla.org"
13 URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
19 mkdir -p $fs/var/$Path
20 if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
21 unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
22 else
23 [ -L /usr/bin/wget ] && tazpkg get-install wget --forced
24 wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
25 unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
26 fi
27 }
29 post_install()
30 {
31 sed -i "/pref/s/en-US/${TARBALL%.xpi}/" /etc/firefox/pref/firefox-l10n.js
32 RealPath=/usr/lib/firefox-*/extensions/
33 cp -af /var/$Path $RealPath
34 rm -rf /var/$Path
35 }
37 post_remove()
38 {
39 sed -i "/pref/s/${TARBALL%.xpi}/en-US/" /etc/firefox/pref/firefox-l10n.js
40 rm -rf "/usr/lib/firefox-*/extensions/$Path"
41 }