actions.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/usr/bin/env python3
  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 inary.actionsapi import autotools
  7. from inary.actionsapi import inarytools
  8. from inary.actionsapi import shelltools
  9. from inary.actionsapi import get
  10. def setup():
  11. shelltools.makedirs("build-gtk2")
  12. shelltools.makedirs("build-gtk3")
  13. autotools.autoreconf("-fi")
  14. shelltools.cd("build-gtk2")
  15. shelltools.system("../configure \
  16. --prefix=/usr \
  17. --sysconfdir=/etc \
  18. --enable-debug \
  19. --enable-udisks \
  20. --enable-demo \
  21. --with-gtk=2")
  22. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  23. shelltools.cd("..")
  24. shelltools.cd("build-gtk3")
  25. shelltools.system("../configure \
  26. --prefix=/usr \
  27. --sysconfdir=/etc \
  28. --enable-debug \
  29. --enable-udisks \
  30. --enable-demo \
  31. --with-gtk=3")
  32. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  33. def build():
  34. shelltools.cd("build-gtk2")
  35. autotools.make()
  36. shelltools.cd("..")
  37. shelltools.cd("build-gtk3")
  38. autotools.make()
  39. def install():
  40. shelltools.cd("build-gtk2")
  41. autotools.install()
  42. shelltools.cd("..")
  43. shelltools.cd("build-gtk3")
  44. autotools.install()
  45. shelltools.unlink("{}/usr/include/libfm-1.0/fm-extra.h".format(get.installDIR()))
  46. shelltools.unlink("{}/usr/include/libfm-1.0/fm-version.h".format(get.installDIR()))
  47. shelltools.unlink("{}/usr/lib/libfm-extra*".format(get.installDIR()))
  48. shelltools.unlink("{}/usr/lib/pkgconfig/libfm-extra.pc".format(get.installDIR()))
  49. shelltools.unlink("{}/usr/include/libfm-1.0/fm-xml-file.h".format(get.installDIR()))
  50. shelltools.cd("..")
  51. inarytools.dodoc("AUTHORS", "COPYING", "TODO")