pkgs/musl/PKGBUILD

38 lines
994 B
Bash

# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
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 < ../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
}