1 # Contributor : Tom Gundersen <teg@jklm.no>
2 # Contributor : Ionut Biru <ibiru@archlinux.org>
3 # Contributor : Thomas Weißschuh <thomas t-8ch de>
4 # Contributor : Florian Pritz <bluewind@xinu.at>
7 pkgname=(transmission-cli transmission-gtk transmission-qt libtransmission)
11 url="http://www.transmissionbt.com/"
33 source=(https://github.com/transmission/transmission/releases/download/$pkgver/transmission-$pkgver.tar.xz
34 transmission-cli.sysusers
35 transmission-cli.tmpfiles)
36 sha256sums=('b6b01fd58e42bb14f7aba0253db932ced050fcd2bba5d9f8469d77ddd8ad545a'
37 '641310fb0590d40e00bea1b5b9c843953ab78edf019109f276be9c6a7bdaf5b2'
38 '1266032bb07e47d6bcdc7dabd74df2557cc466c33bf983a5881316a4cc098451')
41 export CFLAGS+=" -ffat-lto-objects"
44 cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
45 -DCMAKE_INSTALL_PREFIX=/usr \
57 -DUSE_SYSTEM_DEFLATE=ON \
59 -DUSE_SYSTEM_EVENT2=ON \
60 -DUSE_SYSTEM_MINIUPNPC=ON \
61 -DUSE_SYSTEM_NATPMP=ON \
63 -DUSE_SYSTEM_UTP=OFF \
64 -DWITH_CRYPTO=openssl \
67 cmake --build build --config Release
74 ctest --output-on-failure -j "$(nproc)"
77 _install_component() {
78 (cd $srcdir/$pkgbase-$pkgver/build; DESTDIR="$pkgdir" ninja $1/install)
81 package_transmission-cli() {
82 pkgdesc='Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)'
83 depends=(curl libevent systemd libb64 miniupnpc libnatpmp libdeflate)
87 for dir in daemon cli web utils; do
88 _install_component $dir
91 install -d "$pkgdir"/usr/share/transmission
92 cp -a build/web/public_html/ "$pkgdir"/usr/share/transmission
94 install -Dm644 daemon/transmission-daemon.service \
95 "$pkgdir/usr/lib/systemd/system/transmission.service"
97 install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING"
99 install -Dm644 "$srcdir/$pkgname.sysusers" \
100 "$pkgdir/usr/lib/sysusers.d/transmission.conf"
101 install -Dm644 "$srcdir/$pkgname.tmpfiles" \
102 "$pkgdir/usr/lib/tmpfiles.d/transmission.conf"
105 package_transmission-gtk() {
106 pkgdesc='Fast, easy, and free BitTorrent client (GTK+ GUI)'
107 depends=(curl libevent gtk4 hicolor-icon-theme libb64 miniupnpc libnatpmp libdeflate gtkmm-4.0)
108 optdepends=('libnotify: Desktop notification support'
109 'transmission-cli: daemon and web support')
113 _install_component gtk
114 _install_component po
116 install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-gtk/COPYING"
119 package_transmission-qt() {
120 pkgdesc='Fast, easy, and free BitTorrent client (Qt GUI)'
121 depends=(curl qt6-base qt6-svg libevent libb64 miniupnpc libnatpmp libdeflate)
122 optdepends=('transmission-cli: daemon and web support')
126 _install_component qt
128 install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-qt/COPYING"
131 package_libtransmission() {
132 pkgdesc='Fast, easy, and free BitTorrent client (shared library)'
136 install -Dm644 build/libtransmission/libtransmission.a -t "$pkgdir"/usr/lib
137 install -Dm644 libtransmission/*.h -t "$pkgdir"/usr/include/transmission
138 install -Dm644 COPYING "$pkgdir/usr/share/licenses/libtransmission/COPYING"