actions.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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 shelltools
  9. from pisi.actionsapi import get
  10. lib_version=get.srcVERSION()[0] + "." + get.srcVERSION()[2] + "." + get.srcVERSION()[3]
  11. def setup():
  12. # FIXME: shelltools.echo() appends to the end of the file by default so clear them first
  13. shelltools.unlink('conf-cc')
  14. shelltools.unlink('conf-ld')
  15. shelltools.unlink('conf-home')
  16. shelltools.echo('conf-cc', "%s %s -malign-double -fPIC -DPIC" % (get.CC(), get.CFLAGS().replace("-D_FORTIFY_SOURCE=2", "").replace("-fomit-frame-pointer", "")))
  17. shelltools.echo('conf-ld', "%s %s" % (get.CC(), get.LDFLAGS()))
  18. shelltools.echo('conf-home', "%s/usr" % get.installDIR())
  19. def build():
  20. autotools.make('LIBDJBFFT="libdjbfft.so.%s" LIBPERMS="0755"' % lib_version)
  21. def install():
  22. pisitools.dolib("libdjbfft.so.%s" % lib_version)
  23. pisitools.dosym("/usr/lib/libdjbfft.so.%s" % lib_version,"/usr/lib/libdjbfft.so")
  24. pisitools.dosym("/usr/lib/libdjbfft.so.%s" % lib_version,"/usr/lib/libdjbfft.so.0")
  25. for header in ["fftc4.h", "complex4.h", "real4.h"]:
  26. pisitools.insinto("/usr/include", header)
  27. pisitools.dodoc("CHANGES","README","TODO")