aboutsummaryrefslogtreecommitdiffstats
path: root/main/libotr/APKBUILD
blob: e2b027c4c0a55a9869b07270c9ab61a628fd3345 (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
# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
pkgname=libotr
pkgver=4.1.0
pkgrel=0
pkgdesc="Off The Record Messaging, an encryption library for secure IM conversations"
url="http://otr.cypherpunks.ca/"
arch="all"
license="LGPL2+"
depends=
depends_dev="libgcrypt-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc:doc $pkgname-tools:tools"
source="http://www.cypherpunks.ca/otr/libotr-$pkgver.tar.gz"

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

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
}

package() {
        cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
}

tools() {
    license="GPL"
    depends="$pkgname"
    cd "$_builddir"
    mkdir -p "$subpkgdir"/usr/
    mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

doc() {
    depends="$pkgname"
    cd "$_builddir"
    install -Dm0644 Protocol-v2.html "$subpkgdir"/usr/share/doc/$pkgname/Protocol-v2.html
    install -Dm0644 README           "$subpkgdir"/usr/share/doc/$pkgname/README
}

md5sums="6589f81e7ccbe244f265e8db372814a2  libotr-4.1.0.tar.gz"
sha256sums="4fdb891940ec89d300190a98f69a9138248dcb8c8d337633fb981b8d0a9cd930  libotr-4.1.0.tar.gz"
sha512sums="3c6a6bf8ee64467484519187d1bc86001d5ae6ceb169e9c828f7750a1db3dadfef677b828a5d292e5caa12f874711df4fd2db977d48dc968e9f0edc2eab58e3e  libotr-4.1.0.tar.gz"