actions.py 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import perlmodules
  11. def setup():
  12. # autotools.autoreconf("-vfi")
  13. # autotools.aclocal()
  14. pisitools.cflags.add("-fno-strict-aliasing")
  15. autotools.configure("--disable-static \
  16. --enable-shared \
  17. --datadir=/usr/share/gdal \
  18. --with-ogdi \
  19. --with-threads \
  20. --with-jasper \
  21. --with-odbc=/usr/lib/unixODBC \
  22. --with-expat \
  23. --with-cfitsio \
  24. --with-hdf5 \
  25. --with-netcdf \
  26. --with-png \
  27. --with-geos \
  28. --without-mysql \
  29. --with-curl \
  30. --with-perl \
  31. --with-jpeg \
  32. --with-jpeg12=no \
  33. --with-libtiff \
  34. --with-sqlite3 \
  35. --with-geotiff=external \
  36. --with-podofo \
  37. --with-spatialite \
  38. --with-ogr \
  39. --with-grib \
  40. --with-curl \
  41. --with-webp \
  42. --with-python \
  43. --without-poppler \
  44. --with-xerces \
  45. --without-openjpeg \
  46. --without-libtool \
  47. --without-hdf4 \
  48. --without-fme \
  49. --without-pcraster \
  50. --without-kakadu \
  51. --without-mrsid \
  52. --without-jp2mrsid \
  53. --without-msg \
  54. --without-bsb \
  55. --without-dods-root \
  56. --without-oci \
  57. --without-ingres \
  58. --without-spatialite \
  59. --without-dwgdirect \
  60. --without-epsilon \
  61. --without-idb \
  62. --without-sde \
  63. --mandir=/usr/share/man \
  64. --without-ruby")
  65. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  66. #for bug 13646
  67. #pisitools.dosed("GDALmake.opt", "PY_HAVE_SETUPTOOLS=1 ", "PY_HAVE_SETUPTOOLS= ")
  68. #pisitools.dosed("apps/GNUmakefile", "EXE_DEP_LIBS ", "KILL_EXE_DEP_LIBS ")
  69. def build():
  70. autotools.make()
  71. def install():
  72. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  73. #remove egg
  74. # pisitools.removeDir("/usr/lib/python2.7/site-packages/GDAL-*")
  75. pisitools.domove("/usr/man/man3/*", "/usr/share/man/man3")
  76. pisitools.removeDir("/usr/man/")
  77. pisitools.domove("/usr/etc/bash_completion.d/*", "/etc/bash_completion.d")
  78. pisitools.removeDir("/usr/etc")
  79. perlmodules.removePodfiles()