pakur.sh 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #32 bit
  2. cd $SRC/lib32-glibc-build
  3. make install_root="${PKG}" install
  4. rm -rf "${PKG}"/{etc,sbin,usr/{bin,sbin,share},var}
  5. # We need to keep 32 bit specific header files
  6. # bu pasif linux headerleri de siliyor yoksa
  7. #find "${PKG}"/usr/include -type f -not -name '*-32.h' -delete
  8. # Dynamic linker
  9. install -d "${PKG}"/usr/lib
  10. ln -s ../lib32/ld-linux.so.2 "${PKG}"/usr/lib/
  11. # Add lib32 paths to the default library search path
  12. install -Dm644 "${SRC}"/lib32-glibc.conf "${PKG}"/etc/ld.so.conf.d/lib32-glibc.conf
  13. # Symlink /usr/lib32/locale to /usr/lib/locale
  14. ln -s ../lib/locale "${PKG}"/usr/lib32/locale
  15. #64 bit
  16. cd ${SRC}/glibc-build
  17. make install_root=$PKG install
  18. mkdir -p $PKG/etc
  19. cp -v $SRC/$isim-$surum/nscd/nscd.conf $PKG/etc/nscd.conf
  20. mkdir -pv $PKG/var/db/nscd
  21. install -d $PKG/etc/ld.so.conf.d
  22. touch $PKG/etc/ld.so.conf
  23. install -Dm755 $SRC/locale-gen $PKG/usr/bin/locale-gen
  24. install -Dm644 $SRC/locale.gen.in $PKG/etc/locale.gen
  25. sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
  26. $SRC/$isim-$surum/localedata/SUPPORTED >> $PKG/etc/locale.gen
  27. # Add SUPPORTED file to pkg
  28. sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' \
  29. $SRC/glibc/localedata/SUPPORTED > $PKG/usr/share/i18n/SUPPORTED
  30. install -dm755 ${PKG}/usr/lib/locale
  31. ./elf/ld.so --library-path . $PKG/usr/bin/localedef \
  32. --force --quiet \
  33. --inputfile=$SRC/$isim-$surum/localedata/locales/C \
  34. --charmap=$SRC/$isim-$surum/localedata/charmaps/UTF-8 \
  35. $PKG/usr/lib/locale/C.UTF-8 || true
  36. # install C.UTF-8 so that it is always available
  37. sed -i '/#C\.UTF-8 /d' ${PKG}/etc/locale.gen
  38. rm -rfv $PKG/usr/share/locale \
  39. $PKG/usr/bin/{tzselect,zdump} \
  40. $PKG/usr/bin/zic
  41. install -Dm644 $SRC/$isim-$surum/intl/locale.alias \
  42. $PKG/usr/share/locale/locale.alias
  43. find $PKG -name "*install.cmd" -delete
  44. find $PKG -name ".\install" -delete
  45. cat > $PKG/etc/nsswitch.conf << "EOF"
  46. # Begin /etc/nsswitch.conf
  47. passwd: files
  48. group: files
  49. shadow: files
  50. hosts: files dns
  51. networks: files
  52. protocols: files
  53. services: files
  54. ethers: files
  55. rpc: files
  56. # End /etc/nsswitch.conf
  57. EOF
  58. cat > $PKG/etc/ld.so.conf << "EOF"
  59. # Begin /etc/ld.so.conf
  60. /lib
  61. /lib64
  62. /usr/lib
  63. /usr/lib64
  64. /usr/local/lib
  65. /usr/local/lib64
  66. # Add an include directory
  67. include /etc/ld.so.conf.d/*.conf
  68. # End of /etc/ld.so.conf
  69. EOF
  70. rm -rf $PKG/usr/share/info
  71. find $PKG/usr/lib -type f -name \*.a -exec strip --strip-debug {} ';'
  72. find $PKG/usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) -exec strip --strip-unneeded {} ';'
  73. find $PKG/usr/bin -type f -exec strip --strip-all {} ';'