updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / kimpanel-plasmoid-svn / PKGBUILD
blobd1481d3698dffecc6ee65412acd3cf2a9cf91fce
1 # Maintainer: Weng Xuetian <wengxt@gmail.com>
3 pkgname=kimpanel-plasmoid-svn
4 pkgver=1090750
5 _realver=1090750
6 pkgrel=1
7 arch=('i686' 'x86_64')
8 license=('GPL')
9 makedepends=('pkgconfig' 'cmake' 'automoc4' 'subversion' 'scim')
10 pkgdesc="IM Panel Plasmoid For KDE4.3,KDE From The Trunk Needed"
11 depends=('kdebase-workspace>=4.3')
12 optdepends=('ibus>=1.1.0' 'scim')
13 install=('kimpanel-plasmoid-svn.install')
14 url="http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/kimpanel"
15 source=('collapse.patch' 'cmake.patch' 'position.patch' 'update.patch' 'CMakeLists.txt')
17 _svntrunk=svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeplasma-addons
18 _svnmod=kdeplasma-addons
20 # build function
22 build() {
23         cd ${srcdir}
25         if [ -d $_svnmod/.svn ]; then
26                 (cd $_svnmod && svn up -r ${_realver})
27         else
28                 svn co $_svntrunk --config-dir ./ -r ${_realver} $_svnmod
29         fi
31         msg "SVN checkout done or server timeout"
32         msg "Starting make..."
34         rm -rf $_svnmod-build
35         cp -r $_svnmod $_svnmod-build
36         cd $_svnmod-build
37         
38         msg "starting build ..."
40         patch -p0 -i $srcdir/cmake.patch || return 1
41         cp $srcdir/CMakeLists.txt applets/
42         cd $srcdir/$_svnmod-build/applets/kimpanel
43         patch -p0 -i $srcdir/collapse.patch || return 1
44         patch -p0 -i $srcdir/position.patch || return 1
45         patch -p0 -i $srcdir/update.patch || return 1
47         cd $srcdir
48         rm -rf build
49         mkdir build
50         cd build
52         cmake ../${_svnmod}-build \
53                 -DCMAKE_BUILD_TYPE=Release \
54                 -DCMAKE_SKIP_RPATH=ON \
55                 -DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed' \
56                 -DCMAKE_INSTALL_PREFIX=/usr
57         make || return 1
59         # Hack to get the correct pkgver :)
60         pkgver="${_realver}"
62         # Make sure the pkgver is not null
63         if [[ -n "${pkgver}" ]]; then
64                 export pkgver="${pkgver}"
65         fi
69 package() {
70         cd $srcdir/build/applets/kimpanel
72         make DESTDIR=${pkgdir} install || return 1
74         pkgver="${_realver}"
75         # Export the pkgver if it is not null
76         if [[ -n "${pkgver}" ]]; then
77                 export pkgver="${pkgver}"
78                 # Set the correct pkgver in the PKGBUILD
79                 sed -i 's/^\(\t\?\)pkgver=[0-9]\+$/\1pkgver='${pkgver}'/g' "${startdir}/PKGBUILD"
80         fi
83         mkdir -p ${pkgdir}/usr/share/ibus/ui/qt/
84         mkdir -p ${pkgdir}/usr/share/ibus/component
85         install -m755 $srcdir/kdeplasma-addons/applets/kimpanel/backend/ibus/panel.py ${pkgdir}/usr/share/ibus/ui/qt/
86         install -m644 $srcdir/kdeplasma-addons/applets/kimpanel/backend/ibus/qtpanel.xml ${pkgdir}/usr/share/ibus/component
87         :<<-'EOF'
88         pkgver=
89         EOF
90
91 md5sums=('84059f25bbe345a413dcf7efa82ed41a'
92          'c6b51156ba67dc4bc1a8cf1e0cf29bb9'
93          '518929f5d5014381c130a698ee651fb1'
94          '92bd53985a1c3aa881b08ca7a91ee668'
95          '32489d6dd723b7518548bf8388d75a8e')