summaryrefslogtreecommitdiff
path: root/distro
diff options
context:
space:
mode:
Diffstat (limited to 'distro')
-rw-r--r--distro/archlinux/PKGBUILD38
-rw-r--r--distro/archlinux/mate-power-manager.install22
-rw-r--r--distro/fedora/mate-power-manager.spec156
-rwxr-xr-xdistro/ubuntu/build34
-rwxr-xr-xdistro/ubuntu/postinst8
-rwxr-xr-xdistro/ubuntu/postrm8
-rwxr-xr-xdistro/ubuntu/preinst6
-rwxr-xr-xdistro/ubuntu/prerm9
8 files changed, 281 insertions, 0 deletions
diff --git a/distro/archlinux/PKGBUILD b/distro/archlinux/PKGBUILD
new file mode 100644
index 0000000..3bed798
--- /dev/null
+++ b/distro/archlinux/PKGBUILD
@@ -0,0 +1,38 @@
+pkgname=mate-power-manager
+pkgver=2011.12.01
+pkgrel=1
+pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system for Mate Desktop"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libmatenotify' 'libunique' 'libcanberra' 'hicolor-icon-theme' 'upower' 'libmatekeyring')
+makedepends=('intltool' 'pkgconfig' 'mate-doc-utils' 'mate-panel' 'mate-control-center')
+options=('!emptydirs')
+install=mate-power-manager.install
+url="http://matsusoft.com.ar/projects"
+groups=('mate-extras')
+source=(http://sourceforge.net/projects/matede/files/${pkgver}/${pkgname}.tar.gz/download)
+sha256sums=('2a48bf5930740a7dfa3a380a215b55ef2975256f75ada45915c1f210641ff3bb')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/${pkgname} \
+ --disable-scrollkeeper || return 1
+ #--enable-applets
+ #--with-dbus-services=/usr/share/dbus-1/services \
+ #--with-dpms-ext \
+
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+
+ install -m755 -d "${pkgdir}/usr/share/mateconf/schemas"
+ mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas
+}
diff --git a/distro/archlinux/mate-power-manager.install b/distro/archlinux/mate-power-manager.install
new file mode 100644
index 0000000..1e3ac8e
--- /dev/null
+++ b/distro/archlinux/mate-power-manager.install
@@ -0,0 +1,22 @@
+pkgname=mate-power-manager
+
+post_install() {
+ usr/sbin/mateconfpkg --install ${pkgname}
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/mateconfpkg --uninstall ${pkgname}
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
diff --git a/distro/fedora/mate-power-manager.spec b/distro/fedora/mate-power-manager.spec
new file mode 100644
index 0000000..0eb118a
--- /dev/null
+++ b/distro/fedora/mate-power-manager.spec
@@ -0,0 +1,156 @@
+Summary: MATE power management service
+Name: mate-power-manager
+Version: 2.32.0
+Release: 1%{?dist}
+License: GPLv2+ and GFDL
+Group: Applications/System
+Source: http://matsusoft.com.ar/uploads/gnu-linux/mate/mate-power-manager.tar.gz
+
+URL: http://projects.gnome.org/gnome-power-manager/
+
+BuildRequires: mate-panel
+BuildRequires: scrollkeeper
+BuildRequires: mate-doc-utils
+BuildRequires: desktop-file-utils
+BuildRequires: gettext
+BuildRequires: libtool
+BuildRequires: cairo-devel
+BuildRequires: libcanberra-devel
+BuildRequires: libnotify-devel >= 0.5.0
+BuildRequires: upower-devel >= 0.9.0
+BuildRequires: intltool
+BuildRequires: unique-devel >= 1.0.0
+BuildRequires: glib2-devel >= 2.25.9
+BuildRequires: GConf2-devel >= 2.31.1
+BuildRequires: gtk2-devel >= 2.16.0
+BuildRequires: dbus-glib-devel
+BuildRequires: libwnck-devel
+BuildRequires: control-center-devel >= 2.31.4
+Requires: mate-icon-theme
+Requires: libcanberra
+Requires: dbus-x11
+Requires: upower >= 0.9.0
+Requires(post): scrollkeeper
+Requires(postun): scrollkeeper
+Provides: gnome-power-manager = %{version}
+Provides: gnome-power-manager = %{version}
+Conflicts: gnome-power-manager >= 3.0
+# obsolete sub-package
+Obsoletes: gnome-power-manager-extra <= 2.30.1
+Provides: gnome-power-manager-extra
+
+Patch0: dont-eat-the-logs.patch
+Patch1: gpm-manager.patch
+BuildRequires: autoconf automake libtool
+
+%description
+MATE Power Manager uses the information and facilities provided by UPower
+displaying icons and handling user callbacks in an interactive MATE session.
+
+%prep
+%setup -q
+%patch0 -p1 -b .logs
+%patch1 -p1 -b .gpm
+
+autoreconf -i -f
+
+%build
+%configure --disable-scrollkeeper \
+ --disable-schemas-install \
+ --disable-applets
+make AM_LDFLAGS="-Wl,-O1,--as-needed"
+
+# strip unneeded translations from .mo files
+# ideally intltool (ha!) would do that for us
+# http://bugzilla.gnome.org/show_bug.cgi?id=474987
+cd po
+grep -v ".*[.]desktop[.]in[.]in$\|.*[.]server[.]in[.]in$" POTFILES.in > POTFILES.keep
+mv POTFILES.keep POTFILES.in
+intltool-update --pot
+for p in *.po; do
+ msgmerge $p %{name}.pot > $p.out
+ msgfmt -o `basename $p .po`.gmo $p.out
+done
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+desktop-file-install --vendor mate --delete-original \
+ --dir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart \
+ $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/mate-power-manager.desktop
+
+# save space by linking identical images in translated docs
+helpdir=$RPM_BUILD_ROOT%{_datadir}/mate/help/%{name}
+for f in $helpdir/C/figures/*.png; do
+ b="$(basename $f)"
+ for d in $helpdir/*; do
+ if [ -d "$d" -a "$d" != "$helpdir/C" ]; then
+ g="$d/figures/$b"
+ if [ -f "$g" ]; then
+ if cmp -s $f $g; then
+ rm "$g"; ln -s "../../C/figures/$b" "$g"
+ fi
+ fi
+ fi
+ done
+done
+
+%find_lang %{name} --with-gnome
+
+%post
+export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+gconftool-2 --makefile-install-rule \
+ %{_sysconfdir}/gconf/schemas/mate-power-manager.schemas >/dev/null || :
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &> /dev/null || :
+fi
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%pre
+if [ "$1" -gt 1 ]; then
+ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+ gconftool-2 --makefile-uninstall-rule \
+ %{_sysconfdir}/gconf/schemas/mate-power-manager.schemas &> /dev/null || :
+fi
+
+%preun
+if [ "$1" -eq 0 ]; then
+ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+ gconftool-2 --makefile-uninstall-rule \
+ %{_sysconfdir}/gconf/schemas/mate-power-manager.schemas &> /dev/null || :
+fi
+
+%postun
+touch --no-create %{_datadir}/icons/hicolor
+if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &> /dev/null || :
+fi
+update-desktop-database %{_datadir}/applications &> /dev/null || :
+
+%files -f %{name}.lang
+%defattr(-,root,root)
+%doc AUTHORS COPYING README
+%{_bindir}/*
+%{_datadir}/applications/*.desktop
+%{_datadir}/dbus-1/services/mate-power-manager.service
+%{_datadir}/mate-power-manager/*.ui
+%{_datadir}/mate-power-manager/icons/hicolor/*/*/*.*
+%{_datadir}/icons/hicolor/*/apps/mate-brightness-applet.*
+%{_datadir}/icons/hicolor/*/apps/mate-inhibit-applet.*
+%{_datadir}/icons/hicolor/*/apps/mate-power-manager.*
+%{_datadir}/icons/hicolor/*/apps/mate-power-statistics.*
+%{_datadir}/omf/mate-power-manager
+%{_datadir}/polkit-1/actions/org.mate.power.policy
+%dir %{_datadir}/mate-power-manager
+#%{_datadir}/mate-2.0/ui/*.xml
+#%{_libdir}/bonobo/servers/*.server
+#%{_libexecdir}/*
+%config(noreplace) %{_sysconfdir}/gconf/schemas/*.schemas
+%{_mandir}/man1/*.1.gz
+%{_sbindir}/*
+%{_sysconfdir}/xdg/autostart/*.desktop
+
+%changelog
+* Tue Jun 28 2011 Juan Rodriguez <[email protected]> 2.32.0-1
+- Initial release of Mate-Power-Manager
diff --git a/distro/ubuntu/build b/distro/ubuntu/build
new file mode 100755
index 0000000..99a3e90
--- /dev/null
+++ b/distro/ubuntu/build
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# fill it
+pkgname=mate-power-manager
+pkgver=2011.12.01
+pkgrel=1
+pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system for Mate Desktop"
+
+# editar esta funcion!
+build() {
+ cd $pkgsrc
+ # descomprimir
+ tar xvzf download
+ # entramos a la carpeta
+ cd ${pkgname}
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/${pkgname} \
+ --disable-scrollkeeper || return 1
+
+ # there is some pre-compiled files on the tar
+ make || return 1
+
+ make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
+ #rm -f ${pkgdir}/usr/lib/*.la # can be used options=(!libtools)
+
+ install -m755 -d "${pkgdir}/usr/share/mateconf/schemas"
+ mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas || return 1
+ rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas
+}
+
+# esto incluye la parte que se repite en la mayoria de los builds
+. /usr/share/mate-doc-utils/mate-debian.sh
diff --git a/distro/ubuntu/postinst b/distro/ubuntu/postinst
new file mode 100755
index 0000000..366dc49
--- /dev/null
+++ b/distro/ubuntu/postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+pkgname=mate-power-manager
+
+/usr/sbin/mateconfpkg --install ${pkgname}
+gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/distro/ubuntu/postrm b/distro/ubuntu/postrm
new file mode 100755
index 0000000..c575111
--- /dev/null
+++ b/distro/ubuntu/postrm
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+pkgname=mate-power-manager
+
+gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+
+exit 0
diff --git a/distro/ubuntu/preinst b/distro/ubuntu/preinst
new file mode 100755
index 0000000..1d5bdca
--- /dev/null
+++ b/distro/ubuntu/preinst
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+pkgname=mate-power-manager
+
+/usr/sbin/mateconfpkg --uninstall ${pkgname}
+
diff --git a/distro/ubuntu/prerm b/distro/ubuntu/prerm
new file mode 100755
index 0000000..c789a9a
--- /dev/null
+++ b/distro/ubuntu/prerm
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+pkgname=mate-power-manager
+
+/usr/sbin/mateconfpkg --uninstall ${pkgname}
+
+exit 0