aboutsummaryrefslogtreecommitdiff
path: root/repos/core/musl/abuild
blob: 3f229dbf698277bcc26901c5b939a336cd30206c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name=musl
version=1.2.6
release=2
source="https://www.musl-libc.org/releases/musl-$version.tar.gz
	getconf.c
	getconf.1
	getent.c
	getent.1
	iconv.c
	tree.h
	queue.h
	cdefs.h
	elfutils-0.190-relr.patch
	default-locpath.patch"
keep_static=1

build() {
	./configure \
	        --prefix=/usr #\
	        #--syslibdir=/usr/lib
	make
	make DESTDIR=$PKG install
	
	mkdir -p $PKG/usr/bin
	ln -sf ../lib/libc.so $PKG/usr/bin/ldd
	mkdir -p $PKG/sbin
	echo "#!/bin/sh
	/bin/true" > $PKG/sbin/ldconfig
	chmod +x $PKG/sbin/ldconfig
	
	for i in getent getconf iconv; do
	        ${CC:-gcc} $CFLAGS $LDFLAGS -fpie $SRC/$i.c -o $PKG/usr/bin/$i
	done
	
	mkdir -p $PKG/usr/share/man/man1
	install -m644 $SRC/getconf.1 $PKG/usr/share/man/man1
	#install -m644 $SRC/getent.1 $PKG/usr/share/man/man1
	
	# bsdcompat headers
	for h in tree.h queue.h cdefs.h; do
	        install -D $SRC/$h $PKG/usr/include/sys/
	done
}