actions.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. def setup():
  11. # Those are in gentoo ebuild too, but what are they for?
  12. # I couldn't find in docs, some comment would be helpful here -gurer
  13. shelltools.export("SANEI_JPEG", "sanei_jpeg.o")
  14. shelltools.export("SANEI_JPEG_LO", "sanei_jpeg.lo")
  15. autotools.autoreconf("-fi")
  16. autotools.configure("--enable-ipv6 \
  17. --enable-avahi \
  18. --enable-libusb \
  19. --disable-rpath \
  20. --disable-locking \
  21. --disable-latex \
  22. --with-docdir=/usr/share/doc/%s \
  23. --with-gphoto2" % get.srcNAME())
  24. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  25. def build():
  26. autotools.make()
  27. def install():
  28. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  29. # Install udev rule
  30. pisitools.insinto("/lib/udev/rules.d", "tools/udev/libsane.rules", "65-libsane.rules")
  31. # Add epson epkowa and brother2 backends also
  32. shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(),
  33. "# Epson 'epkowa' backend\n" +
  34. "# See http://www.sane-project.org/cgi-bin/driver.pl?manu=Epson&bus=any for supported scanners\n" +
  35. "# In order to use this backend, you have to install iscan package\nepkowa")
  36. shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(),
  37. "\n# Brother backend\n" +
  38. "# See http://en.pardus-wiki.org/Brother_scanner_support_for_DCP_and_MFC_models for installation\n" +
  39. "brother\nbrother2\nbrother3")
  40. shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(), "\n# Added for Xerox Phaser 3100 MFP\nXeroxPhaser3100\n")