updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bin32-songbird-nightly / PKGBUILD
blobfb2e4b2812bcdb62ba15be5890afd7052b5551de
1 # Maintainer: ilikenwf/Matt Parnell <parwok@gmail.com>
2 # Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com>
3 # Contributor: Aaron 'venisonslurpee' Laursen <venisonslurpee@gmail.com>
4 # Contributor: Techlive Zheng <techlivezheng at gmail dot com>
6 # I hacked this to just scrape the needed versioning info so that this doesn't
7 # have to be edited every day.
8 # - ilikenwf
10 pkgname=bin32-songbird-nightly
11 pkgver=2011.07.20
12 pkgrel=1
13 pkgdesc="Bleeding-edge nightly Songbird build. Automatically grabs latest build. Good until Nightingale is ready."
14 arch=('x86_64')
15 url="http://www.songbirdnest.com/"
16 license=('GPL2')
17 depends=('libxrender' 'libxext' 'libidl2' 'libx11' 'libxmu' 'libxt'
18          'sqlite3' 'gtk2' 'nss'
19          'lib32-gstreamer0.10'
20          'lib32-gstreamer0.10-base'
21          'lib32-gstreamer0.10-good')
22 optdepends=(
23         'lib32-gstreamer0.10-bad: support for more formats'
24         'lib32-gstreamer0.10-ugly: support for more formats')
25 provides=('songbird')
26 conflicts=('songbird' 'songbird-svn' 'songbird-bin64')
27 install=bin32-songbird-nightly.install
28 source=(Songbird.desktop songbird-launcher.sh)
29 md5sums=('02ffd66cd34054654135b25d8f82b906'
30          'afc2ad4ad4954e98af3703a1a07cd574')
32 build() {
33   # Why update daily when we can just scrape the url for the latest version?  -ilikenwf
34   VERSION=`wget -qO- "http://developer.songbirdnest.com/builds/trunk/latest/" \
35       | grep -o 'href=\"Songbird_.*_linux-i686.tar.gz\"' | sed 's/href=\"//' | sed 's/gz\".*/gz/'`
37   cd ${srcdir}
39   if [ -a `echo ${VERSION} | grep -o Songbird.*.tar.gz` ];then
40     msg "File exists, no need to download."
41   else
42     wget http://developer.songbirdnest.com/builds/trunk/latest/${VERSION}
43     wget http://developer.songbirdnest.com/builds/trunk/latest/${VERSION}.md5
44   fi
46   msg "Checking md5sum of Songbird archive..."
47   md5sum -c ${VERSION}.md5
49   msg "Building."
51   tar xf ${VERSION}
53   # Use the proper number for the pkgver and pkgrel
54   # Tricks to made AUR not pick up these shell command as pkgver and pkgrel
55   : && pkgver=$(echo ${VERSION} | sed 's/Songbird\_//' | sed 's/\-.*_linux.*\.tar\.gz//')
56   : && pkgrel=$(echo ${VERSION} | grep -o '[0-9][0-9][0-9][0-9]')
58   cd Songbird_build-${pkgrel}
60   install -d --group=users ${pkgdir}/opt/songbird
61   cp -a ${srcdir}/Songbird_build-${pkgrel}/* ${pkgdir}/opt/songbird
62   chmod 755 ${pkgdir}/opt/songbird/songbird
63   chmod 755 ${pkgdir}/opt/songbird/songbird-bin
64   chmod 755 ${pkgdir}/opt/songbird/xulrunner/xulrunner
65   chmod 755 ${pkgdir}/opt/songbird/xulrunner/xulrunner-bin
66   chmod -R a+r ${pkgdir}/opt/songbird
67   install -D ${srcdir}/Songbird_build-${pkgrel}/chrome/icons/default/default.xpm \
68          ${pkgdir}/usr/share/pixmaps/Songbird.xpm
69   install -D -m644 ${srcdir}/Songbird.desktop \
70          ${pkgdir}/usr/share/applications/Songbird.desktop
71   install --directory ${pkgdir}/usr/bin
73   ## fixing the problem with system-wide installs:
74   find ${pkgdir}/opt/songbird -type d -exec chmod 755 {} \;
75   install --directory ${pkgdir}/usr/bin
76   install ${srcdir}/songbird-launcher.sh ${pkgdir}/usr/bin/songbird