wok-stable annotate firefox-langpack-zh_CN/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 | dab62c0f979a |
children | 0192b7b7169c |
rev | line source |
---|---|
lufeng369@7382 | 1 # SliTaz package receipt. |
lufeng369@7382 | 2 |
lufeng369@7382 | 3 PACKAGE="firefox-langpack-zh_CN" |
slaxemulator@7493 | 4 VERSION="3.6.12" |
lufeng369@7382 | 5 CATEGORY="network" |
lufeng369@7382 | 6 SHORT_DESC="Chinese Language Package for firefox" |
lufeng369@7382 | 7 MAINTAINER="lufeng369@gmail.com" |
lufeng369@7382 | 8 DEPENDS="firefox" |
lufeng369@7382 | 9 BUILD_DEPENDS="unzip" |
lufeng369@7382 | 10 WEB_SITE="http://www.mozilla.com" |
lufeng369@7382 | 11 TARBALL="zh-CN.xpi" |
lufeng369@7382 | 12 Path=langpack-zh-CN@firefox.mozilla.org |
slaxemulator@7493 | 13 URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL" |
lufeng369@7382 | 14 # Rules to gen a SliTaz package suitable for Tazpkg. |
lufeng369@7382 | 15 genpkg_rules() |
lufeng369@7382 | 16 { |
lufeng369@7382 | 17 |
lufeng369@7382 | 18 mkdir -p $fs/var/$Path |
slaxemulator@7493 | 19 if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then |
slaxemulator@7493 | 20 unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path |
slaxemulator@7493 | 21 else |
slaxemulator@7493 | 22 [ -L /usr/bin/wget ] && tazpkg get-install wget --forced |
slaxemulator@7493 | 23 wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL |
slaxemulator@7493 | 24 unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path |
slaxemulator@7493 | 25 fi |
lufeng369@7382 | 26 } |
slaxemulator@7493 | 27 |
lufeng369@7382 | 28 post_install() |
lufeng369@7382 | 29 { |
slaxemulator@7493 | 30 sed -i '/pref/s/en-US/zh-CN/' /etc/firefox/pref/firefox-l10n.js |
slaxemulator@7493 | 31 RealPath=/usr/lib/firefox-*/extensions/ |
slaxemulator@7499 | 32 cp -af /var/$Path $RealPath |
slaxemulator@7499 | 33 rm -rf /var/$Path |
lufeng369@7382 | 34 } |
slaxemulator@7493 | 35 |
lufeng369@7382 | 36 post_remove() |
lufeng369@7382 | 37 { |
slaxemulator@7493 | 38 sed -i '/pref/s/zh-CN/en-US/' /etc/firefox/pref/firefox-l10n.js |
slaxemulator@7493 | 39 rm -rf "/usr/lib/firefox-*/extensions/$Path" |
lufeng369@7382 | 40 } |