1 # Contributor: Tom Kuther <gimpel@sonnenkinder.org>
3 pkgbase=globalmenu-extension
4 pkgname=globalmenu-extension
5 true && pkgname=(globalmenu-extension-firefox globalmenu-extension-thunderbird)
8 url="https://launchpad.net/globalmenu-extension"
11 makedepends=('bzr' 'autoconf2.13' 'python2' 'yasm' 'zip' 'unzip' 'xulrunner')
20 _bzrroot=lp:globalmenu-extension/2.0
21 _bzrname=globalmenu-extension
25 msg "Connecting to BZR server...."
27 if [ -d $_bzrname ] ; then
28 cd $_bzrname && bzr update
29 msg "The local files are updated."
31 bzr branch $_bzrroot $_bzrname
33 msg "BZR checkout done"
35 msg "Starting make..."
36 rm -rf "$srcdir/${_bzrname}-build"
37 cp -r "$srcdir/${_bzrname}" "$srcdir/${_bzrname}-build"
38 cd "$srcdir/${_bzrname}-build"
41 sed -i 's/^ \t/\t/g' config/rules.mk
42 sed -i '/^XPIDL_COMPILE[[:space:]]*=/s@\$(LIBXUL_DIST)/@&sdk/@' config/config.mk
44 ./configure --with-libxul-sdk=`pkg-config --variable=sdkdir libxul` \
45 --with-system-libxul \
48 --enable-application=extensions \
49 --enable-extensions=globalmenu \
55 package_globalmenu-extension-firefox() {
56 pkgdesc="Firefox extension that exports the standard menu bar via libdbusmenu"
57 depends=('libdbusmenu-gtk2' 'firefox')
59 cd "$srcdir/${_bzrname}-build"
60 emid=$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' extensions/globalmenu/install.rdf)
61 install -d ${pkgdir}/usr/lib/firefox/extensions/${emid}
62 unzip -d ${pkgdir}/usr/lib/firefox/extensions/${emid} dist/xpi-stage/globalmenu.xpi
65 package_globalmenu-extension-thunderbird() {
66 pkgdesc="Thunderbird extension that exports the standard menu bar via libdbusmenu"
67 depends=('libdbusmenu-gtk2' 'thunderbird')
69 cd "$srcdir/${_bzrname}-build"
70 emid=$(sed -n '/.*<em:id>\(.*\)<\/em:id>.*/{s//\1/p;q}' extensions/globalmenu/install.rdf)
71 install -d ${pkgdir}/usr/lib/thunderbird/extensions/${emid}
72 unzip -d ${pkgdir}/usr/lib/thunderbird/extensions/${emid} dist/xpi-stage/globalmenu.xpi
75 pkgdesc="global appmenu extension for Firefox and Thunderbird"
76 depends=('libdbusmenu' 'firefox' 'thunderbird')