1 # KDE4PowerSave Subversion Package
2 # Contributor: Dylon Edwards <deltaecho@archlinux.us>
4 pkgname=kde4powersave-svn
8 url="http://websvn.kde.org/trunk/playground/utils/kde4powersave/"
10 pkgdesc="KDE4PowerSave is the KDE 4 frontend for powermanagement."
14 depends=('qt>=4.4.0' 'kdelibs>=4.1.0' 'kdebase-workspace>=4.1.0' 'phonon>=4.1.0' 'libx11' 'libxpm' 'perl')
16 makedepends=('subversion' 'cmake' 'automoc4' 'gcc')
18 provides=('kde4powersave')
23 _svntrunk="svn://anonsvn.kde.org/home/kde/trunk/playground/utils/"
24 _svnmod="kde4powersave"
28 # Enter the source directory
31 # Get the latest SVN source
32 msg "Connecting to the SVN server..."
34 # Update source if it already exists
35 if [ -d "${_svnmod}/.svn" ]; then
36 svn up "${_svnmod}" || return 1
38 svn co "${_svntrunk}/${_svnmod}" || return 1
44 # Create the build files in the build directory
45 cmake -DCMAKE_INSTALL_PREFIX=/usr . || return 1
50 # Install the files to the fakeroot directory
51 install -m 755 "${srcdir}/${_svnmod}/lib/plasma_applet_powersave.so" \
52 -D "${pkgdir}/usr/lib/kde4/plasma_applet_powersave.so"
53 install -m 644 "${srcdir}/${_svnmod}/plasma-powersave-default.desktop" \
54 -D "${pkgdir}/usr/share/kde4/services/plasma-powersave-default.desktop"
56 # Only install battery.svg if it doesn't yet exist (unlikely)
57 [ ! -f "${KDEDIR}/usr/share/apps/desktoptheme/default/widgets/battery.svg" ] || \
58 install -m 644 "${srcdir}/${_svnmod}/battery.svg" \
59 -D "${pkgdir}/usr/share/apps/desktoptheme/default/widgets/battery.svg"
61 # Only install battery-oxygen.svg if it doesn't yet exist (also unlikely)
62 [ ! -f "${KDEDIR}/usr/share/apps/desktoptheme/default/widgets/battery-oxygen.svg" ] || \
63 install -m 644 "${srcdir}/${_svnmod}/battery-oxygen.svg" \
64 -D "${pkgdir}/usr/share/apps/desktoptheme/default/widgets/battery-oxygen.svg"