talimat 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # Tanım: Grafik resimlerin manipüle edilmesi için bir araç seti
  2. # URL: http://netpbm.sourceforge.net/
  3. # Paketçi: Cihan_Alkan
  4. # Gerekler: perl libpng libtiff libxml2 python jbigkit xorg-libx11 jasper
  5. # Grup: kütüphane
  6. isim=netpbm
  7. surum=10.71.02
  8. devir=1
  9. kaynak=(http://pkgs.fedoraproject.org/repo/pkgs/netpbm/netpbm-10.71.02.tar.xz/24df6a5baf36fa8943f046568726fd57/netpbm-10.71.02.tar.xz
  10. netpbm-noppmtompeg.patch)
  11. derle() {
  12. cd $isim-$surum
  13. touch converter/ppm/hpcdtoppm/depend.mk
  14. patch -p1 -E --backup --verbose -i ${SRC}/netpbm-noppmtompeg.patch
  15. # use the interactive way
  16. CFLAGS="${CFLAGS} -fPIC"
  17. LDSHLIB="${LDSHLIB} -fPIC"
  18. chmod 755 configure buildtools/stamp-date buildtools/install.sh buildtools/mkinstalldirs
  19. sed -i -e "s|\$(LDSHLIB)|\$(LDSHLIB) ${LDFLAGS}|g" lib/Makefile || exit 1
  20. mv buildtools/pkgconfig_template buildtools/pkgconfig_template.orig
  21. cat > buildtools/pkgconfig_template <<EOF
  22. prefix=/usr
  23. exec_prefix=\${prefix}
  24. libdir=/usr/lib
  25. includedir=\${prefix}/include
  26. EOF
  27. sed \
  28. -e "s|@VERSION@|${VERSION}|g" \
  29. -e 's|@LINKDIR@|${libdir}|g' \
  30. -e 's|@INCLUDEDIR@|${includedir}|g' \
  31. buildtools/pkgconfig_template.orig \
  32. >> buildtools/pkgconfig_template || exit 1
  33. SOVER="$(grep '^MAJ =' lib/Makefile | awk '{print $3}')"
  34. #sed -i -e '/config_mk/d' buildtools/configure.pl
  35. ./configure <<EOF
  36. EOF
  37. TOP=$(pwd)
  38. make -j1 -e \
  39. CC=/usr/bin/gcc \
  40. LDFLAGS="-L${TOP}/pbm -L${TOP}/pgm -L${TOP}/pnm -L${TOP}/ppm ${LDFLAGS}" \
  41. CFLAGS="${SLKCFLAGS} -fPIC -ffast-math -pedantic -fno-common -Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit -Wwrite-strings -Wmissing-prototypes -Wundef -I/usr/include/jbigkit" \
  42. LADD="-lm" \
  43. DEFAULT_TARGET=nonmerge \
  44. NETPBMLIBTYPE=unixshared \
  45. NETPBMLIBSUFFIX=so \
  46. STATICLIB_TOO=n \
  47. JPEGINC_DIR=/usr/include \
  48. PNGINC_DIR=/usr/include \
  49. TIFFINC_DIR=/usr/include \
  50. JPEGLIB_DIR=/usr/lib \
  51. PNGLIB_DIR=/usr/lib \
  52. TIFFLIB_DIR=/usr/lib \
  53. LINUXSVGALIB="NONE" \
  54. X11LIB=/usr/lib/libX11.so \
  55. XML2LIBS="NONE" \
  56. JASPERLIB="" \
  57. JASPERDEPLIBS="-ljasper" \
  58. JBIGLIB='-ljbig' \
  59. NETPBM_DOCURL="http://netpbm.sourceforge.net/doc/" || exit 1
  60. # prepare man files
  61. ( cd userguide
  62. for i in *.html ; do
  63. ../buildtools/makeman ${i}
  64. done
  65. for i in 1 3 5 ; do
  66. mkdir -p man/man${i}
  67. mv *.${i} man/man${i}
  68. done
  69. ) || exit 1
  70. mkdir -p ${PKG} || exit 1
  71. make package pkgdir=${PKG}/usr LINUXSVGALIB="NONE" XML2LIBS="NONE" STATICLIB_TOO=n || exit 1
  72. mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}
  73. if [ "/usr/lib${LIBDIRSUFFIX}" != "/usr/lib" ]; then
  74. mv ${PKG}/usr/lib/lib* ${PKG}/usr/lib${LIBDIRSUFFIX}/ || exit 1
  75. rmdir ${PKG}/usr/lib
  76. fi
  77. ln -sf libnetpbm.so.${SOVER} ${PKG}/usr/lib${LIBDIRSUFFIX}/libnetpbm.so || exit 1
  78. find ${PKG} | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  79. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  80. mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig
  81. mv ${PKG}/usr/pkgconfig_template \
  82. ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig/netpbm.pc || exit 1
  83. rm -rf ${PKG}/usr/man
  84. mkdir -p $PKG/usr/share
  85. mv $PKG/usr/misc $PKG/usr/share/netpbm
  86. rm -f ${PKG}/usr/config_template
  87. rm -f ${PKG}/usr/pkginfo
  88. rm -f ${PKG}/usr/README
  89. rm -f ${PKG}/usr/VERSION
  90. rm -fr ${PKG}/usr/link
  91. }