%define name pmount
%define version 0.9.22
%define release 2%{?_dist_release}

Summary: Pmount allow mounting devices without fstab modifications
Summary(ja): fstab を書き換えずにデバイスをマウントするためのツール
Name: %{name}
Version: %{version}
Release: %{release}

Source0: http://www.piware.de/projects/%{name}-%{version}.tar.bz2
#Patch0: pmount-0.9.9-makefile.patch
Patch1: pmount-0.9.17-nosetuid.patch

License: GPL
# realpath.c is GPLv2+. Others are GPL+;
Group: System Environment/Base
Url: http://pmount.alioth.debian.org/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
#Buildrequires: automake
#Buildrequires: automake19
Buildrequires: sysfsutils-devel
Buildrequires: libblkid-devel
Buildrequires: dbus-devel
Buildrequires: perl-XML-Parser
Buildrequires: intltool

%description
Pmount allow mounting usb, firewire and pcmci media without modifying
/etc/fstab. It's a good base for automount software.

%description -l ja
Pmount は usb や firewire, pcmcia のようなメディアを /etc/fstab を
書き換えずに mount するためのツールです。

%prep
%setup -q
#%patch0 -p1
%patch1 -p1

%build
#automake-1.9

%configure \
  --disable-hal \
  --with-lock-dir=%{_localstatedir}/lock/pmount \
  --with-whitelist=%{_sysconfdir}/pmount.allow

make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%__make DESTDIR=$RPM_BUILD_ROOT install

%find_lang %name

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS README.devel TODO COPYING ChangeLog
%config(noreplace) %{_sysconfdir}/pmount.allow
%attr(4755,root,root) %{_bindir}/pmount
%attr(4755,root,root) %{_bindir}/pumount
%{_mandir}/man1/p*mount*.1*


%changelog
* Sat Jan 07 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.22-2
- remove BuildRequires: hal-devel
- add BuildRequires: libblkid-devel
- add configure option (--disable-hal)

* Tue May 25 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.9.22-1
- new upstream release
- added Buildrequires: intltool

* Wed Sep 23 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.9.20-1
- new upstream release

* Tue Jun 16 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.9.19-1vl5
- new upstream release
- fixed "mount" in %description -l ja
- fixed BuildRoot
- dropt Patch0
- added Patch1 (import Fedora)
- don't use automake19

* Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 0.9.13-1vl5
- applied new versioning policy, spec in utf-8
- fixed automake to 1.9

* Fri May 04 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.13-0vl3
- rebuild with dbus-1.0
- add BuildRequires: dbus-devel

* Sun Oct 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.13-0vl2
- change Group to System Environment/Base
- fix kanji code of spec file

* Sat Oct 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.13-0vl1
- initial build for Vine Linux based on MDV package.

* Wed Aug 02 2006 Frederic Crozat <fcrozat@mandriva.com> 0.9.9-2mdv2007.0
- Patch1: don't use deprecated dbus api

* Tue Mar 07 2006 Nicolas L馗ureuil <neoclust@mandriva.org> 0.9.9-1mdk
- New release 0.9.9

* Thu Jan 26 2006 Gテカtz Waschk <waschk@mandriva.org> 0.9.6-5mdk
- rebuild for new dbus

* Tue Dec 13 2005 Thierry Vignaud <tvignaud@mandriva.com> 0.9.6-4mdk
- relink with libsysfs2
- patch 0: fix detecting libsysfs2

* Sun Nov  6 2005 Gテカtz Waschk <waschk@mandriva.org> 0.9.6-3mdk
- install it with setuid root

* Fri Oct 28 2005 Gテカtz Waschk <waschk@mandriva.org> 0.9.6-2mdk
- fix buildrequires

* Wed Oct 26 2005 Couriousous <couriousous@mandriva.org> 0.9.6-1mdk
- first Mandriva release

