aboutsummaryrefslogtreecommitdiffstats
path: root/main/transmission/APKBUILD
blob: 26c504aff6d162f9d87c0c4afb6e02ec9eef6f5d (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
# Maintainer:Carlo Landmeter
pkgname=transmission
pkgver=2.42
pkgrel=0
pkgdesc="Lightweight GTK BitTorrent client"
url="http://www.tansmissionbt.com"
install="$pkgname.pre-install"
arch="all"
license="MIT"
depends=
makedepends="openssl-dev pkgconfig curl-dev gtk+-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
	0001-gtk-conf-set-correct-download-dir-default.patch
	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 \
		--mandir=/usr/share/man

make || return 1
}

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

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

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/
}

md5sums="2ade0818d465779bd956b8b72ea56b02  transmission-2.42.tar.bz2
f9fae46f5aa9ed3a22af64091604c6d0  0001-gtk-conf-set-correct-download-dir-default.patch
1ca57137d38c3429295a4699f535a240  transmission-daemon.initd
89478a70fcd93463e1dd8d751da994da  transmission-daemon.confd"