actions.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. pisitools.cflags.add("-fPIC -fno-strict-aliasing")
  16. pisitools.ldflags.add("-pie")
  17. shelltools.echo(".tarball-version", get.srcVERSION())
  18. shelltools.echo(".version", get.srcVERSION())
  19. autotools.autoreconf("-fiv")
  20. autotools.configure("--enable-ipv6 \
  21. --enable-avahi \
  22. --enable-libusb \
  23. --disable-rpath \
  24. --disable-locking \
  25. --disable-latex \
  26. --with-docdir=/usr/share/doc/%s \
  27. --with-gphoto2" % get.srcNAME())
  28. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  29. def build():
  30. autotools.make()
  31. def install():
  32. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  33. # Install udev rule
  34. pisitools.insinto("/lib/udev/rules.d", "tools/udev/libsane.rules", "65-libsane.rules")
  35. # Add epson epkowa and brother2 backends also
  36. shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(),
  37. "# Epson 'epkowa' backend\n" +
  38. "# See http://www.sane-project.org/cgi-bin/driver.pl?manu=Epson&bus=any for supported scanners\n" +
  39. "# In order to use this backend, you have to install iscan package\nepkowa")
  40. shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(),
  41. "\n# Brother backend\n" +
  42. "# See http://en.pardus-wiki.org/Brother_scanner_support_for_DCP_and_MFC_models for installation\n" +
  43. "brother\nbrother2\nbrother3")
  44. shelltools.echo("%s/etc/sane.d/dll.conf" % get.installDIR(), "\n# Added for Xerox Phaser 3100 MFP\nXeroxPhaser3100\n")