aboutsummaryrefslogtreecommitdiffstats
path: root/main/transmission/APKBUILD
blob: 4cf50262f7bcdc176e4837cbcce2fa7315f2f03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Maintainer:Carlo Landmeter
pkgname=transmission
pkgver=2.77
pkgrel=0
pkgdesc="Lightweight GTK BitTorrent client"
url="http://www.tansmissionbt.com"
install="transmission-daemon.pre-install transmission-daemon.post-upgrade"
arch="all"
license="MIT"
depends=
pkgusers="transmission"
pkggroups="transmission"
makedepends="openssl-dev pkgconfig curl-dev gtk+3.0-dev intltool libevent-dev
	libnotify-dev dbus-glib-dev autoconf automake tar libcanberra-dev gconf-dev"
source="http://download.m0k.org/transmission/files/transmission-$pkgver.tar.bz2
	transmission-daemon.initd
	transmission-daemon.confd
	"
subpackages="$pkgname-cli $pkgname-daemon $pkgname-doc $pkgname-lang"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
        cd "$_builddir"

        ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --mandir=/usr/share/man \
                --infodir=/usr/share/info \
                --localstatedir=/var \
		--enable-utp \
		--with-inotify \
		|| return 1
	make || return 1
}

package() {
        cd "$_builddir"
        make DESTDIR="$pkgdir" install || return 1
}

daemon() {
	pkgdesc="Lightweight BitTorrent client (daemon and webinterface)"
	install -d "$subpkgdir"/usr/share \
		"$subpkgdir"/usr/bin || return 1
	install -d -o transmission -g transmission \
		"$subpkgdir"/var/lib/transmission \
		"$subpkgdir"/var/log/transmission || return 1
	mv "$pkgdir"/usr/bin/transmission-daemon \
		"$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/share/transmission \
		"$subpkgdir"/usr/share/ || return 1
        install -D -m755 "$srcdir"/transmission-daemon.initd \
		"$subpkgdir"/etc/init.d/transmission-daemon || return 1
        install -D -m644 "$srcdir"/transmission-daemon.confd \
		"$subpkgdir"/etc/conf.d/transmission-daemon || return 1
}

cli() {
	pkgdesc="Lightweight BitTorrent client (cli  and remote)"
	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/transmission-cli \
		"$pkgdir"/usr/bin/transmission-create \
		"$pkgdir"/usr/bin/transmission-edit \
		"$pkgdir"/usr/bin/transmission-show \
		"$pkgdir"/usr/bin/transmission-remote \
		"$subpkgdir"/usr/bin/ || return 1
}

md5sums="b75fd5d69ac88e093d25c469183e7f7a  transmission-2.77.tar.bz2
b44e7e7bcfb7fd1c59b3e1191d4dabb9  transmission-daemon.initd
5caf0fc25dfd67c61627f1e0313f4245  transmission-daemon.confd"
sha256sums="b8c9fd754134bcb8a76b55824cd8efecf20e2be237cbc7c8262abc8822b6bad3  transmission-2.77.tar.bz2
4c3a0e666e39e3780ae280e2ff99f80cce9d671139580e8219c4a07563517e70  transmission-daemon.initd
4b47acf195a14a322550cfcaa735a59aac38410d1c2c63ffa824ff131c55ca70  transmission-daemon.confd"
sha512sums="58c0bcb0bf487f88bec2aff10a7dfc422bc81dc19bb964b03d9a282337904a784dc51b08adcf1128db31c7b84044e29db74b43e1cd832d617adf28413073fe90  transmission-2.77.tar.bz2
366d04e1f4770eb8a98ab292660097c2ff1dd73a6ad695cb1af6baae984d047860e33bbb7b68d44948c2309f3ec8fc2f3ff11b8e85afc22458d061c7d598bbb6  transmission-daemon.initd
a3b9ac2b7bbe30e33060c8b6a693dc7072d3c6ac44f92ddd567969d8f57a0bfc1a561e781ae167703ccb4b2fd5b0e6d8f8a66c5ba14fe01d8d89a501d4501474  transmission-daemon.confd"