Advertisement
Emulatorman

icedove-libre PKGBUILD

Apr 3rd, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. # Maintainer : Márcio Silva <coadde@adinet.com.uy>
  2.  
  3. _pgo=false
  4.  
  5. # We're getting this from Debian Sid
  6. _debname=icedove
  7. _debver=10.0.3
  8. _debrel=3
  9. _debrepo=http://ftp.debian.org/debian/pool/main/
  10. debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
  11.  
  12. _pkgname=icedove
  13. pkgname=icedove-libre
  14. pkgver=${_debver}
  15. pkgrel=1
  16.  
  17. if [ -z "$pkgname" ]; then pkgname=$_pkgname; fi
  18. if $_pgo; then
  19. pkgname+='-pgo'
  20. fi
  21.  
  22. pkgdesc="A libre version of Debian Icedove, the Standalone Mail/News reader based on Mozilla thunderbird."
  23. arch=('i586' 'i686' 'x86_64' 'mips64el')
  24. license=('GPL2' 'MPL' 'LGPL')
  25. depends=('alsa-lib' 'dbus-glib' 'desktop-file-utils' 'gtk2' 'hicolor-icon-theme' 'hunspell' 'libevent' 'libnotify' 'libvpx' 'libxt' 'mime-types' 'mozilla-common' 'nss' 'sqlite3' 'startup-notification')
  26. makedepends=('unzip' 'zip' 'pkg-config' 'python2' 'wireless_tools' 'yasm' 'mesa' 'autoconf2.13')
  27. optdepends=('libcanberra: for sound support')
  28. if $_pgo; then
  29. makedepends+=('xorg-server-xvfb')
  30. options=(!ccache)
  31. fi
  32.  
  33. url="http://packages.debian.org/source/sid/icedove"
  34. install=icedove.install
  35. source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.bz2"
  36. "${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.debian.tar.gz"
  37. "${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.dsc"
  38. mozconfig
  39. mozconfig.pgo
  40. icedove.desktop
  41. channel-prefs.js
  42. vendor.js)
  43. md5sums=('3efe2ef4d5471aae3b79531ce8aee9dc'
  44. 'cb3dba2916bdf2deb72248b0984c4302'
  45. '57e21e997a75d85fcc0dcfe30b83f1ee'
  46. 'fda2ff093ddbddf7f4cc3a1ed3bf9dcd'
  47. 'ac29b01c189f20abae2f3eef1618ffc0'
  48. 'e785e0c267f4435ae1a9aa0b03bcacfb'
  49. '476ec205162340fb0679f522c9d31c3b'
  50. '5a53179d14ae9631b7afe5e4d0fc0b25')
  51.  
  52. if [ "$_pkgname" != "$pkgname" ]; then
  53. provides+=("$_pkgname=$pkgver")
  54. conflicts+=("$_pkgname")
  55. fi
  56.  
  57. dpkg-source() {
  58. # This will simulate dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
  59. export QUILT_PATCHES=debian/patches
  60. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  61. export QUILT_DIFF_ARGS='--no-timestamps'
  62. mv comm-esr10 "${_debname}-${_debver}"
  63. mv debian "${_debname}-${_debver}"
  64. cd "${_debname}-${_debver}"
  65. quilt push -a
  66. find .pc -name .timestamp -delete # why isn't "--no-timestamps" doing this?
  67. cd ..
  68. }
  69.  
  70. build() {
  71. # Don't run this if we're using -e
  72. if [ $NOEXTRACT -eq 0 ]; then
  73. msg2 "Applying Debian patches..."
  74. cd "${srcdir}"
  75. dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
  76.  
  77. msg2 "Starting normal build..."
  78. mv "${_debname}-${_debver}" "$srcdir/mozilla-build"
  79. cd "$srcdir/mozilla-build"
  80.  
  81. cp "$srcdir/mozconfig" .mozconfig # Load our build config, disable SafeSearch
  82. fi
  83.  
  84. if $_pgo; then
  85. cat "$srcdir/mozconfig.pgo" >> .mozconfig
  86. fi
  87.  
  88. export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$_pkgname"
  89. export PYTHON="/usr/bin/python2"
  90.  
  91. if $_pgo; then
  92. LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
  93. LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
  94. kill $! || true
  95. else
  96. LD_PRELOAD="" make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
  97. fi
  98. }
  99.  
  100. package() {
  101. cd "$srcdir/mozilla-build"
  102. make -j1 -f client.mk DESTDIR="$pkgdir" install
  103.  
  104. install -m644 "$srcdir"/vendor.js "$pkgdir/usr/lib/$_pkgname/defaults/pref/"
  105.  
  106.  
  107. brandingdir=other-licenses/branding/
  108. icondir="$pkgdir/usr/share/icons/hicolor"
  109. for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
  110. install -Dm644 $brandingdir/$_pkgname/mailicon${i/x*/}.png "$icondir/$i/apps/$_pkgname.png"
  111. done
  112.  
  113. install -Dm644 "$srcdir/$_pkgname.desktop" \
  114. "$pkgdir/usr/share/applications/$_pkgname.desktop"
  115.  
  116. rm -rf "$pkgdir"/usr/lib/$_pkgname/{dictionaries,hyphenation}
  117. ln -sf /usr/share/hunspell "$pkgdir/usr/lib/$_pkgname/dictionaries"
  118. ln -sf /usr/share/hyphen "$pkgdir/usr/lib/$_pkgname/hyphenation"
  119.  
  120. # We don't want the development stuff
  121. rm -r "$pkgdir"/usr/{include,lib/$_pkgname-devel,share/idl}
  122.  
  123. # Recommend free addons
  124. cp --remove-destination "${srcdir}/channel-prefs.js" \
  125. "${pkgdir}/usr/lib/$_pkgname/defaults/pref/channel-prefs.js"
  126. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement