Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37505119
en ru br
ALT Linux repositórios
S:3.00-alt2.1
5.0: 1.61-alt0.M50.1
4.1: 1.61-alt0.M41.1
4.0: 2.12-alt0.M40.1

Group :: Rede/Transferência de Arquivos
RPM: transmission

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _optlevel s
%def_disable wxgtk
%def_disable qt

%define rname Transmission
%define dname transmission-daemon

Name: transmission
Version: 2.12
Release: alt0.M40.1

Group: Networking/File transfer
Summary: Llightweight BitTorrent client
License: GPLv2 + MIT
Url: http://www.transmissionbt.com/

Provides: %rname = %version-%release

Obsoletes: %name-benc2php
Obsoletes: %name-proxy

Requires: %name-gui = %version-%release
Requires: %name-cli = %version-%release
Requires: %name-remote = %version-%release
Requires: %name-daemon = %version-%release

Requires(post,postun): desktop-file-utils

Source: http://download.m0k.org/%name/files/%name-%version.tar
Patch0: %name-%version-%release.patch
Source1: %dname.init
Source2: %dname.logrotate

BuildPreReq: desktop-file-utils

BuildRequires: gcc-c++ glibc-devel intltool libcurl-devel libevent1.4-devel libnotify-devel
BuildRequires(pre): rpm-utils desktop-file-utils libalternatives-devel
%if "%(rpmvercmp '%{get_version glibc-core}' '2.9')" >= "0"
BuildRequires: libgio-devel
%endif
%if_enabled qt
BuildRequires: libqt4-devel
%endif

%if_enabled wxgtk
BuildRequires: wxGTK2u-devel
%endif

%description
Transmission has been built from the ground up to be a lightweight,
yet powerful BitTorrent client. Its simple, intuitive interface
strikes a balance between providing useful functionality without
feature bloat. Furthermore, it is free for anyone to use or modify.

%package common
Group: Networking/File transfer
Summary: Common files for %name
Conflicts: %name < 1.00-alt10
%description common
Common files for %name

%package gui-common
Group: Networking/File transfer
Summary: Common files for %name
Requires: %name-common = %version-%release
%description gui-common
Common files for %name

%package gtk
Group: Networking/File transfer
Summary: Graphical BitTorrent client
Provides: %name-gui = %version-%release
Requires: %name-common = %version-%release
Requires: %name-gui-common = %version-%release
%description gtk
GTK-based graphical BitTorrent client

%if_enabled qt
%package qt
Group: Networking/File transfer
Summary: Graphical BitTorrent client
Provides: %name-gui = %version-%release
Requires: %name-common = %version-%release
Requires: %name-gui-common = %version-%release
%description qt
Qt-based graphical BitTorrent client
%endif

%if_enabled wxgtk
%package wxgtk
Group: Networking/File transfer
Summary: Graphical BitTorrent client
Provides: %name-gui = %version-%release
Requires: %name-common = %version-%release
Requires: %name-gui-common = %version-%release
%description wxgtk
WxGTK-based graphical BitTorrent client
%endif

%package cli
Group: Networking/File transfer
Summary: Command line BitTorrent client
Requires: %name-common = %version-%release
%description cli
Command line BitTorrent client

%package remote
Group: Networking/Remote access
Summary: Command line remote interface to %name-daemon
Requires: %name-common = %version-%release
Requires: %name-daemon = %version-%release
%description remote
Command line remote interface to %name-daemon

%package daemon
Group: Networking/File transfer
Summary: Daemonised BitTorrent client
Requires: %name-common = %version-%release
%description daemon
Daemonised BitTorrent client

%prep
%setup -q
%patch0 -p1
sed -i "s|\(^CONFIG.*\+=.*[[:space:]]\)debug\([[:space:]].*$\)|\1release\2|" qt/qtr.pro
sed -i "s|^LIBS.*\+=.*libevent\.a$|LIBS += -levent|" qt/qtr.pro

%build
./autogen.sh
%configure \
   --verbose \
   %{subst_enable wx} \
   --enable-gtk

%if_enabled qt
pushd qt
qmake-qt4 "QMAKE_CXXFLAGS+=%optflags"
popd
%endif

%make_build

%if_enabled qt
pushd qt
%make_build
for f in *.ts; do lrelease-qt4 $f; done
popd
%endif


%install
%make DESTDIR=%buildroot install

%if_enabled qt
%make install INSTALL_ROOT=%buildroot/%prefix -C qt
%endif

mv %buildroot/%_desktopdir/transmission-gtk.desktop \
   %buildroot/%_desktopdir/transmission.desktop

# made alternatives entries

mkdir -p %buildroot/%_altdir

%if_enabled wxgtk
cat >%buildroot/%_altdir/%name-wxgtk <<__EOF__
%_bindir/%name %_bindir/Xmission 10
__EOF__
%endif

cat >%buildroot/%_altdir/%name-gtk <<__EOF__
%_bindir/%name %_bindir/%name-gtk 30
__EOF__

%if_enabled qt
cat >%buildroot/%_altdir/%name-qt <<__EOF__
%_bindir/%name %_bindir/%name-qt 20
__EOF__
# install translations
mkdir -p %buildroot/%_datadir/qt4/translations/
for f in qt/*.qm; do install -m 0644 $f %buildroot/%_datadir/qt4/translations/; done
%endif

%find_lang %name-gtk

# install daemonic stuff


install -pD -m640 %dname.logrotate %buildroot%_sysconfdir/logrotate.d/%dname
install -pD -m755 %dname.init %buildroot%_initdir/%dname

mkdir -p %buildroot/%_sysconfdir/transmission-daemon/
daemon/transmission-daemon -d 2> %buildroot/%_sysconfdir/transmission-daemon/settings.json
sed -i 's,/usr/src/,/var/lib/transmission-daemon/,' %buildroot/%_sysconfdir/transmission-daemon/settings.json

mkdir -p %buildroot/%_sysconfdir/sysconfig/
echo "TRANSMISSION_OPTIONS=\"-e %_logdir/%dname/%dname.log -g %_localstatedir/%dname\"" > %buildroot/%_sysconfdir/sysconfig/%dname

mkdir -p %buildroot/%_logdir/%dname
mkdir -p %buildroot/%_localstatedir/%dname

mv %buildroot/%name %buildroot/%_datadir

%pre daemon
/usr/sbin/groupadd -r -f _%dname
/usr/sbin/useradd -r -g _%dname -d %_localstatedir/%dname -s /dev/null -c 'The Transmission Torrent Client' _%dname >/dev/null 2>&1 ||:
if [ $1 -gt 1 ]; then
       /usr/sbin/usermod -d %_localstatedir/%dname _%dname
fi

%files

%files common
%dir %_datadir/%name
%_datadir/%name/web/

%files gui-common
%_iconsdir/hicolor/*/*/*
%_datadir/pixmaps/*
%_datadir/applications/%name.desktop

%files gtk -f %name-gtk.lang
%doc AUTHORS COPYING NEWS README ChangeLog
%_bindir/%name-gtk
%_altdir/%name-gtk
%_man1dir/%name-gtk.1*

%if_enabled qt
%files qt
%doc AUTHORS COPYING NEWS README ChangeLog
%_bindir/%name-qt
%_altdir/%name-qt
%_datadir/qt4/translations/%{name}_*.qm
%_man1dir/%name-qt.1*
%endif

%if_enabled wxgtk
%files wxgtk
%doc AUTHORS COPYING NEWS README ChangeLog
%_bindir/Xmission
%_altdir/%name-wxgtk
%endif

%files cli
%doc AUTHORS COPYING NEWS README ChangeLog
%_bindir/%name-cli
%_man1dir/%name-cli.*
%_bindir/%name-create
%_man1dir/%name-create.*
%_bindir/%name-edit
%_man1dir/%name-edit.*
%_bindir/%name-show
%_man1dir/%name-show.*

%files remote
%doc AUTHORS COPYING NEWS README ChangeLog
%_bindir/%name-remote
%_man1dir/%name-remote.*

%files daemon
%doc AUTHORS COPYING NEWS README ChangeLog
%_bindir/%name-daemon
%_man1dir/%name-daemon.*
%config(noreplace) %_sysconfdir/logrotate.d/%dname
%config(noreplace) %_sysconfdir/sysconfig/%dname
%config %_initdir/%dname
%attr(710,root,_%dname) %dir %_sysconfdir/%dname
%config(noreplace) %_sysconfdir/%dname/settings.json
%attr(770,root,_%dname) %dir %_localstatedir/%dname
%dir %_logdir/%dname

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009