aboutsummaryrefslogtreecommitdiffstats
path: root/main/rhash/APKBUILD
blob: 58ef79e241db7d05f6da58cb2c008f93fe5f9792 (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
# Maintainer: Przemyslaw Pawelczyk <przemoc@zoho.com>
pkgname=rhash
pkgver=1.3.6
pkgrel=0
pkgdesc="Utility for calculation and verification of hash sums and magnet links"
url="http://rhash.anz.ru"
arch="all"
license="custom"
makedepends="libressl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.gz"
builddir="$srcdir/RHash-$pkgver"

prepare() {
	# include endian.h on musl
	sed -i "$builddir"/librhash/byte_order.h \
		-e 's/__GLIBC__/__linux__/'
}

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--enable-openssl \
		--disable-openssl-runtime
	make
}

check() {
	make -C "$builddir" test-shared
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install
	make -C librhash DESTDIR="$pkgdir" \
		install-headers install-lib-shared install-so-link
}

sha512sums="54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6  rhash-1.3.6-src.tar.gz"