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 "$pkgbase-5289.patch::https://patch-diff.githubusercontent.com/raw/transmission/transmission/pull/5289.patch"
35 transmission-cli.sysusers
36 transmission-cli.tmpfiles)
37 sha256sums=('39bf7a104a722805a9dc089cdaaffe33bf90b82230a7ea7f340cae59f00a2ee8'
38 '2df975cb08fdf2e53f6e461cc4dd8f8a7ca9d07ff215b66e9c954eaf355ea01f'
39 '641310fb0590d40e00bea1b5b9c843953ab78edf019109f276be9c6a7bdaf5b2'
40 '1266032bb07e47d6bcdc7dabd74df2557cc466c33bf983a5881316a4cc098451')
44 # Fix build failure with gtkmm 4.10
45 patch -p1 -i "$srcdir/$pkgbase-5289.patch"
49 export CFLAGS+=" -ffat-lto-objects"
52 cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
53 -DCMAKE_INSTALL_PREFIX=/usr \
65 -DUSE_SYSTEM_DEFLATE=ON \
67 -DUSE_SYSTEM_EVENT2=ON \
68 -DUSE_SYSTEM_MINIUPNPC=ON \
69 -DUSE_SYSTEM_NATPMP=ON \
71 -DUSE_SYSTEM_UTP=OFF \
72 -DWITH_CRYPTO=openssl \
75 cmake --build build --config Release
82 ctest --output-on-failure -j "$(nproc)"
85 _install_component() {
86 (cd $srcdir/$pkgbase-$pkgver/build; DESTDIR="$pkgdir" ninja $1/install)
89 package_transmission-cli() {
90 pkgdesc='Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)'
91 depends=(curl libevent systemd libb64 miniupnpc libnatpmp libdeflate)
95 for dir in daemon cli web utils; do
96 _install_component $dir
99 install -d "$pkgdir"/usr/share/transmission
100 cp -a build/web/public_html/ "$pkgdir"/usr/share/transmission
102 install -Dm644 daemon/transmission-daemon.service \
103 "$pkgdir/usr/lib/systemd/system/transmission.service"
105 install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING"
107 install -Dm644 "$srcdir/$pkgname.sysusers" \
108 "$pkgdir/usr/lib/sysusers.d/transmission.conf"
109 install -Dm644 "$srcdir/$pkgname.tmpfiles" \
110 "$pkgdir/usr/lib/tmpfiles.d/transmission.conf"
113 package_transmission-gtk() {
114 pkgdesc='Fast, easy, and free BitTorrent client (GTK+ GUI)'
115 depends=(curl libevent gtk4 hicolor-icon-theme libb64 miniupnpc libnatpmp libdeflate gtkmm-4.0)
116 optdepends=('libnotify: Desktop notification support'
117 'transmission-cli: daemon and web support')
121 _install_component gtk
122 _install_component po
124 install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-gtk/COPYING"
127 package_transmission-qt() {
128 pkgdesc='Fast, easy, and free BitTorrent client (Qt GUI)'
129 depends=(curl qt6-base qt6-svg libevent libb64 miniupnpc libnatpmp libdeflate)
130 optdepends=('transmission-cli: daemon and web support')
134 _install_component qt
136 install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-qt/COPYING"
139 package_libtransmission() {
140 pkgdesc='Fast, easy, and free BitTorrent client (shared library)'
144 install -Dm644 build/libtransmission/libtransmission.a -t "$pkgdir"/usr/lib
145 install -Dm644 libtransmission/*.h -t "$pkgdir"/usr/include/transmission
146 install -Dm644 COPYING "$pkgdir/usr/share/licenses/libtransmission/COPYING"