splix-2.0.0_p20111206.ebuild 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="A set of CUPS printer drivers for SPL (Samsung Printer Language) printers"
  6. HOMEPAGE="http://splix.sourceforge.net/"
  7. SRC_URI="https://dev.gentoo.org/~voyageur/distfiles/${P}.tar.bz2
  8. http://dev.gentooexperimental.org/~scarabeus/samsung-cms-20120312.tar.xz"
  9. # If you can't find your printer cms open the new bug if you recheck the
  10. # cms home and it is contained there. Otherwise bummer.
  11. # The cms can be found here:
  12. # http://www.bchemnet.com/suldr/smfpv3.html
  13. # It is stored int he unifieddriver tarball and repacked.
  14. LICENSE="GPL-2"
  15. SLOT="0"
  16. KEYWORDS="amd64 x86"
  17. IUSE="+jbig"
  18. DEPEND=">=app-text/ghostscript-gpl-9.02
  19. >=net-print/cups-1.4.0
  20. jbig? ( media-libs/jbigkit )"
  21. RDEPEND="${DEPEND}"
  22. S=${WORKDIR}/${PN}
  23. src_prepare() {
  24. # Honor LDFLAGS
  25. sed -e "/[a-z]_LDFLAGS/s/:=.*/:= $\{LDFLAGS\}/" -i module.mk \
  26. || die "module.mk sed failed"
  27. # Correct link comand, do not strip on install
  28. sed -e "s/g++/$\{LINKER\}/" -e "/install/s/-s //" -i rules.mk \
  29. || die "rules.mk sed failed"
  30. }
  31. src_compile() {
  32. local options="MODE=optimized"
  33. use jbig || options="${options} DISABLE_JBIG=1"
  34. emake ${options} PSTORASTER=gstoraster CXX="$(tc-getCXX)" \
  35. OPTIM_CFLAGS="${CFLAGS}" OPTIM_CXXFLAGS="${CXXFLAGS}"
  36. }
  37. src_install() {
  38. emake DESTDIR="${D}" install
  39. gzip "${ED}"/$(cups-config --datadir)/model/*/*.ppd || die "ppd gzip failed"
  40. # it is expected to be at:
  41. # /usr/share/cups/profiles/{samsung,xerox,dell}
  42. # instead it is only at:
  43. # /usr/share/cups/profiles/samsung
  44. emake DESTDIR="${D}" CMSDIR="${WORKDIR}"/cms MANUFACTURER=samsung installcms
  45. dosym $(cups-config --datadir)/profiles/samsung $(cups-config --datadir)/profiles/xerox
  46. dosym $(cups-config --datadir)/profiles/samsung $(cups-config --datadir)/profiles/dell
  47. }
  48. pkg_postinst() {
  49. ewarn "You *MUST* make sure that the PPD files that CUPS is using"
  50. ewarn "for actually installed printers are updated if you upgraded"
  51. ewarn "from a previous version of splix!"
  52. ewarn "Otherwise you will be unable to print (your printer might"
  53. ewarn "spit out blank pages etc.)."
  54. ewarn "To do that, simply delete the corresponding PPD file in"
  55. ewarn "/etc/cups/ppd/, click on 'Modify Printer' belonging to the"
  56. ewarn "corresponding printer in the CUPS webinterface (usually"
  57. ewarn "reachable via http://localhost:631/) and choose the correct"
  58. ewarn "printer make and model, for example:"
  59. ewarn "'Samsung' -> 'Samsung ML-1610, 1.0 (en)'"
  60. }