daily pastebin goal
16%
SHARE
TWEET

micah

a guest Feb 14th, 2010 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- ../thunderbird-locales-2.0.0.14+1/debian/rules      2010-01-28 14:01:29.000000000 -0600
  2. +++ debian/rules        2010-02-14 18:05:35.000000000 -0600
  3.  -8,13 +8,12 @@
  4.  
  5.  ## We add later the locale name to each TARGETDIR
  6.  TARGETDIR_LC=$(CURDIR)/debian/thunderbird-locale-
  7. -PACKVERSION=1.5ubuntu20051207
  8. +PACKVERSION=3.0
  9.  
  10.  BUILDDIR = $(CURDIR)/debian/build
  11.  # Nightly builds:
  12.  # Only officially released XPIs
  13. -FETCHADDRESS=ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/2.0.0.14/linux-i686/xpi/
  14. -
  15. +FETCHADDRESS=ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$(PACKVERSION)/linux-i686/xpi/
  16.  
  17.  ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  18.         INSTALL_PROGRAM += -s
  19.  -27,40 +26,11 @@
  20.  
  21.         touch configure-stamp
  22.  
  23. -
  24.  build: build-stamp
  25.  
  26. -build-stamp: configure-stamp
  27. +build-stamp: configure-stamp
  28.         dh_testdir
  29.  
  30. -       # unpack uuencoded additional XPI's
  31. -       #uudecode -o xpi/xh-ZA.xpi debian/xh-ZA.xpi.uu
  32. -
  33. -       # Add here commands to compile the package.
  34. -       set -e; cd $(CURDIR)/xpi; \
  35. -         for i in *.xpi ; do \
  36. -           CURLOCALE=`echo $$i | sed --posix 's/\.xpi//'` ; \
  37. -           mkdir -p $(BUILDDIR)/translations/$${CURLOCALE} ; \
  38. -           unzip -o -d $(BUILDDIR)/translations/$${CURLOCALE} $${i}; \
  39. -           cd $(BUILDDIR)/translations/$${CURLOCALE}/ ; \
  40. -           if [ -f chrome/$${CURLOCALE}.jar ]; then \
  41. -             JARNAME=$${CURLOCALE}.jar; \
  42. -           else \
  43. -             JARNAME=`echo $$i | sed --posix 's/-.*//'`.jar ; \
  44. -           fi; \
  45. -           unzip -o -q -d chrome/ chrome/$$JARNAME ; \
  46. -           rm -f chrome/$$JARNAME ; \
  47. -           if [ -f $(CURDIR)/debian/patches/$${CURLOCALE}.diff ] ; then \
  48. -             patch -p1 < $(CURDIR)/debian/patches/$${CURLOCALE}.diff ; \
  49. -           fi ; \
  50. -           cd chrome ; zip -0qr $$JARNAME locale ; \
  51. -           rm -rf locale ; cd $(CURDIR)/xpi ; \
  52. -           sed '/./,$$ !d; s/em:maxVersion>.*</em:maxVersion>2.0.0.99</' $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf > $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf-new ; \
  53. -           mv $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf-new $(BUILDDIR)/translations/$${CURLOCALE}/install.rdf ; \
  54. -         done
  55. -
  56. -       touch build-stamp
  57. -
  58.  clean:
  59.         dh_testdir
  60.         dh_testroot
  61.  -70,68 +40,30 @@
  62.         #-$(MAKE) clean
  63.         -rm -rf $(BUILDDIR)
  64.  
  65. -       # remove uudecoded XPIs
  66. -       rm -f xpi/xh-ZA.xpi
  67. -
  68. -       dh_clean
  69. -
  70. -install: build
  71. +install:
  72.         dh_testdir
  73.         dh_testroot
  74. -       dh_clean -k
  75. +       dh_clean -k
  76.         dh_installdirs
  77.  
  78. -       # jar files
  79. -       set -e; cd $(BUILDDIR)/translations; \
  80. -         for i in * ; do \
  81. -           CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
  82. -           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 ; \
  83. -           install -m 644 $$i/chrome/*.jar \
  84. -             $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`/chrome ; \
  85. -         done ;
  86. -
  87. -       # install.rdf
  88. -       set -e; cd $(BUILDDIR)/translations; \
  89. -         for i in * ; do \
  90. -           CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
  91. -           install -m 644 $$i/install.rdf \
  92. -             $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'` ; \
  93. -         done ;
  94. -
  95. -       # chrome.manifest
  96. -       set -e; cd $(BUILDDIR)/translations; \
  97. -         for i in * ; do \
  98. -           CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
  99. -           install -m 644 $$i/chrome.manifest \
  100. -             $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'` ; \
  101. -         done ;
  102. -
  103. -       # uninstall
  104. -       set -e; cd $(BUILDDIR)/translations; \
  105. -         for i in * ; do \
  106. -           CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
  107. -           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 ; \
  108. -           cat $$i/install.rdf | \
  109. -            sed --posix '/<em:locale>/!d' | \
  110. -            sed --posix "s/.*/register global  locale  $$i/" > \
  111. -             $(TARGETDIR_LC)$$CUR_LANG_SMALL/usr/lib/thunderbird/extensions/`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'`/uninstall/Uninstall ; \
  112. -         done ;
  113. -
  114. -       # debian settings
  115. -       set -e; cd $(BUILDDIR)/translations; \
  116. -         for i in * ; do \
  117. -           CUR_LANG_SMALL=`echo $$i | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
  118. -           mkdir -p $(TARGETDIR_LC)$$CUR_LANG_SMALL/var/lib/thunderbird/extensions.d ; \
  119. -           echo extension,`cat $$i/install.rdf | sed --posix '/em:id=/!d;s/[ ]*em:id="//;s/".*//'` > \
  120. -             $(TARGETDIR_LC)$$CUR_LANG_SMALL/var/lib/thunderbird/extensions.d/50$$i-locale.ext ; \
  121. -         done ;
  122. +       # install xpi files
  123. +       set -e; \
  124. +         for i in xpi/*.xpi ; do \
  125. +           CURLOCALE=`echo $$i | sed --posix 's/\.xpi//' | sed --posix 's#xpi/##'` ; \
  126. +           CURLOCALESMALL=`echo $${CURLOCALE} | tr 'A-Z' 'a-z'` ; \
  127. +           install-xpi -pthunderbird-locale-$${CURLOCALESMALL} $$i ; \
  128. +           PKGDIR=${TARGETDIR_LC}$${CURLOCALESMALL} \
  129. +           PATH_TO_RDF=usr/share/thunderbird-locale-$${CURLOCALESMALL}/install.rdf ; \
  130. +           sed 's/\(maxVersion>3.0\)/\1.*/' $${PKGDIR}/$${PATH_TO_RDF} >> $${PKGDIR}/$${PATH_TO_RDF}.new ; \
  131. +           mv $${PKGDIR}/$${PATH_TO_RDF}.new $${PKGDIR}/$${PATH_TO_RDF} ; \
  132. +         done;
  133. +         dh_xul-ext
  134.          
  135. -        
  136.  # Build architecture-independent files here.
  137.  binary-indep: build install
  138.         dh_testdir
  139.         dh_testroot
  140. -       dh_installchangelogs
  141. +       dh_installchangelogs
  142.         dh_installdocs
  143.         dh_link
  144.         dh_compress
  145.  -142,19 +74,15 @@
  146.         dh_md5sums
  147.         dh_builddeb
  148.  
  149. -
  150.  # Build architecture-dependent files here.
  151.  binary-arch: build install
  152. -# We have nothing to do because architecture is all.
  153. -
  154. -
  155. -
  156.  
  157.  clean-xpi:
  158.         dh_testdir
  159.         rm -f $(CURDIR)/xpi/*
  160.  
  161. -update-xpi: wget update-debian-files
  162. +update-xpi: wget update-debian-files add-unavail
  163. +rebuild-debian-files: update-debian-files add-unavail
  164.  
  165.  wget:
  166.         wget -N -P $(CURDIR)/xpi '$(FETCHADDRESS)*.xpi'
  167.  -162,16 +90,12 @@
  168.  update-debian-files:
  169.         cp -f $(CURDIR)/debian/templates/control.template $(CURDIR)/debian/control
  170.         -mv -f $(CURDIR)/debian/locales.list $(CURDIR)/debian/locales.list.old
  171. -       -mv -f $(CURDIR)/debian/packages.list $(CURDIR)/debian/packages.list.old
  172. -
  173. -       # unpack uuencoded additional XPI's
  174. -       #uudecode -o xpi/xh-ZA.xpi debian/xh-ZA.xpi.uu
  175.  
  176.         set -e; cd $(CURDIR)/xpi; \
  177.           for i in *.xpi ; do \
  178.             CURLOCALE=`echo $$i | sed --posix 's/\.xpi//'` ; \
  179.             CURLANG=`echo $${CURLOCALE} | sed --posix 's/-.*//'`; \
  180. -           CURLOCALESMALL=`echo $${CURLOCALE} | sed --posix 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` ; \
  181. +           CURLOCALESMALL=`echo $${CURLOCALE} | tr 'A-Z' 'a-z'` ; \
  182.             CURLANGXPATH=`xpath -q -e "//*[@iso_639_1_code=\"$$CURLANG\"]/@name" /usr/share/xml/iso-codes/iso_639.xml` ; \
  183.             CURLANGNAME=`printf "%s" "$${CURLANGXPATH}" | sed 's/ name="// ; s/"//'` ; \
  184.             if [ -e $(CURDIR)/debian/templates/$${CURLOCALESMALL}/control ] ; \
  185.  -187,5 +111,19 @@
  186.             fi ;\
  187.           done
  188.  
  189. +       cat $(CURDIR)/debian/locales.list >> $(CURDIR)/debian/packages.list
  190. +       sort -u $(CURDIR)/debian/packages.list > $(CURDIR)/debian/packages.list.new
  191. +       mv $(CURDIR)/debian/packages.list.new $(CURDIR)/debian/packages.list
  192. +
  193. +add-unavail:
  194. +       rm $(CURDIR)/debian/unavail.list
  195. +       touch $(CURDIR)/debian/unavail.list
  196. +       diff $(CURDIR)/debian/locales.list $(CURDIR)/debian/packages.list | sed -n 's/> //gp' >> $(CURDIR)/debian/unavail.list
  197. +       if [ `cat $(CURDIR)/debian/unavail.list | wc -l` -gt 0 ]; then \
  198. +               while read -r line; do \
  199. +                       sed "s/NAME/$$line/g" $(CURDIR)/debian/templates/unavail.template >> $(CURDIR)/debian/control; \
  200. +               done< $(CURDIR)/debian/unavail.list; \
  201. +       fi
  202. +
  203.  binary: binary-indep binary-arch
  204.  .PHONY: build clean binary-indep binary-arch binary install configure
RAW Paste Data
Top