-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
47 lines (41 loc) · 1.35 KB
/
template
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
# Template file for 'libtomcrypt'
pkgname=libtomcrypt
version=1.18.2
revision=2
hostmakedepends="libtool"
makedepends="gmp-devel libtommath-devel"
short_desc="Fairly comprehensive, modular and portable cryptographic toolkit"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Public domain"
homepage="http://www.libtom.net/?page=features&newsitems=5&whatfile=crypt"
distfiles="https://github.com/libtom/libtomcrypt/releases/download/v${version}/crypt-${version}.tar.xz"
checksum=96ad4c3b8336050993c5bc2cf6c057484f2b0f9f763448151567fbab5e767b84
CFLAGS="-DGMP_DESC -DLTM_DESC -DUSE_LTM"
do_build() {
sed -e "s,@@CC@@,$CC,g;s,\$(CC),$CC,g" -i makefile.shared
if [ "$CROSS_BUILD" ]; then
cp /usr/bin/libtool .
sed -e "s,CCLD=.*,CCLD=$CC,g;s,CC=.*,CC=$CC,g" -i libtool
sed -e 's,libtool,./libtool,g' -i makefile.shared
fi
make EXTRALIBS="-lgmp -ltommath" RANLIB=$RANLIB -f makefile.shared ${makejobs}
}
do_check() {
make test
./test
}
do_install() {
make -f makefile.shared GROUP="$(whoami)" USER="$(whoami)" NODOCS=1 DESTDIR=${DESTDIR} PREFIX=/usr install
vman ${sourcepkg}.3
}
libtomcrypt-devel_package() {
depends="gmp-devel libtommath-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share/man/man3
}
}