upgpkg: maxima 5.46.0-9 (sbcl rebuild)
[arch-packages.git] / transmission / trunk / PKGBUILD
blobe42b7cf0202512476e1fd67e7547ccc265ea8a5b
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.2
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             "$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')
42 prepare() {
43   cd $pkgbase-$pkgver
44   # Fix build failure with gtkmm 4.10
45   patch -p1 -i "$srcdir/$pkgbase-5289.patch"
48 build() {
49   export CFLAGS+=" -ffat-lto-objects"
50   cd $pkgbase-$pkgver
52   cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
53           -DCMAKE_INSTALL_PREFIX=/usr \
54           -DENABLE_CLI=ON \
55           -DENABLE_DAEMON=ON \
56           -DENABLE_GTK=ON \
57           -DENABLE_MAC=OFF \
58           -DENABLE_QT=ON \
59           -DREBUILD_WEB=ON \
60           -DENABLE_TESTS=ON \
61           -DENABLE_UTILS=ON \
62           -DENABLE_UTP=ON \
63           -DINSTALL_LIB=ON \
64       -DUSE_SYSTEM_B64=ON \
65       -DUSE_SYSTEM_DEFLATE=ON \
66       -DUSE_SYSTEM_DHT=ON \
67           -DUSE_SYSTEM_EVENT2=ON \
68       -DUSE_SYSTEM_MINIUPNPC=ON \
69       -DUSE_SYSTEM_NATPMP=ON \
70       -DUSE_SYSTEM_PSL=ON \
71       -DUSE_SYSTEM_UTP=OFF \
72           -DWITH_CRYPTO=openssl \
73           -S . -B build
75   cmake --build build --config Release
78 check() {
79   cd $pkgbase-$pkgver
81   cd build
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)
93   cd $pkgbase-$pkgver
95   for dir in daemon cli web utils; do
96     _install_component $dir
97   done
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')
119   cd $pkgbase-$pkgver
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')
132   cd $pkgbase-$pkgver
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)'
142   cd $pkgbase-$pkgver
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"