actions.py 1.2 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 get
  9. import os
  10. def setup():
  11. autotools.autoreconf("-fi")
  12. # suppress compiler warnings
  13. pisitools.cflags.add("-Wno-unused-result -Wno-return-type -Wno-deprecated-declarations -Wno-format-truncation\
  14. -Wno-nested-externs -Wno-implicit-function-declaration -Wno-missing-prototypes -Wno-address\
  15. -Wno-unused-but-set-variable -Wno-misleading-indentation -Wno-unused-variable")
  16. autotools.configure("--disable-static \
  17. --enable-inotify")
  18. for root, dirs, files in os.walk(get.workDIR()):
  19. for name in files:
  20. if name.endswith(".py"):
  21. pisitools.dosed("%s/%s" % (root, name), "#!/usr/bin/env python", "#!/usr/bin/python")
  22. def build():
  23. autotools.make()
  24. def install():
  25. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  26. # remove static lib.
  27. pisitools.remove("/usr/lib/libgamin_shared.a")
  28. pisitools.dodoc("COPYING", "README")