File kmldonkey.spec of Package kmldonkey

#
# spec file for package kmldonkey
#
# Copyright (c) 2012 Asterios Dramis <asterios.dramis@gmail.com>.
#
# 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.

%define so_ver 5

Name:           kmldonkey
Version:        2.1.3
Release:        0
Summary:        Cross-platform graphical user interface for MLDonkey
License:        GPL-2.0+
Group:          Productivity/Networking/File-Sharing
Url:            http://userbase.kde.org/KMLDonkey
# svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/network/kmldonkey/@1287107 kmldonkey-2.1.3; tar jcf kmldonkey-2.1.3.tar.bz2 kmldonkey-2.1.3/
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}-lang.tar.bz2
BuildRequires:  libkde4-devel
Requires:       MLDonkey
%kde4_runtime_requires
Recommends:     %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
KMLDonkey is a cross-platform graphical user interface for MLDonkey,
a cross-platform peer-to-peer downloader.

%package devel
Summary:        Development Files for KMLDonkey
Group:          Development/Libraries/C and C++
Requires:       liblibkmldonkey%{so_ver} = %{version}

%description devel
This package contains libraries and header files for KMLDonkey.

%package -n liblibkmldonkey%{so_ver}
Summary:        KMLDonkey Shared Library
Group:          System/Libraries

%description -n liblibkmldonkey%{so_ver}
This package contains the shared library for KMLDonkey.

%lang_package

%prep
%setup -q -a 1
echo "add_subdirectory( po )" >> CMakeLists.txt

%build
%cmake_kde4 -d build
%make_jobs

%install
%kde4_makeinstall -C build

# Fix rpmlint warning "script-without-shebang"
chmod 644 %{buildroot}%{_kde4_applicationsdir}/kmldonkey.desktop

%find_lang %{name}

%post -n liblibkmldonkey%{so_ver} -p /sbin/ldconfig

%postun -n liblibkmldonkey%{so_ver} -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog
%{_kde4_applicationsdir}/kmldonkey.desktop
%{_kde4_appsdir}/kmldonkey/
%{_kde4_bindir}/kmldonkey
%{_kde4_iconsdir}/hicolor/*/apps/kmldonkey.png
%{_kde4_modulesdir}/plasma_applet_kmldonkey.so
%{_kde4_modulesdir}/plasma_engine_kmldonkey.so
%{_kde4_servicesdir}/plasma-applet-kmldonkey.desktop
%{_kde4_servicesdir}/plasma-engine-kmldonkey.desktop

%files devel
%defattr(-,root,root,-)
%{_kde4_includedir}/kmldonkey/
%{_kde4_libdir}/liblibkmldonkey.so

%files lang -f %{name}.lang
%defattr(-,root,root,-)

%files -n liblibkmldonkey%{so_ver}
%defattr(-,root,root,-)
%{_kde4_libdir}/liblibkmldonkey.so.%{so_ver}*

%changelog