mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
80 lines
2.6 KiB
Bash
80 lines
2.6 KiB
Bash
pkgbase=transmission
|
|
pkgname=(transmission-cli transmission)
|
|
pkgver=2.94
|
|
pkgrel=2
|
|
arch=(x86_64)
|
|
url="http://www.transmissionbt.com/"
|
|
license=(MIT)
|
|
makedepends=(intltool curl qt5-base libevent systemd qt5-tools)
|
|
source=(https://github.com/transmission/transmission-releases/raw/master/transmission-${pkgver}.tar.xz
|
|
transmission-2.90-libsystemd.patch
|
|
transmission-cli.sysusers
|
|
transmission-cli.tmpfiles)
|
|
sha256sums=('35442cc849f91f8df982c3d0d479d650c6ca19310a994eccdaa79a4af3916b7d'
|
|
'9f8f4bb532e0e46776dbd90e75557364f495ec95896ee35900ea222d69bda411'
|
|
'641310fb0590d40e00bea1b5b9c843953ab78edf019109f276be9c6a7bdaf5b2'
|
|
'1266032bb07e47d6bcdc7dabd74df2557cc466c33bf983a5881316a4cc098451')
|
|
|
|
prepare() {
|
|
cd $pkgbase-$pkgver
|
|
patch -p1 -i "$srcdir/transmission-2.90-libsystemd.patch"
|
|
|
|
rm -f m4/glib-gettext.m4
|
|
autoreconf -fi
|
|
|
|
sed -i '/^Icon=/ s/$/-qt/' qt/transmission-qt.desktop
|
|
}
|
|
|
|
build() {
|
|
cd $pkgbase-$pkgver
|
|
./configure --prefix=/usr
|
|
make
|
|
|
|
cd qt
|
|
/usr/lib/qt5/bin/qmake qtr.pro
|
|
make
|
|
lrelease-qt5 translations/*.ts
|
|
}
|
|
|
|
package_transmission-cli() {
|
|
pkgdesc='Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)'
|
|
depends=(curl libevent systemd)
|
|
categories=('network')
|
|
install=transmission-cli.install
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
for dir in daemon cli web utils; do
|
|
make -C "$dir" DESTDIR="$pkgdir" install
|
|
done
|
|
|
|
install -Dm644 daemon/transmission-daemon.service "$pkgdir/usr/lib/systemd/system/transmission.service"
|
|
install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/transmission.conf"
|
|
install -Dm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/transmission.conf"
|
|
install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING"
|
|
}
|
|
|
|
package_transmission() {
|
|
pkgdesc='Fast, easy, and free BitTorrent client (Qt GUI)'
|
|
depends=(curl qt5-base libevent)
|
|
optdepends=('transmission-cli: daemon and web support')
|
|
categories=('network')
|
|
provides=('transmission-qt' 'transmission-qt5')
|
|
conflicts=('transmission-qt' 'transmission-qt5')
|
|
replaces=('transmission-qt' 'transmission-qt5')
|
|
screenshot=('http://www.transmissionbt.com/images/screenshots/Qt-Large.jpg')
|
|
install=transmission.install
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
make -C qt INSTALL_ROOT="$pkgdir"/usr install
|
|
install -Dm644 -t "$pkgdir/usr/share/transmission-qt/translations" \
|
|
qt/translations/*.qm
|
|
|
|
install -Dm644 COPYING "$pkgdir/usr/share/licenses/transmission-qt/COPYING"
|
|
install -Dm644 qt/icons/transmission.png \
|
|
"$pkgdir/usr/share/pixmaps/transmission-qt.png"
|
|
install -Dm644 qt/transmission-qt.desktop \
|
|
"$pkgdir/usr/share/applications/transmission-qt.desktop"
|
|
}
|