57 lines
1.5 KiB
Bash
57 lines
1.5 KiB
Bash
# Template file for 'musl'
|
|
pkgname=musl
|
|
version=1.1.23
|
|
revision=2
|
|
archs="*-musl"
|
|
build_style=gnu-configure
|
|
configure_args="--prefix=/usr --disable-gcc-wrapper"
|
|
bootstrap=yes
|
|
short_desc="Musl C library"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="http://www.musl-libc.org/"
|
|
distfiles="http://www.musl-libc.org/releases/musl-${version}.tar.gz"
|
|
checksum=8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
|
|
conflicts="glibc>=0"
|
|
|
|
nostrip_files="libc.so"
|
|
shlib_provides="libc.so"
|
|
|
|
post_build() {
|
|
$CC $CFLAGS $LDFLAGS -fpie ${FILESDIR}/getent.c -o getent
|
|
$CC $CFLAGS $LDFLAGS -fpie ${FILESDIR}/getconf.c -o getconf
|
|
$CC $CFLAGS $LDFLAGS -fpie ${FILESDIR}/iconv.c -o iconv
|
|
}
|
|
do_install() {
|
|
# Move everything to /usr.
|
|
vmkdir usr/lib
|
|
ln -sfr ${DESTDIR}/usr/lib ${DESTDIR}/lib
|
|
make DESTDIR=${DESTDIR} install
|
|
rm ${DESTDIR}/lib
|
|
# provide ldd
|
|
vmkdir usr/bin
|
|
ln -s /usr/lib/libc.so ${DESTDIR}/usr/bin/ldd
|
|
# additional utils from Alpine/NetBSD
|
|
vbin iconv
|
|
vbin getent
|
|
vman ${FILESDIR}/getent.1
|
|
vbin getconf
|
|
vman ${FILESDIR}/getconf.1
|
|
# Fake ldconfig
|
|
ln -s true ${DESTDIR}/usr/bin/ldconfig
|
|
# Create xbps.d(5) arch override file
|
|
vmkdir usr/share/xbps.d
|
|
echo "architecture=${XBPS_TARGET_MACHINE}" > ${DESTDIR}/usr/share/xbps.d/musl-arch.conf
|
|
vlicense COPYRIGHT
|
|
}
|
|
|
|
musl-devel_package() {
|
|
depends="kernel-libc-headers ${sourcepkg}-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/*.a
|
|
vmove usr/lib/*.o
|
|
}
|
|
}
|