File kde3-kpar2.spec of Package kde3-kpar2
#
# spec file for package kde3-kpar2 (Version 0.3.1)
#
# Copyright (c) 2009, 2010 Kyrill Detinov
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%define _prefix /opt/kde3
Name: kde3-kpar2
Version: 0.3.1
Release: 0
URL: http://code.google.com/p/kpar2/
License: GPLv2
Source0: %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM kde3-kpar2-0.3.1-libdir.patch lazy.kent@opensuse.org
# -- fix hardcoded path
Patch0: kde3-kpar2-0.3.1-libdir.patch
Group: Productivity/File utilities
Summary: PAR2 Verification and Repair Program
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: kdelibs3-devel
BuildRequires: cmake
BuildRequires: libpar2-devel
BuildRequires: libsigc++2-devel
%description
KPar2 is an application for the verification and repair of source files
using parity *.par2 and *.PAR2 files.
Authors:
--------
Lawrence C. Lee <valheru@facticius.net>
%prep
%setup -q -n kpar2-%{version}
%patch0
%build
%{__mkdir} build
cd build
export CXXFLAGS="$CXXFLAGS -Wl,--add-needed -std=c++11"
cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix}
%{__make} %{?jobs:-j%jobs}
%install
# Create new .desktop because the original one is incorrect
%{__cat} > src/kpar2.desktop << EOF
[Desktop Entry]
Name=KPar2
GenericName=A PAR2 verification and repair application
GenericName[ru]=Проверка и восстановление из PAR2-архивов
Exec=kpar2 %i %m -caption "%c"
Icon=kpar2
Type=Application
Comment=PAR2 verification and repair application
Comment[ru]=Программа для проверки и восстановления файлов из PAR2-архивов
MimeType=application/x-par2;
Categories=KDE;Utility;Archiving;X-KDE-Utilities-File;
Terminal=false
X-DBUS-ServiceName=com.googlecode.kpar2
X-DBUS-StartupType=Multi
X-KDE-HasTempFileOption=true
X-KDE-StartupNotify=true
EOF
. /etc/opt/kde3/common_options
pushd build
%{makeinstall}
popd
%find_lang kpar2
kde_post_install
%clean
%{__rm} -rf %{buildroot}
%files -f kpar2.lang
%defattr(-,root,root,-)
%{_bindir}/kpar2
%{_libdir}/kde3/libkpar2part.*
%{_datadir}/apps/kpar2
%{_datadir}/mimelnk/application/x-par2.desktop
%{_datadir}/applications/kde/kpar2.desktop
%{_datadir}/services/kpar2_part.desktop
%{_datadir}/icons/hicolor/48x48/apps/kpar2.png
%changelog
# kate: space-indent on; indent-width 4;