File ivman.spec of Package ivman

#
# spec file for package ivman (Version 0.6.14)
#
# 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:           ivman
Summary:        A Generic Handler for HAL Events
License:        GPLv2+
Group:          System/Daemons
Url:            http://ivman.sourceforge.net/
Version:        0.6.14
Release:        210
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
Patch4:         ivman-0.6.14-fdleak.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
%patch4

%build
autoreconf -fi
%configure 
%{__make} %{?_smp_mflags}

%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
openSUSE Build Service is sponsored by