Summary:	A volume manager daemon
Summary(ja):	ボリュームマネージャデーモン
Name:		ivman
Version:	0.6.14
Release:	2%{?_dist_release}
License:	GPL2,QPL
URL:		http://ivman.sourceforge.net/
Source0:	http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.bz2
Source1:	ivman-media-checker
Source2:	ivman-umount
Source3:	ivman-umount.svg
Source3:	ivman-umount-48.png
Vendor:		Project Vine
Distribution:	Vine Linux
Group:		Applications/System
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	libxml2-devel
BuildRequires:	glib-devel
BuildRequires:	glib2-devel
BuildRequires:	dbus-devel
BuildRequires:	dbus-glib-devel
BuildRequires:	hal-devel
Requires:	pmount

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

%description -l ja
ivman は HAL イベントのハンドラのひとつで、自動マウントを行なうデーモン
プログラムです。
 ・外付けデバイスが接続された
 ・CD が挿入された
 ・ノート PC が閉じられた
などのイベントに対して任意のコマンドを実行することもできます。
起動は各ユーザごとに行う必要があります(ログインセッションや、スタートアッ
プの最後尾が推奨)。
この Vine パッケージには ivman がデバイスをマウントしたときに、ファイル
マネージャで /media ディレクトリを開くスクリプト ivman-media-checker と
アンマウント用スクリプト ivman-umount が同梱されています。
ivman-media-checker  は ivman デーモンの起動も行います。

%prep

%setup -q

%build
%configure 
%__make

%install
rm -rf $RPM_BUILD_ROOT
%__make DESTDIR=$RPM_BUILD_ROOT install
%__install -m 755 %{SOURCE1} %{SOURCE2} %{buildroot}%{_bindir}

# icons
%__mkdir_p %{buildroot}%{_datadir}/pixmaps
%__cp -a %{_sourcedir}/ivman-umount.svg %{_sourcedir}/ivman-umount-48.png %{buildroot}%{_datadir}/pixmaps

# desktop menu entry
%__mkdir -p %{buildroot}%{_datadir}/applications
%__cat > %{buildroot}%{_datadir}/applications/ivman-umount.desktop <<EOF
[Desktop Entry]
Name=ivman-umount
Name[ja]=ivman-umount
Comment=ivman-umount
Comment[ja]=/media 以下のアンマウントユーティリティ
Exec=ivman-umount
Icon=/usr/share/pixmaps/ivman-umount.svg
Terminal=false
MultipleArgs=false
Type=Application
Categories=Applications;Utility;
EOF

%clean
%__rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc README COPYING TODO ChangeLog
%{_sysconfdir}/*
%{_bindir}/*
%{_datadir}/man/*
%{_datadir}/locale/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/ivman-umount.desktop

%changelog
* Sat Sep 12 2009 TANAKA hiroaki <mosaicist@par.odn.ne.jp> 0.6.14-2
- rebuild by genuine Vine Linux 6.0 (+VineSeed) (Haut Brion)

* Wed Aug 19 2009 TANAKA hiroaki <mosaicist@par.odn.ne.jp> 0.6.14-1
- initial build for Vine Linux