# Contributors: flamelab, crazyelf5
# Maintainer: crazyelf5
pkgname=wingpanel-bzr
pkgver=114
pkgrel=1
pkgdesc="Stylish top panel that holds indicators and spawns an application launcher"
arch=('i686' 'x86_64')
url="https://launchpad.net/wingpanel"
license=('GPL3')
groups=('pantheon-base')
depends=('glib2' 'glibc' 'libgee' 'gtk3' 'hicolor-icon-theme' 'libx11' 'granite-bzr' 'libindicator3' 'pango' 'dconf' 'gettext')
optdepends=('indicator-application: take menus from applications and place them in the panel'
'indicator-datetime: Date and clock indicator'
'indicator-messages: Messages indiator'
'indicator-session: Indicator to switch user, change session'
'indicator-sound: Sound indicator')
makedepends=('bzr' 'cmake' 'vala-016')
install=$pkgname.install
_bzrtrunk=lp:wingpanel
_bzrmod=wingpanel-gtk3
build() {
msg "Connecting to Bazaar server...."
if [ -d $_bzrmod ]; then
cd $_bzrmod && bzr pull $_bzrtrunk -r $pkgver && cd ..
msg "The local files are updated."
else
bzr branch $_bzrtrunk $_bzrmod -r $pkgver
fi
msg "BZR checkout done or server timeout"
msg "Starting make..."
[ -d $_bzrmod-build ] && rm -rf $_bzrmod-build
cp -r $_bzrmod $_bzrmod-build
cd $_bzrmod-build
[ -d build ] && rm -rf build
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
-DVALA_EXECUTABLE="$(type -p valac-0.16)"
make
}
package() {
cd "$srcdir/$_bzrmod-build/build"
make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir/" install
install -dm755 "$pkgdir/usr/lib/indicators3/6"
install -dm755 "$pkgdir/usr/lib/indicators3/7"
}