crux-musl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://codeberg.org/emmett1/crux-musl
Log | Files | Refs | README | LICENSE

Pkgfile (1246B)


      1 # Description: the musl c library (libc) implementation
      2 # URL: https://musl.libc.org/
      3 # Maintainer: Emmett1, emmett1 dot 2miligrams at protonmail dot com
      4 
      5 name=musl
      6 version=1.2.5
      7 release=2
      8 source=(https://www.musl-libc.org/releases/musl-$version.tar.gz
      9 	getconf.c
     10 	getconf.1
     11 	getent.c
     12 	getent.1
     13 	iconv.c
     14 	tree.h
     15 	queue.h
     16 	cdefs.h
     17 	elfutils-0.190-relr.patch
     18 	0001-iconv-fix-erroneous-input-validation-in-EUC-KR-decod.patch
     19 	0002-iconv-harden-UTF-8-output-code-path-against-input-de.patch)
     20 
     21 build() {
     22 	cd $name-$version
     23 
     24 	for p in $SRC/*.patch; do
     25 		patch -Np1 -i $p
     26 	done
     27 
     28 	./configure \
     29 		--prefix=/usr
     30 	make
     31 	make DESTDIR=$PKG install
     32 	
     33 	mkdir -p $PKG/usr/bin
     34 	ln -sf ../lib/libc.so $PKG/usr/bin/ldd
     35 	mkdir -p $PKG/sbin
     36 	echo "#!/bin/sh
     37 	/bin/true" > $PKG/sbin/ldconfig
     38 	chmod +x $PKG/sbin/ldconfig
     39 	
     40 	for i in getent getconf iconv; do
     41 	        ${CC:-gcc} $CFLAGS $LDFLAGS -fpie $SRC/$i.c -o $PKG/usr/bin/$i
     42 	done
     43 	
     44 	mkdir -p $PKG/usr/share/man/man1
     45 	install -m644 $SRC/getconf.1 $PKG/usr/share/man/man1
     46 	#install -m644 $SRC/getent.1 $PKG/usr/share/man/man1
     47 	
     48 	# bsdcompat headers
     49 	for h in tree.h queue.h cdefs.h; do
     50 	        install -D $SRC/$h $PKG/usr/include/sys/
     51 	done
     52 
     53 	# for revdep to work
     54 	mkdir -p $PKG/etc
     55 	touch $PKG/etc/ld.so.conf
     56 }