- --- ../thunderbird-locales-2.0.0.14+1/debian/rules 2010-01-28 14:01:29.000000000 -0600
- +++ debian/rules 2010-02-14 18:05:35.000000000 -0600
- -8,13 +8,12 @@
- ## We add later the locale name to each TARGETDIR
- TARGETDIR_LC=$(CURDIR)/debian/thunderbird-locale-
- -PACKVERSION=1.5ubuntu20051207
- +PACKVERSION=3.0
- BUILDDIR = $(CURDIR)/debian/build
- # Nightly builds:
- # Only officially released XPIs
- -FETCHADDRESS=ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/2.0.0.14/linux-i686/xpi/
- -
- +FETCHADDRESS=ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$(PACKVERSION)/linux-i686/xpi/
- ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- INSTALL_PROGRAM += -s
- -27,40 +26,11 @@
- touch configure-stamp
- -
- build: build-stamp
- -build-stamp: configure-stamp
- +build-stamp: configure-stamp
- dh_testdir
- - # unpack uuencoded additional XPI's
- - #uudecode -o xpi/xh-ZA.xpi debian/xh-ZA.xpi.uu
- -
- - # Add here commands to compile the package.
- - set -e; cd $(CURDIR)/xpi; \
- - for i in *.xpi ; do \
- - CURLOCALE=`echo $$i | sed --posix 's/\.xpi//'` ; \
- - mkdir -p $(BUILDDIR)/translations/$${CURLOCALE} ; \
- - unzip -o -d $(BUILDDIR)/translations/$${CURLOCALE} $${i}; \
- - cd $(BUILDDIR)/translations/$${CURLOCALE}/ ; \
- - if [ -f chrome/$${CURLOCALE}.jar ]; then \
- - JARNAME=$${CURLOCALE}.jar; \
- - else \
- - JARNAME=`echo $$i | sed --posix 's/-.*//'`.jar ; \
- - fi; \
- - unzip -o -q -d chrome/ chrome/$$JARNAME ; \
- - rm -f chrome/$$JARNAME ; \
- - if [ -f $(CURDIR)/debian/patches/$${CURLOCALE}.diff ] ; then \
- - patch -p1 < $(CURDIR)/debian/patches/$${CURLOCALE}.diff ; \
- - fi ; \
- - cd chrome ; zip -0qr $$JARNAME locale ; \
- - rm -rf locale ; cd $(CURDIR)/xpi ; \
- - sed '/./,$$ !d; s/em:maxVersion>.*</em:maxVersion>2.0.0.99</' $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf > $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf-new ; \
- - mv $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf-new $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf ; \
- - done
- -
- - touch build-stamp
- -
- clean:
- dh_testdir
- dh_testroot
- -70,68 +40,30 @@
- #-$(MAKE) clean
- -rm -rf $(BUILDDIR)
- - # remove uudecoded XPIs
- - rm -f xpi/xh-ZA.xpi
- -
- - dh_clean
- -
- -install: build
- +install:
- dh_testdir
- dh_testroot
- - dh_clean -k
- + dh_clean -k
- dh_installdirs
- - # jar files
- - set -e; cd $(BUILDDIR)/translations; \
- - for i in * ; do \
- - CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
- - mkdir -p $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`/chrome ; \
- - install -m 644 $$i/chrome/*.jar \
- - $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`/chrome ; \
- - done ;
- -
- - # install.rdf
- - set -e; cd $(BUILDDIR)/translations; \
- - for i in * ; do \
- - CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
- - install -m 644 $$i/install.rdf \
- - $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'` ; \
- - done ;
- -
- - # chrome.manifest
- - set -e; cd $(BUILDDIR)/translations; \
- - for i in * ; do \
- - CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
- - install -m 644 $$i/chrome.manifest \
- - $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'` ; \
- - done ;
- -
- - # uninstall
- - set -e; cd $(BUILDDIR)/translations; \
- - for i in * ; do \
- - CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
- - mkdir -p $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`/uninstall ; \
- - cat $$i/install.rdf | \
- - sed --posix '/<em:locale>/!d' | \
- - sed --posix "s/.*/register global locale $$i/" > \
- - $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`/uninstall/Uninstall ; \
- - done ;
- -
- - # debian settings
- - set -e; cd $(BUILDDIR)/translations; \
- - for i in * ; do \
- - CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
- - mkdir -p $(TARGETDIR_LC)$$CUR_LANG_SMALL/var/lib/thunderbird/extensions.d ; \
- - echo extension,`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'` > \
- - $(TARGETDIR_LC)$$CUR_LANG_SMALL/var/lib/thunderbird/extensions.d/50$$i-locale.ext ; \
- - done ;
- + # install xpi files
- + set -e; \
- + for i in xpi/*.xpi ; do \
- + CURLOCALE=`echo $$i | sed --posix 's/\.xpi//' | sed --posix 's#xpi/##'` ; \
- + CURLOCALESMALL=`echo $${CURLOCALE} | tr 'A-Z' 'a-z'` ; \
- + install-xpi -pthunderbird-locale-$${CURLOCALESMALL} $$i ; \
- + PKGDIR=${TARGETDIR_LC}$${CURLOCALESMALL} \
- + PATH_TO_RDF=usr/share/thunderbird-locale-$${CURLOCALESMALL}/install.rdf ; \
- + sed 's/\(maxVersion>3.0\)/\1.*/' $${PKGDIR}/$${PATH_TO_RDF} >> $${PKGDIR}/$${PATH_TO_RDF}.new ; \
- + mv $${PKGDIR}/$${PATH_TO_RDF}.new $${PKGDIR}/$${PATH_TO_RDF} ; \
- + done;
- + dh_xul-ext
- -
- # Build architecture-independent files here.
- binary-indep: build install
- dh_testdir
- dh_testroot
- - dh_installchangelogs
- + dh_installchangelogs
- dh_installdocs
- dh_link
- dh_compress
- -142,19 +74,15 @@
- dh_md5sums
- dh_builddeb
- -
- # Build architecture-dependent files here.
- binary-arch: build install
- -# We have nothing to do because architecture is all.
- -
- -
- -
- clean-xpi:
- dh_testdir
- rm -f $(CURDIR)/xpi/*
- -update-xpi: wget update-debian-files
- +update-xpi: wget update-debian-files add-unavail
- +rebuild-debian-files: update-debian-files add-unavail
- wget:
- wget -N -P $(CURDIR)/xpi '$(FETCHADDRESS)*.xpi'
- -162,16 +90,12 @@
- update-debian-files:
- cp -f $(CURDIR)/debian/templates/control.template $(CURDIR)/debian/control
- -mv -f $(CURDIR)/debian/locales.list $(CURDIR)/debian/locales.list.old
- - -mv -f $(CURDIR)/debian/packages.list $(CURDIR)/debian/packages.list.old
- -
- - # unpack uuencoded additional XPI's
- - #uudecode -o xpi/xh-ZA.xpi debian/xh-ZA.xpi.uu
- set -e; cd $(CURDIR)/xpi; \
- for i in *.xpi ; do \
- CURLOCALE=`echo $$i | sed --posix 's/\.xpi//'` ; \
- CURLANG=`echo $${CURLOCALE} | sed --posix 's/-.*//'`; \
- - CURLOCALESMALL=`echo $${CURLOCALE} | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
- + CURLOCALESMALL=`echo $${CURLOCALE} | tr 'A-Z' 'a-z'` ; \
- CURLANGXPATH=`xpath -q -e "//*[@iso_639_1_code=\"$$CURLANG\"]/@name" /usr/share/xml/iso-codes/iso_639.xml` ; \
- CURLANGNAME=`printf "%s" "$${CURLANGXPATH}" | sed 's/ name="// ; s/"//'` ; \
- if [ -e $(CURDIR)/debian/templates/$${CURLOCALESMALL}/control ] ; \
- -187,5 +111,19 @@
- fi ;\
- done
- + cat $(CURDIR)/debian/locales.list >> $(CURDIR)/debian/packages.list
- + sort -u $(CURDIR)/debian/packages.list > $(CURDIR)/debian/packages.list.new
- + mv $(CURDIR)/debian/packages.list.new $(CURDIR)/debian/packages.list
- +
- +add-unavail:
- + rm $(CURDIR)/debian/unavail.list
- + touch $(CURDIR)/debian/unavail.list
- + diff $(CURDIR)/debian/locales.list $(CURDIR)/debian/packages.list | sed -n 's/> //gp' >> $(CURDIR)/debian/unavail.list
- + if [ `cat $(CURDIR)/debian/unavail.list | wc -l` -gt 0 ]; then \
- + while read -r line; do \
- + sed "s/NAME/$$line/g" $(CURDIR)/debian/templates/unavail.template >> $(CURDIR)/debian/control; \
- + done< $(CURDIR)/debian/unavail.list; \
- + fi
- +
- binary: binary-indep binary-arch
- .PHONY: build clean binary-indep binary-arch binary install configure
SHARE
TWEET
micah
a guest
Feb 14th, 2010
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
