summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec')
-rw-r--r--redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec39
1 files changed, 32 insertions, 7 deletions
diff --git a/redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec b/redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec
index 350e38237..d8ed7076a 100644
--- a/redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec
+++ b/redhat/applications/kio-umountwrapper/trinity-kio-umountwrapper.spec
@@ -1,12 +1,10 @@
# Default version for this component
%define kdecomp kio-umountwrapper
-%define version 0.2
-%define release 2
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?_prefix}" != "/usr"
%define _variant .opt
-%define _docdir %{_prefix}/share/doc
+%define _docdir %{_datadir}/doc
%endif
# TDE 3.5.13 specific building variables
@@ -18,8 +16,8 @@ BuildRequires: autoconf automake libtool m4
Name: trinity-%{kdecomp}
Summary: progress dialog for safely removing devices in Trinity.
-Version: %{?version}
-Release: %{?release}%{?dist}%{?_variant}
+Version: 0.2
+Release: 3%{?dist}%{?_variant}
License: GPLv2+
Group: Applications/Utilities
@@ -32,6 +30,7 @@ Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{kdecomp}-3.5.13.tar.gz
+Source1: media_safelyremove.desktop
BuildRequires: tqtinterface-devel
@@ -78,19 +77,45 @@ export PATH="%{_bindir}:${PATH}"
%__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot}
+%__install -D -m 644 %{SOURCE1} %{?buildroot}%{_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_kio-umountwrapper
+#%__install -D -m 644 %{SOURCE1} %{?buildroot}%{_datadir}/apps/dolphin/servicemenus/media_safelyremove.desktop_kio-umountwrapper
+%__install -D -m 644 %{SOURCE1} %{?buildroot}%{_datadir}/apps/d3lphin/servicemenus/media_safelyremove.desktop_kio-umountwrapper
+
%clean
%__rm -rf %{buildroot}
-
+%post
+for f in konqueror d3lphin; do
+ alternatives --install \
+ %{_datadir}/apps/${f}/servicemenus/media_safelyremove.desktop \
+ media_safelyremove.desktop_${f} \
+ %{_datadir}/apps/${f}/servicemenus/media_safelyremove.desktop_kio-umountwrapper \
+ 20
+done
+
+
+%postun
+if [ $1 -eq 0 ]; then
+ for f in konqueror d3lphin; do
+ alternatives --remove \
+ media_safelyremove.desktop_${f} \
+ %{_datadir}/apps/${f}/servicemenus/media_safelyremove.desktop_kio-umountwrapper
+ done
+fi
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/kio_umountwrapper
-
+%{_datadir}/apps/konqueror/servicemenus/media_safelyremove.desktop_kio-umountwrapper
+#%{_datadir}/apps/dolphin/servicemenus/media_safelyremove.desktop_kio-umountwrapper
+%{_datadir}/apps/d3lphin/servicemenus/media_safelyremove.desktop_kio-umountwrapper
%Changelog
+* Sun Jul 08 2012 Francois Andriot <francois.andriot@free.fr> - 0.2-3
+- Add 'desktop' file, to make this program useful :-)
+
* Wed May 02 2012 Francois Andriot <francois.andriot@free.fr> - 0.2-2
- Rebuilt for Fedora 17
- Removes post and postun