core/glibc/Pkgfile
2016-02-16 20:04:43 +01:00

59 lines
1.9 KiB
Plaintext

# Description: The C library used in the GNU system
# URL: http://www.gnu.org/software/libc/
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=glibc
version=2.22
release=3
source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
http://crux.nu/files/distfiles/kernel-headers-4.1.tar.xz \
$name-2.20-multilib-dirs.patch \
CVE-2015-8779.patch CVE-2015-8778.patch CVE-2015-8777.patch \
CVE-2015-8776.patch CVE-2015-7547.patch glibc-rh1252570.patch \
hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
build() {
# install kernel headers
install -d $PKG/usr/
cp -r $SRC/kernel-headers-4.1/include $PKG/usr
chown root:root $PKG/usr
patch -p1 -d $SRC/$name-$version -i $SRC/$name-2.20-multilib-dirs.patch
patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8779.patch
patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8778.patch
patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8777.patch
patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-8776.patch
patch -p1 -d $SRC/$name-$version -i $SRC/glibc-rh1252570.patch
patch -p1 -d $SRC/$name-$version -i $SRC/CVE-2015-7547.patch
mkdir $SRC/build
cd $SRC/build
../$name-$version/configure --prefix=/usr \
--libexecdir=/usr/lib \
--with-headers=$PKG/usr/include \
--enable-kernel=3.12 \
--enable-add-ons \
--enable-static-nss \
--disable-profile \
--disable-werror \
--without-gd \
--enable-obsolete-rpc \
--enable-multi-arch
make
#make check
make install_root=$PKG install
install -m 0644 $SRC/$name-$version/nscd/nscd.conf $PKG/etc
install -d $PKG/var/{db,run}/nscd
install -m 0644 $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
install -d $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
touch $PKG/etc/ld.so.cache
rm -rf $PKG/usr/share/{info,locale} \
$PKG/usr/bin/tzselect \
$PKG/usr/sbin/z{dump,ic}
}