milis/talimatname/temel/glibc/talimat

109 lines
2.3 KiB
Plaintext
Raw Normal View History

2016-02-24 01:27:23 +01:00
# Description: The Glibc package contains the main C library.
# URL: https://www.gnu.org/software/libc/
2016-03-07 13:45:49 +01:00
# Packagers: milis
2016-02-24 01:27:23 +01:00
kernelversion=4.4
2016-03-20 02:15:25 +01:00
2016-02-24 01:27:23 +01:00
name=glibc
version=2.22
2016-03-07 13:45:49 +01:00
release=1
2016-02-24 01:27:23 +01:00
source=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-$kernelversion.tar.xz
http://www.linuxfromscratch.org/patches/downloads/$name/glibc-$version-largefile-1.patch
http://www.linuxfromscratch.org/patches/downloads/$name/glibc-$version-fhs-1.patch
http://www.linuxfromscratch.org/patches/downloads/$name/glibc-$version-upstream_i386_fix-1.patch
http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz glibc.locales.supported )
build() {
# Headers
cd linux-$kernelversion
make mrproper
make headers_check
make INSTALL_HDR_PATH=dest headers_install
find dest/include \( -name .install -o -name ..install.cmd \) -delete
mkdir -p $PKG/usr/include
cp -rv dest/include/* $PKG/usr/include
cd ../glibc-$version
patch -Np1 -i ../glibc-$version-fhs-1.patch
patch -Np1 -i ../glibc-$version-upstream_i386_fix-1.patch
patch -Np1 -i ../glibc-$version-largefile-1.patch
mkdir -v ../glibc-build
cd ../glibc-build
../glibc-$version/configure --prefix=/usr \
--disable-profile \
--enable-kernel=2.6.32 \
--enable-obsolete-rpc
make || make -j1
# make -k check 2>&1 | tee glibc-check-log
# grep Error glibc-check-log
make install_root=$PKG install
rm -rf $PKG/usr/share/info/dir
mkdir -p $PKG/etc
cp -v ../glibc-$version/nscd/nscd.conf $PKG/etc/nscd.conf
mkdir -pv $PKG/var/cache/nscd
touch $PKG/etc/ld.so.conf
mkdir -pv $PKG/usr/lib/locale
cp $SRC/glibc.locales.supported \
../glibc-$version/localedata/SUPPORTED
make install_root=$PKG localedata/install-locales
cat > $PKG/etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf
passwd: files
group: files
shadow: files
hosts: files dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
# End /etc/nsswitch.conf
EOF
cat > $PKG/etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/lib
/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
# Add an include directory
include /etc/ld.so.conf.d/*.conf
# End of /etc/ld.so.conf
EOF
if [ "`uname -m`" == "i686" ];then
cat > $PKG/etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/lib
/usr/lib
/usr/local/lib
# Add an include directory
include /etc/ld.so.conf.d/*.conf
# End of /etc/ld.so.conf
EOF
fi
mkdir $PKG/etc/ld.so.conf.d
}