actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. def build():
  20. autotools.make()
  21. def install():
  22. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  23. #Remove python examples
  24. pisitools.removeDir("/usr/share/libftdi")
  25. # Their source can be useful though
  26. pisitools.dodoc("examples/*.c", destDir="%s/examples" % get.srcNAME())
  27. # Install udev rule
  28. pisitools.insinto("/lib/udev/rules.d", "packages/99-libftdi.rules")
  29. pisitools.doman("doc/man/man3/*.3")
  30. pisitools.dodoc("AUTHORS", "COPYING.LIB", "ChangeLog", "LICENSE", "README")