pkgs/musl/PKGBUILD

42 lines
978 B
Bash

# Maintainer: Daryl Ronningen <relms@relms.dev>
pkgname=musl
pkgver=1.2.4
pkgrel=1
pkgdesc="Lightweight implementation of C standard library"
arch=("x86_64")
url="https://musl.libc.org/"
license=("MIT")
source=(
"https://musl.libc.org/releases/musl-$pkgver.tar.gz"
"add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch"
)
sha256sums=(
"7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039"
"d5f639c6f38504805a07a426ccc4fbb0f657205047009143baf972f6687335f4"
)
prepare() {
cd $pkgname-$pkgver
patch -p1 <$srcdir/add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
mv $pkgdir/lib/* $pkgdir/usr/lib/
rm -rf $pkgdir/lib
mkdir $pkgdir/usr/bin
ln -s ../lib/ld-musl-x86_64.so.1 $pkgdir/usr/bin/ldd
install -Dm0644 README "$pkgdir"/usr/share/doc/musl/README
install -Dm0644 COPYRIGHT "$pkgdir"/usr/share/licenses/musl/COPYRIGHT
}