File btype.spec of Package btype
#
# spec file for package btype (Version 0.4.1)
#
# Copyright (c) 2011 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-btype
Version: 0.4.1
Release: 0
License: GPL-2.0+
Summary: Torrent File Editor
URL: http://kde-apps.org/content/show.php/.torrent+file+editor?content=25051
Group: Productivity/Networking/File-Sharing
Source0: http://www.kde-apps.org/CONTENT/content-files/25051-btype-%{version}.tar.bz2
Source1: btype.png
# PATCH-FIX-OPENSUSE btype-0.4.1-libsuffix.patch lazy.kent@opensuse.org -- add suffix to libdir
Patch0: btype-0.4.1-libsuffix.patch
# PATCH-FIX-OPENSUSE btype-0.4.1-optflags.patch lazy.kent@opensuse.org -- use optflags
Patch1: btype-0.4.1-optflags.patch
BuildRequires: ImageMagick
BuildRequires: kdelibs3-devel
BuildRequires: scons <= 3.0.1 python
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: btype=%{version}
%description
btype Tester is an easy-to-use program for editing torrent files.
It supports read, edit and save.
Authors:
--------
Michael Pyne <michael.pyne@kdemail.net>
%prep
%setup -q -n btype-%{version}
%ifarch x86_64 aarch64
%patch -P 0
%endif
%patch -P 1
%build
python2 /usr/bin/scons configure
python2 /usr/bin/scons
%install
# Create desktop file.
%__cat > btype.desktop << EOF
[Desktop Entry]
Name=btype Tester
GenericName=Torrent File Editor
GenericName[ru]=Редактор торрент-файлов
Type=Application
Exec=btype -caption "%c" %i
Icon=btype
Categories=KDE;Network;P2P;
Comment=Easy-to-use program for editing torrent files
Comment[ru]=Программа для редактирования торрент-файлов
StartupNotify=true
Terminal=false
EOF
# End of desktop file.
. /etc/opt/kde3/common_options
DESTDIR=%{buildroot} python2 /usr/bin/scons install
%__install -Dm 0644 btype.desktop \
%{buildroot}%{_datadir}/applications/kde/btype.desktop
%__install -Dm 0644 %{S:1} \
%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/btype.png
for s in 96 64 48 32 22 16 ; do
%__install -dm 0755 \
%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
convert -resize ${s}x${s} %{S:1} \
%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/btype.png
done
kde_post_install
%files
%defattr(-,root,root,-)
%doc HISTORY LICENSE README
%{_bindir}/btype
%{_datadir}/applications/kde/btype.desktop
%dir %{_datadir}/icons/hicolor/96x96
%dir %{_datadir}/icons/hicolor/96x96/apps
%{_datadir}/icons/hicolor/*/apps/btype.png
%changelog