#Packager: George Vlahavas pkgname=mate-power-manager pkgver=1.4.0 pkgrel=1gv source=("http://pub.mate-desktop.org/releases/1.4/mate-power-manager-1.4.0.tar.xz" "help.patch" "no_schemas_check.patch") docs=("readme" "install" "copying" "changelog" "authors" "news" "todo") options=('noautodotnew') doinst() { # Update the scrollkeeper database (Remove stale pieces) if [ -x usr/bin/scrollkeeper-update ]; then usr/bin/scrollkeeper-update > /dev/null 2>&1 fi } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "mate-power-manager (A power manager for the MATE desktop)" "Mate Power Manager is a mate session daemon that acts as a policy" "agent on top of the Project Utopia stack, which includes the kernel," "hotplug, udev, and HAL. Mate Power Manager listens for HAL events and" "responds with user-configurable reactions. Currently it supports" "UPS's, laptop batteries and AC adapters. Its goal is to be" "architecture neutral and free of polling and other hacks." ) build() { cd $startdir/src/$pkgname-$pkgver patch -p1 < $startdir/src/help.patch || exit 1 patch -p1 < $startdir/src/no_schemas_check.patch || exit 1 ./autogen.sh \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ --disable-schemas-install \ --disable-scrollkeeper \ --enable-mateconf-defaults \ --with-mateconf-source="xml::/etc/mateconf/mateconf.xml.defaults" \ --enable-applets \ --build=$arch-slackware-linux make -j $numjobs || return 1 make install DESTDIR=$startdir/pkg # Install mateconf schemas in the package export MATECONF_CONFIG_SOURCE="xml::$startdir/pkg/etc/mateconf/mateconf.xml.defaults" if [ -d $startdir/pkg/etc/mateconf/schemas ]; then install -v -d -m755 $startdir/pkg/etc/mateconf/mateconf.xml.defaults SCHEMAS=$startdir/pkg/etc/mateconf/schemas for schema in $SCHEMAS/*.schemas; do mateconftool-2 --makefile-install-rule $schema done # Reset / Verify correct permissions ( cd $startdir/pkg/etc/mateconf ; find . -type d -exec chmod 755 {} \; ) ( cd $startdir/pkg/etc/mateconf ; find . -type f -exec chmod 644 {} \; ) fi # default settings mateconftool-2 --direct --config-source xml::$startdir/pkg/etc/mateconf/mateconf.xml.defaults --type string /apps/mate-power-manager/ui/icon_policy present # remove unnecessary help files find $startdir/pkg/usr/share/mate/help/mate-power-manager/* -maxdepth 0 -type d ! -name C -exec rm -rf {} \; # fix .desktop files sed -i "/^OnlyShowIn/d" $startdir/pkg/usr/share/applications/*.desktop echo "NotShowIn=KDE;XFCE;" >> $startdir/pkg/usr/share/applications/mate-power-statistics.desktop echo "NotShowIn=KDE;XFCE;" >> $startdir/pkg/usr/share/applications/mate-power-preferences.desktop sed -i "/^NoDisplay=true/d" $startdir/pkg/usr/share/applications/mate-power-statistics.desktop }