actions.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import cmaketools
  9. from pisi.actionsapi import get
  10. def setup():
  11. pisitools.dosed("CMakeLists.txt", "LIB_SUFFIX 64", deleteLine="True")
  12. cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
  13. -DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
  14. -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \
  15. -DPYTHON_LIBRARY=/usr/lib/python2.7 \
  16. -DCMAKE_SKIP_BUILD_RPATH=ON \
  17. -DCMAKE_BUILD_TYPE=Release \
  18. -DEXAMPLES=OFF -DFTDI_EEPROM=ON \
  19. -DDOCUMENTATION=OFF")
  20. def build():
  21. autotools.make()
  22. def install():
  23. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  24. #Remove python examples
  25. pisitools.removeDir("/usr/share/libftdi")
  26. # Their source can be useful though
  27. pisitools.dodoc("examples/*.c", destDir="%s/examples" % get.srcNAME())
  28. # Install udev rule
  29. pisitools.insinto("/lib/udev/rules.d", "packages/99-libftdi.rules")
  30. #pisitools.doman("doc/man/man3/*.3")
  31. pisitools.dodoc("AUTHORS", "COPYING.LIB", "ChangeLog", "LICENSE", "README")