-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
72 lines (63 loc) · 1.8 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
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
# Template file for 'libxcrypt'
pkgname=libxcrypt
version=4.4.36
revision=3
archs="~*-musl"
build_style=gnu-configure
configure_args="--enable-hashes=all --disable-failure-tokens --enable-obsolete-api=no"
make_cmd="make -C build"
hostmakedepends="perl-bootstrap"
checkdepends="python3-passlib"
short_desc="Modern library for one-way hashing of passwords"
maintainer="oreo639 <oreo639@gmail.com>"
license="LGPL-2.1-or-later, BSD-3-Clause, BSD-2-Clause, 0BSD, Public Domain"
homepage="https://github.com/besser82/libxcrypt"
distfiles="https://github.com/besser82/libxcrypt/releases/download/v${version}/libxcrypt-${version}.tar.xz"
checksum=e5e1f4caee0a01de2aee26e3138807d6d3ca2b8e67287966d1fefd65e1fd8943
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
broken="musl already provides libcrypt"
fi
do_configure() {
[ ! -d ${configure_builddir:=build} ] && mkdir -p ${configure_builddir}
cd ${configure_builddir}
../configure ${configure_args}
}
post_configure() {
configure_args="${configure_args/--enable-obsolete-api=no/} --enable-obsolete-api=glibc"
configure_builddir="compat-build"
do_configure
}
post_build() {
make_cmd="make -C compat-build"
do_build
}
post_check() {
make_cmd="make -C compat-build"
do_check
}
pre_install() {
make -C compat-build DESTDIR=${DESTDIR} install
# Don't install development files from the compat library
rm -r ${DESTDIR}/usr/{include,lib/{lib*.so,pkgconfig},share}
}
post_install() {
vlicense LICENSING
}
libxcrypt-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/pkgconfig
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share
}
}
libxcrypt-compat_package() {
short_desc+=" - legacy compatibility"
noverifyrdeps=yes
pkg_install() {
vmove usr/lib/libcrypt.so.1*
}
}