iglunix/linux/musl/build.sh

50 lines
804 B
Bash
Raw Normal View History

2021-01-17 19:15:45 +00:00
pkgver=1.2.2
2020-12-27 16:34:08 +00:00
pkgname=musl
2021-01-31 11:09:14 +00:00
deps=""
2021-09-11 08:24:20 +00:00
mkdeps="gmake"
2020-12-27 16:34:08 +00:00
bad="gmake"
ext="dev"
fetch() {
curl "https://musl.libc.org/releases/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
tar -xf $pkgname-$pkgver.tar.gz
2022-04-09 15:11:23 +00:00
ln -s /usr/bin/cc $ARCH-linux-musl-cc
2021-10-11 16:30:08 +00:00
cd $pkgname-$pkgver
2020-12-27 16:34:08 +00:00
}
2022-04-09 16:07:21 +00:00
if [ -z "$FOR_CROSS" ]; then
PREFIX=/usr
else
PREFIX=$FOR_CROSS_DIR
fi
2020-12-27 16:34:08 +00:00
build() {
cd $pkgname-$pkgver
2021-10-11 16:30:08 +00:00
2022-04-09 15:11:23 +00:00
CC=$(pwd)/../$ARCH-linux-musl-cc ./configure \
--prefix=$PREFIX \
--target=$TRIPLE
2021-10-11 16:30:08 +00:00
2022-04-09 15:11:23 +00:00
bad --gmake gmake
2020-12-27 16:34:08 +00:00
}
2022-04-09 15:11:23 +00:00
package() {
2020-12-27 16:34:08 +00:00
cd $pkgname-$pkgver
2022-04-09 15:11:23 +00:00
bad --gmake gmake DESTDIR=$pkgdir install
2022-04-09 16:07:21 +00:00
rm $pkgdir/lib/ld-musl-$ARCH.so.1
mv $pkgdir/$PREFIX/lib/libc.so $pkgdir/lib/ld-musl-$ARCH.so.1
ln -sr $pkgdir/lib/ld-musl-$ARCH.so.1 $pkgdir/$PREFIX/lib/libc.so
2022-04-09 15:11:23 +00:00
}
2021-10-11 16:30:08 +00:00
2022-04-09 15:11:23 +00:00
backup() {
return
2020-12-27 16:34:08 +00:00
}
license() {
cd $pkgname-$pkgver
cat COPYRIGHT
}