actions.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #WorkDir = "lirc-%s" % get.srcVERSION().replace("_", "-")
  10. def setup():
  11. autotools.autoreconf("-fi")
  12. autotools.configure("--localstatedir=/run \
  13. --with-systemdsystemunitdir=no \
  14. --enable-shared \
  15. --disable-static \
  16. --disable-dependency-tracking \
  17. --with-x")
  18. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  19. def build():
  20. autotools.make()
  21. def install():
  22. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  23. pisitools.dobin("contrib/irman2lirc")
  24. # needed for lircd pid
  25. pisitools.dodir("/run/lirc")
  26. # example configs
  27. pisitools.insinto("/etc", "contrib/lircd.conf", "lircd.conf")
  28. pisitools.insinto("/etc", "contrib/lircmd.conf", "lircmd.conf")
  29. pisitools.dohtml("doc/html/*.html")
  30. pisitools.rename("/%s/%s" % (get.docDIR(), get.srcNAME()), "lirc")
  31. pisitools.insinto("/%s/lirc/contrib" % get.docDIR(), "contrib/*")
  32. pisitools.insinto("/lib/udev/rules.d", "contrib/*.rules", "60-lirc.rules")
  33. pisitools.domove("/run/lib/lirc/*", "/var/lib/lirc")
  34. pisitools.removeDir("/run/lib")