42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
# Template file for 'musl'.
|
|
pkgname=musl
|
|
version=1.1.5
|
|
revision=8
|
|
build_style=gnu-configure
|
|
configure_args="--prefix=/usr --disable-gcc-wrapper"
|
|
conflicts="glibc>=0"
|
|
short_desc="The musl C library"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
license="MIT"
|
|
homepage="http://www.musl-libc.org/"
|
|
distfiles="http://www.musl-libc.org/releases/musl-${version}.tar.gz"
|
|
checksum=352362b1724cc9740f4c3ce0fe02aae45e4de9809ea4ac961f31aedc11b87393
|
|
|
|
only_for_archs="i686-musl x86_64-musl armv6l-musl armv7l-musl"
|
|
CFLAGS="-fno-stack-protector"
|
|
|
|
post_build() {
|
|
$CC $CFLAGS $LDFLAGS ${FILESDIR}/getent.c -o getent
|
|
$CC $CFLAGS $LDFLAGS ${FILESDIR}/getconf.c -o getconf
|
|
}
|
|
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 getent
|
|
vman ${FILESDIR}/getent.1
|
|
vbin getconf
|
|
vman ${FILESDIR}/getconf.1
|
|
vbin ${FILESDIR}/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
|
|
|
|
}
|