File hp-drive-guard.spec of Package hp-drive-guard
#
# spec file for package hp-drive-guard (Version 0.3.12)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: hp-drive-guard
BuildRequires: fdupes gnome-common intltool
BuildRequires: gtk2-devel libnotify-devel
BuildRequires: PolicyKit-gnome-devel
%if %suse_version > 1120
BuildRequires: libupower-glib-devel
%else
BuildRequires: hal-devel
%endif
# BuildRequires: scrollkeeper
BuildRequires: update-desktop-files
License: GPLv2+
Group: Hardware/Mobile
Version: 0.3.12
Release: 2
Summary: HP DriveGuard for SuSE
Source: hp-drive-guard-%{version}.tar.bz2
Patch1: 0001-Fix-misc-compile-warnings.patch
Url: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
HP DriveGuard for SuSE. Can protect hard disks on HP laptops by
spinning them down when shaking or free-fall is detected.
Authors:
--------
Hans Petter Jansson <hpj@novell.com>
%lang_package
%prep
%setup -q
%patch1 -p1
%if %suse_version > 1120
%define pm_method upower
%else
%define pm_method hal
%endif
%if %suse_version >= 1120
%define user_setup --enable-user-setup
%else
# HP requested to prohibit changing parameters in setup dialog for SLED
%define user_setup --disable-user-setup
%endif
%build
autoreconf -f -i
%configure --with-pm=%{pm_method} %user_setup \
--disable-schemas-install \
--disable-scrollkeeper
%__make %{?jobs:-j%jobs}
%install
%makeinstall
%find_lang %{name}
%fdupes $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%preun
%{stop_on_removal hp-drive-guard}
%postun
%{restart_on_update hp-drive-guard}
%insserv_cleanup
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%config(noreplace) /etc/*.conf
%{_bindir}/*
%{_sbindir}/*
%{_libexecdir}/hp-drive-guard
%{_sysconfdir}/xdg/autostart/hp-drive-guard-client.desktop
%{_sysconfdir}/dbus-1/system.d/hp-drive-guard-dbus.conf
%{_sysconfdir}/init.d/hp-drive-guard
%{_datadir}/PolicyKit/policy/*
%changelog