pakur.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. cd ${SRC}/glibc-${surum}/build
  2. make install_root=$PKG install
  3. mkdir -p $PKG/etc
  4. cp -v ../nscd/nscd.conf $PKG/etc/nscd.conf
  5. mkdir -pv $PKG/var/cache/nscd
  6. touch $PKG/etc/ld.so.conf
  7. mkdir -pv $PKG/usr/lib/locale
  8. cp $SRC/glibc.locales.destek \
  9. ../localedata/SUPPORTED
  10. make install_root=$PKG localedata/install-locales
  11. cat > $PKG/etc/nsswitch.conf << "EOF"
  12. # Begin /etc/nsswitch.conf
  13. passwd: files
  14. group: files
  15. shadow: files
  16. hosts: files dns
  17. networks: files
  18. protocols: files
  19. services: files
  20. ethers: files
  21. rpc: files
  22. # End /etc/nsswitch.conf
  23. EOF
  24. cat > $PKG/etc/ld.so.conf << "EOF"
  25. # Begin /etc/ld.so.conf
  26. /lib
  27. /lib64
  28. /usr/lib
  29. /usr/lib64
  30. /usr/local/lib
  31. /usr/local/lib64
  32. # Add an include directory
  33. include /etc/ld.so.conf.d/*.conf
  34. # End of /etc/ld.so.conf
  35. EOF
  36. mkdir $PKG/etc/ld.so.conf.d
  37. rm -rf $PKG/usr/share/info
  38. # GLIBC STRIPPING
  39. save_lib="ld-$surum.so libc-$surum.so libpthread-$surum.so libthread_db-1.0.so"
  40. cd $PKG/usr/lib
  41. for LIB in $save_lib; do
  42. objcopy --only-keep-debug $LIB $LIB.dbg
  43. strip --strip-unneeded $LIB
  44. objcopy --add-gnu-debuglink=$LIB.dbg $LIB
  45. done
  46. unset LIB save_lib
  47. find $PKG/usr/lib -type f -name \*.a -exec strip --strip-debug {} ';'
  48. find $PKG/usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) -exec strip --strip-unneeded {} ';'
  49. find $PKG/usr/bin -type f -exec strip --strip-all {} ';'
  50. cd -