aboutsummaryrefslogtreecommitdiffstats
path: root/main/libotr3/APKBUILD
blob: 9a6e57b8b247a83f7e3996b0ac163f4dfaf573e8 (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
# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
pkgname=libotr3
pkgver=3.2.1
pkgrel=4
pkgdesc="Off The Record Messaging, an encryption library for secure IM conversations"
url="http://otr.cypherpunks.ca/"
arch="all"
license="LGPL-2.0-or-later"
depends=
depends_dev="libgcrypt-dev"
makedepends="$depends_dev"
install=""
replaces="libotr"
subpackages="$pkgname-dev $pkgname-doc:doc $pkgname-tools:tools"
source="https://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
}

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

doc() {
    default_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="974acf937d2ce0ee89b27a9815c17a3f  libotr-3.2.1.tar.gz"
sha256sums="d428eaa584984baa09450cca07742e0ac8fc62401f3a1c556e3025023369cdf4  libotr-3.2.1.tar.gz"
sha512sums="7dfac85cb7dd1a95481330ecf3bfe54477a9de7e20370919386e8aa9553e374a2d3587d7b4bb654d1a30bd1c47e41c577f7b78f4007c5cb97f2f6a2c63078899  libotr-3.2.1.tar.gz"