File ivman.spec of Package ivman

#
# spec file for package ivman (Version 0.6.14)
#
# Copyright (c) 2008 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:           ivman
Summary:        A Generic Handler for HAL Events
License:        GPL v2 or later
Group:          System/Daemons
Url:            http://ivman.sourceforge.net/
Version:        0.6.14
Release:        201
Source0:        http://puzzle.dl.sourceforge.net/sourceforge/ivman/%name-%version.tar.bz2
Source1:        halmount.py
Source2:        ivman.init
Source3:        halmount.1
Patch0:         %{name}-config.patch
Patch1:         ivman-0.6.14-daemonize_early.patch
Patch2:         ivman-0.6.14-halmount.patch
Patch3:         ivman-0.6.14-no_assert.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReq:        on
BuildRequires:  glib2-devel hal-devel libxml2-devel pkgconfig
Requires:       dbus-1-python

%description
Originally for automounting, it can now be used to run arbitrary
commands when events or conditions occur or properties are modified on
your hardware (for example, run a command when you close your laptop's
lid or run a command when a particular device is attached or a
particular CD is inserted).



Authors:
--------
    Ikke <eikke@users.sourceforge.net>
    Rohan <ro_han@users.sourceforge.net>

%prep
%setup -q
%patch0
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \
 --sysconfdir=%{_sysconfdir} \
 --datadir=%{_datadir} \
 --libdir=%{_libdir} \
 --mandir=%{_mandir}
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
install -m 755 %{S:1} $RPM_BUILD_ROOT%_bindir
ln -s halmount.py $RPM_BUILD_ROOT%_bindir/halmount
install -d -m 755 %{buildroot}%{_mandir}/man1
install -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1
%find_lang %{name}
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m 755 %{S:2} $RPM_BUILD_ROOT/etc/init.d/%{name}
ln -s /etc/init.d/%{name} $RPM_BUILD_ROOT/usr/sbin/rcivman
#post
#{fillup_and_insserv ivman}

%preun
%stop_on_removal ivman

%postun
%restart_on_update ivman
%insserv_cleanup

%clean
rm -rf  %{buildroot}

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS ChangeLog README TODO
%dir %_sysconfdir/%name
%config %{_sysconfdir}/%{name}/*
%config /etc/init.d/%{name}
%_bindir/*
%_mandir/man1/*
%_mandir/man5/*
%_mandir/man8/*
/usr/sbin/rcivman

%changelog
* Fri Nov 14 2008 lnussel@suse.de
- halmount: add support for PolicyKit
* Tue Oct 28 2008 mkoenig@suse.de
- check for halmount as default
- remove redundant build requires
- require $remote_fs in init script
- don't use assert to avoid exit of the daemon in racy conditions
  [bnc#438968]
* Wed Mar 26 2008 mkoenig@suse.de
- daemonize earlier to avoid hang if dbus is not running [bnc#373704]
* Fri Feb 23 2007 lnussel@suse.de
- halmount: add support for luks encrypted volumes
* Mon Feb 05 2007 mkoenig@suse.de
- update to version 0.6.14:
  * ivman-0.6.13-dbus_hal.patch merged upstream
* Mon Jan 22 2007 mkoenig@suse.de
- Make sure all dbus errors get freed.
* Fri Jan 19 2007 mkoenig@suse.de
- added missing error handling for some dbus functions.
* Thu Jan 18 2007 mkoenig@suse.de
- fixed DBus/HAL integration [#219584]
* Tue Dec 05 2006 mkoenig@suse.de
- update to version 0.6.13:
  * Merged dbus error patch
- provide rcivman symlink [#223757]
* Fri Nov 17 2006 lnussel@suse.de
- add halmount manpage
* Thu Nov 16 2006 lnussel@suse.de
- fix halmount exit code handling. it was sometimes printed rather
  than used as exit code (#221002)
* Thu Nov 16 2006 lnussel@suse.de
- don't enable ivman init script by default (#221613)
* Wed Nov 15 2006 lnussel@suse.de
- return an exit code on umount/eject (#221002)
* Mon Nov 06 2006 mkoenig@suse.de
- fix handling of dbus errors
* Thu Oct 05 2006 mkoenig@suse.de
- added eject functionality (from Carl-Daniel Hailfinger)
* Thu Sep 28 2006 mkoenig@suse.de
- provide init script [#204066]
* Tue Sep 12 2006 lnussel@suse.de
- halmount.py:
  * volume.policy.mount_filesystem is gone, use volume.fstype
  instead
* Tue Jul 18 2006 lnussel@suse.de
- halmount.py:
  * don't pass empty mount options list
  * add --listudi option
* Mon Jul 10 2006 mskibbe@suse.de
- update to version 0.6.12 which contains:
  o updated french translation
  o fix for minor memory leaks
  o bugfix for -c option
  o Now dual-licensed under the GPL-2 and QPL
  o Fixed automounting for HAL 0.5.7 or greater.
  o Added option to process all rules in IvmConfigActions.xml when
  Ivman starts. This allows automounting to take place of devices
  already attached to the system when Ivman is started.
  o Fixed a bug introduced in Ivman 0.6.11 which could cause a long
  delay when starting Ivman
* Thu Mar 16 2006 lnussel@suse.de
- halmount.py:
  * don't use obsolete volume.policy.desired_mount_point (#158266)
  * quote unicode characters/catch exception if python doesn't like
  the string (#158266)
* Wed Feb 22 2006 lnussel@suse.de
- halmount.py:
  * let hal choose the mountpoint if it says mountpoint
  invalid (#146306)
  * catch dbus errors upon connect to avoid ugly message if hal is
  not running/not ready yet
- install symlink halmount -> halmount.py to match config file
* Mon Feb 13 2006 ro@suse.de
- specfile cleanup
* Mon Feb 13 2006 hvogel@suse.de
- Initial package, version 0.6.9
openSUSE Build Service is sponsored by