[gnome-power-manager] trivial: add an example spec file, as distros keep getting this wrong



commit 375d62cf9635a0f6f8ec911b3eb62e0be12ed1ea
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 22 17:18:10 2010 +0100

    trivial: add an example spec file, as distros keep getting this wrong

 contrib/gnome-power-manager.spec.in |  120 +++++++++++++++++++++++++++++++++++
 1 files changed, 120 insertions(+), 0 deletions(-)
---
diff --git a/contrib/gnome-power-manager.spec.in b/contrib/gnome-power-manager.spec.in
new file mode 100644
index 0000000..2d8908f
--- /dev/null
+++ b/contrib/gnome-power-manager.spec.in
@@ -0,0 +1,120 @@
+%define alphatag #ALPHATAG#
+
+Summary: GNOME power management service
+Name: gnome-power-manager
+Version: #VERSION#
+Release: 1.#BUILD#%{?alphatag}%{?dist}
+License: GPLv2+ and GFDL
+Group: Applications/System
+Source: http://download.gnome.org/sources/gnome-power-manager/2.31/gnome-power-manager-%{version}.tar.gz
+
+URL: http://projects.gnome.org/gnome-power-manager/
+
+BuildRequires: gnome-panel-devel >= 2.31.2
+BuildRequires: scrollkeeper
+BuildRequires: gnome-doc-utils >= 0.3.2
+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
+Requires: gnome-icon-theme
+Requires: libcanberra
+Requires: dbus-x11
+Requires: upower >= 0.9.0
+Requires(post): scrollkeeper
+Requires(postun): scrollkeeper
+
+# obsolete sub-package
+Obsoletes: gnome-power-manager-extra <= 2.30.1
+Provides: gnome-power-manager-extra
+
+%description
+GNOME Power Manager uses the information and facilities provided by UPower
+displaying icons and handling user callbacks in an interactive GNOME session.
+
+%prep
+%setup -q
+
+%build
+%configure --disable-scrollkeeper \
+	--disable-schemas-install \
+	--disable-applets
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+desktop-file-install --vendor gnome --delete-original                   \
+  --dir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart                     \
+  $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/gnome-power-manager.desktop
+
+%find_lang %name --with-gnome
+
+%post
+export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+gconftool-2 --makefile-install-rule \
+        %{_sysconfdir}/gconf/schemas/gnome-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/gnome-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/gnome-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/gnome-power-manager.service
+%{_datadir}/gnome-power-manager/*.ui
+%{_datadir}/gnome-power-manager/icons/hicolor/*/*/*.*
+%{_datadir}/icons/hicolor/*/apps/gnome-brightness-applet.*
+%{_datadir}/icons/hicolor/*/apps/gnome-inhibit-applet.*
+%{_datadir}/icons/hicolor/*/apps/gnome-power-manager.*
+%{_datadir}/icons/hicolor/*/apps/gnome-power-statistics.*
+%{_datadir}/omf/gnome-power-manager
+%{_datadir}/polkit-1/actions/org.gnome.power.policy
+%dir %{_datadir}/gnome-power-manager
+#%{_datadir}/gnome-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
+* #LONGDATE# Richard Hughes <richard hughsie com> #VERSION#-0.#BUILD##ALPHATAG#
+- Update from git
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]