Blob Blame History Raw
%if 0%{?fedora}
%global p7zip 1
%endif

Name:    ark
Summary: Archive manager
Version: 4.10.5
Release: 4%{?dist}

License: GPLv2+
URL:     http://utils.kde.org/projects/ark 
%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz

## upstreamable patches
# libkerfuffle namelink_skip
Patch50: ark-4.7.80-namelink_skip.patch

# https://git.reviewboard.kde.org/r/107635/
Patch52: ark-4.9.97-r107635.patch

# https://git.reviewboard.kde.org/r/107634/
Patch53: ark-4.9.97-improve_subfolder_autodetection.patch

# drop lha/rar/7z, we don't have it in rhel
Patch54: ark-4.10.5-misc.patch

## upstream patches

BuildRequires: bzip2-devel
BuildRequires: desktop-file-utils
BuildRequires: kdelibs4-devel >= %{version}
BuildRequires: kde-baseapps-devel >= %{version}
BuildRequires: pkgconfig(libarchive)
BuildRequires: pkgconfig(liblzma) 
BuildRequires: zlib-devel
# need only for ark unit tests
#BuildRequires: pkgconfig(QJson) 

# when split occured
Conflicts: kdeutils-common < 6:4.7.80

Provides: ark-part = %{version}-%{release}

Obsoletes: kdeutils-ark < 6:4.7.80
Provides:  kdeutils-ark = 6:%{version}-%{release}

Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}
%if 0%{?p7zip}
Requires: p7zip-plugins
%endif

%description
Ark is a program for managing various archive formats.

Archives can be viewed, extracted, created and modified from within Ark.
The program can handle various formats such as tar, gzip, bzip2, zip,
rar and lha (if appropriate command-line programs are installed).

%package libs
Summary: Runtime libraries for %{name} 
# libkerfuffle is BSD, plugins are mix of BSD and GPLv2+
License: BSD and GPLv2+
Requires: %{name} = %{version}-%{release}
Obsoletes: kdeutils-ark-libs < 6:4.7.80
Provides:  kdeutils-ark-libs = 6:%{version}-%{release}
%description libs
%{summary}.


%prep
%setup -q -n %{name}-%{version}

%patch50 -p1 -b .namelink_skip
%patch52 -p1 -b .r107635
%patch53 -p1 -b .improve_subfolder_autodetection
%if 0%{?rhel}
%patch54 -p1 -b .misc
%endif

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang ark --with-kde --without-mo


%check
desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/ark.desktop


%post
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:

%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:
fi

%files -f ark.lang
%doc COPYING
%{_kde4_bindir}/ark
%{_kde4_appsdir}/ark/
%{_kde4_datadir}/config.kcfg/ark.kcfg
%{_kde4_datadir}/kde4/services/ark*.desktop
%{_kde4_datadir}/kde4/services/ServiceMenus/ark*.desktop
%{_kde4_datadir}/applications/kde4/ark.desktop
%{_kde4_iconsdir}/hicolor/*/apps/ark.*
%{_kde4_libdir}/kde4/arkpart.so
%{_kde4_libdir}/kde4/libextracthere.so
%{_mandir}/man1/ark.1*

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig

%files libs
%{_kde4_libdir}/libkerfuffle.so.4*
%{_kde4_libdir}/kde4/kerfuffle_*.so
%{_kde4_datadir}/kde4/services/kerfuffle*.desktop
%{_kde4_datadir}/kde4/servicetypes/kerfufflePlugin.desktop


%changelog
* Mon Feb 10 2014 Than Ngo <than@redhat.com> - 4.10.5-4
- don't include rar/7z/lha plugins in rhel

* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 4.10.5-3
- Mass rebuild 2014-01-24

* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 4.10.5-2
- Mass rebuild 2013-12-27

* Sun Jun 30 2013 Than Ngo <than@redhat.com> - 4.10.5-1
- 4.10.5

* Sat Jun 01 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.10.4-1
- 4.10.4

* Mon May 06 2013 Than Ngo <than@redhat.com> - 4.10.3-1
- 4.10.3

* Wed Apr 24 2013 Than Ngo <than@redhat.com> - 4.10.2-2
- requires p7zip only in fedora

* Sun Mar 31 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.10.2-1
- 4.10.2

* Sat Mar 02 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.10.1-1
- 4.10.1

* Fri Feb 01 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.10.0-1
- 4.10.0

* Tue Jan 22 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.9.98-1
- 4.9.98
- respin reviewboard#107634 patch

* Thu Jan 17 2013 Tomas Bzatek <tbzatek@redhat.com> - 4.9.97-3
- Rebuilt for new libarchive

* Sat Jan 05 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.9.97-2
- Ark needs to know about application/x-source-rpm (#885316)
- Improve subfolder autodetection (kde review 107634)
- Don't delete the KPart in the MainWindow destructor (kde review 107635)

* Fri Jan 04 2013 Rex Dieter <rdieter@fedoraproject.org> - 4.9.97-1
- 4.9.97

* Thu Dec 20 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.9.95-1
- 4.9.95

* Tue Dec 04 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.9.90-1
- 4.9.90

* Mon Dec 03 2012 Than Ngo <than@redhat.com> - 4.9.4-1
- 4.9.4

* Sat Nov 03 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.9.3-1
- 4.9.3

* Sat Sep 29 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.9.2-1
- 4.9.2

* Mon Sep 03 2012 Than Ngo <than@redhat.com> - 4.9.1-1
- 4.9.1

* Thu Jul 26 2012 Lukas Tinkl <ltinkl@redhat.com> - 4.9.0-1
- 4.9.0

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.8.97-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Wed Jul 11 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.97-1
- 4.8.97

* Tue Jul 10 2012 Rex Dieter <rdieter@fedoraproject.org> 4.8.95-2
- update builddeps

* Thu Jun 28 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.95-1
- 4.8.95

* Sat Jun 09 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.90-1
- 4.8.90

* Fri Jun 01 2012 Jaroslav Reznik <jreznik@redhat.com> - 4.8.80-1
- 4.8.80

* Mon Apr 30 2012 Jaroslav Reznik <jreznik@redhat.com> - 4.8.3-1
- 4.8.3

* Fri Mar 30 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.2-1
- 4.8.2

* Mon Mar 05 2012 Jaroslav Reznik <jreznik@redhat.com> - 4.8.1-1
- 4.8.1

* Thu Jan 26 2012 Tomas Bzatek <tbzatek@redhat.com> - 4.8.0-3
- Rebuilt for new libarchive

* Tue Jan 24 2012 Jaroslav Reznik <jreznik@redhat.com> - 4.8.0-2
- respin

* Sun Jan 22 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.8.0-1
- 4.8.0

* Wed Jan 04 2012 Rex Dieter <rdieter@fedoraproject.org> - 4.7.97-1
- 4.7.97

* Thu Dec 22 2011 Radek Novacek <rnovacek@redhat.com> - 4.7.95-1
- 4.7.95

* Thu Dec 15 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.90-2
- %%doc COPYING

* Thu Dec 08 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.90-1
- 4.7.90

* Sat Nov 26 2011 Rex Dieter <rdieter@fedoraproject.org> 4.7.80-1
- first try