talimat 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Tanım: The Zlib package contains compression and decompression routines used by some programs.
  2. # URL: http://www.zlib.net/
  3. # Paketçi: milisarge
  4. # Gerekler:
  5. isim=zlib
  6. surum=1.2.8
  7. devir=1
  8. kaynak=(http://www.zlib.net/zlib-$surum.tar.xz)
  9. derle() {
  10. if [ -L /bin/pwd ];then
  11. mv -v /tools/bin/ld /tools/bin/ld-old
  12. mv -v /tools/$(uname -m)-pc-linux-gnu/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld-old
  13. mv -v /tools/bin/ld-new /tools/bin/ld
  14. ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld
  15. gcc -dumpspecs | sed -e 's@/tools@@g' \
  16. -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
  17. -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
  18. `dirname $(gcc --print-libgcc-file-name)`/specs
  19. echo 'int main(){}' > dummy.c
  20. cc dummy.c -v -Wl,--verbose &> dummy.log
  21. readelf -l a.out | grep ': /lib'
  22. grep -o '/lib.*/crt[1in].*succeeded' dummy.log
  23. grep -B1 '^ /usr/include' dummy.log
  24. grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
  25. grep "/lib.*/libc.so.6 " dummy.log
  26. grep found dummy.log
  27. rm -v dummy.c a.out dummy.log
  28. fi
  29. cd zlib-$surum
  30. ./configure --prefix=/usr
  31. make
  32. make check
  33. make prefix=$PKG/usr install
  34. mkdir -p $PKG/lib
  35. mv -v $PKG/usr/lib/libz.so.* $PKG/lib
  36. ln -sfv ../../lib/libz.so.$surum $PKG/usr/lib/libz.so
  37. }