updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / firefox-plasma-plugin-git / PKGBUILD
blob0e19d881bfbabf5f1f57d5c1eb1c3e994c77fae0
1 # Contributor: Devin Cofer <ranguvar{AT]archlinux[DOT}us>
2 # Contributor: Flamelab <panosfilip@gmail.com>
4 pkgname=firefox-plasma-plugin-git
5 pkgver=20090919
6 pkgrel=1
7 pkgdesc="Netscape-compatible browser plugin which runs Plasma applets"
8 arch=('i686' 'x86_64')
9 url="http://repo.or.cz/w/plasmaplugin.git"
10 license=('unknown')
12 depends=('kdelibs' 'kdebase-plasma')
13 makedepends=('cmake' 'automoc4')
14 provides=('firefox-plasma-plugin')
15 conflicts=('firefox-plasma-plugin')
17 install=firefox-plasma-plugin.install
19 _gitroot="git://repo.or.cz/plasmaplugin.git"
20 _gitname=plasmaplugin
22 build() {
23         msg "Performing source checkout..."
24         if [ -d "$_gitname" ]; then
25                 cd "$_gitname"
26                 git pull origin || return 1
27                 cd ..
28         else
29                 git clone "$_gitroot" "$_gitname" || return 1
30         fi
31         msg "Source checkout finished."
32         rm -rf "$_gitname-build"
33         git clone "$_gitname" "$_gitname-build" || return 1
35         cd "$_gitname-build"
36         # Make install to /usr/ as opposed to the user's directory.
37         # Give me a shout if this can be done more elegantly.
38         sed -i 's#set(MOZPLUGIN_INSTALL_DIR $ENV{HOME}/.mozilla/plugins) \
39                  #set(MOZPLUGIN_INSTALL_DIR /usr/lib/mozilla/plugins)#' CMakeLists.txt || return 1
41         cmake -DCMAKE_INSTALL_PREFIX=/usr || return 1
42         make || return 1
43         make DESTDIR="$pkgdir" install || return 1
45         install -Dm755 examples/plasma.html \
46                        "$pkgdir/usr/share/firefox-plasma-plugin/plasma_example.html" || return 1