db-move: moved nautilus from [testing] to [extra] (x86_64)
[arch-packages.git] / transmission / trunk / PKGBUILD
blob5cbb795524cb0795242b2a9134f7d84a45ed162a
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>
6 pkgbase=transmission
7 pkgname=(transmission-cli transmission-gtk transmission-qt libtransmission)
8 pkgver=4.0.3
9 pkgrel=1
10 arch=(x86_64)
11 url="http://www.transmissionbt.com/"
12 license=(GPL)
13 makedepends=(
14         cmake
15         curl
16         dht
17         glibmm-2.68
18         gtk4
19         gtkmm-4.0
20         intltool
21         libb64
22         libdeflate
23         libevent
24         libnatpmp
25         miniupnpc
26         ninja
27         npm
28         qt6-base
29         qt6-svg
30         qt6-tools
31         systemd
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')
40 build() {
41   export CFLAGS+=" -ffat-lto-objects"
42   cd $pkgbase-$pkgver
44   cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
45           -DCMAKE_INSTALL_PREFIX=/usr \
46           -DENABLE_CLI=ON \
47           -DENABLE_DAEMON=ON \
48           -DENABLE_GTK=ON \
49           -DENABLE_MAC=OFF \
50           -DENABLE_QT=ON \
51           -DREBUILD_WEB=ON \
52           -DENABLE_TESTS=ON \
53           -DENABLE_UTILS=ON \
54           -DENABLE_UTP=ON \
55           -DINSTALL_LIB=ON \
56       -DUSE_SYSTEM_B64=ON \
57       -DUSE_SYSTEM_DEFLATE=ON \
58       -DUSE_SYSTEM_DHT=ON \
59           -DUSE_SYSTEM_EVENT2=ON \
60       -DUSE_SYSTEM_MINIUPNPC=ON \
61       -DUSE_SYSTEM_NATPMP=ON \
62       -DUSE_SYSTEM_PSL=ON \
63       -DUSE_SYSTEM_UTP=OFF \
64           -DWITH_CRYPTO=openssl \
65           -S . -B build
67   cmake --build build --config Release
70 check() {
71   cd $pkgbase-$pkgver
73   cd build
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)
85   cd $pkgbase-$pkgver
87   for dir in daemon cli web utils; do
88     _install_component $dir
89   done
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')
111   cd $pkgbase-$pkgver
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')
124   cd $pkgbase-$pkgver
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)'
134   cd $pkgbase-$pkgver
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"