# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Ebuild wrapper for Samsung SCX/MFP unified binary drivers." HOMEPAGE="http://samsung.com/Products/PrinterandMultifunction/MultifunctionProducts" SRC_URI="http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?CDSite=us&CttFileID=801111&CDCttType=DR&ModelType=N&ModelName=SCX-4521F&VPath=DR/200707/20070720165133984_UnifiedLinuxDriver.tar.gz usb? ( http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.92-2007011301.tar.gz )" # Is license really as-is? LICENSE="as-is" SLOT="0" KEYWORDS="~x86 ~amd64 -*" IUSE="kde qt3 scanner usb" DEPEND="" RDEPEND="net-print/cups scanner? ( media-gfx/sane-backends ) virtual/ghostscript x86? ( sys-libs/lib-compat ) amd64? ( app-emulation/emul-linux-x86-compat ) qt3? ( =x11-libs/qt-3* ) kde? ( kde-base/kde )" RESTRICT="${RESTRICT} strip" #FIXME: Add support for their kernel modules pkg_setup() { echo "" ewarn "Disable the usb USE flag if you connect your Samsung MFP to the parallel port" echo "" } src_install() { if [ "${ARCH}" == "x86" ]; then MFP_ARCH="i386" LIBDIR="lib" else MFP_ARCH="x86_64" LIBDIR="lib64" fi cd ${WORKDIR} # Common files if use usb then dolib.so fix-nopar/${MFP_ARCH}/libmfp.so.1.0.1 else dolib.so cdroot/Linux/${MFP_ARCH}/at_root/usr/${LIBDIR}/libmfp.so.1.0.1 fi dosym libmfp.so.1.0.1 /usr/lib/libmfp.so.1 dosym libmfp.so.1.0.1 /usr/lib/libmfp.so # Companion binary files, libqt-mt.so.3 is needed so it's a qt3/kde dependency if use qt3 || use kde then insinto /opt/samsung/mfp/share doins cdroot/Linux/OEM.ini exeinto /opt/samsung/mfp/lib doexe cdroot/Linux/${MFP_ARCH}/at_opt/lib/* exeinto /opt/samsung/mfp/libexec doexe cdroot/Linux/${MFP_ARCH}/at_opt/bin/* exeinto /opt/samsung/mfp/bin doexe ${FILESDIR}/samsung-mfp-wrap dosym samsung-mfp-wrap /opt/samsung/mfp/bin/Configurator dosym samsung-mfp-wrap /opt/samsung/mfp/bin/shhv insinto /usr/share/applications doins ${FILESDIR}/samsung-mfp-bin-Configurator.desktop doins ${FILESDIR}/samsung-mfp-bin-HelpViewer.desktop doins ${FILESDIR}/samsung-mfp-bin-TonerReorder.desktop # These files are only used by the qt help gui insinto /opt/samsung/mfp/share doins cdroot/Linux/noarch/at_opt/share/VERSION* doins cdroot/Linux/noarch/at_opt/share/about* insinto /opt/samsung/mfp/share/images doins cdroot/Linux/noarch/at_opt/share/images/* insinto /opt/samsung/mfp/share/help doins cdroot/Linux/noarch/at_opt/share/help/* fi # Printer files dodir /usr/libexec/cups cp -dapr cdroot/Linux/${MFP_ARCH}/at_root/usr/${LIBDIR}/cups ${D}/usr/libexec # Should all printer defanitions really be installed? insinto /usr/share/cups/model/samsung doins cdroot/Linux/noarch/at_opt/share/ppd/*.ppd insinto /usr/share/cups/model/samsung/cms doins cdroot/Linux/noarch/at_opt/share/ppd/cms/* # Scanner files if use scanner then exeinto /usr/lib/sane doexe cdroot/Linux/${MFP_ARCH}/at_root/usr/${LIBDIR}/sane/libsane-smfp.so.1.0.1 dosym libsane-smfp.so.1.0.1 /usr/lib/sane/libsane-smfp.so.1 dosym libsane-smfp.so.1.0.1 /usr/lib/sane/libsane-smfp.so insinto /etc/sane.d doins cdroot/Linux/noarch/at_root/etc/sane.d/smfp.conf fi } pkg_postinst() { echo "" elog "Make sure that the user has permissions to access /dev/usb/lp0." elog "Usually, user should be added to lp group: usermod -a -G lp username" echo "" if use scanner then elog "To enable scanning, add the proper line to /etc/sane.d/dll.conf (smfp)." elog "If geniusvp2 is enabled in your dll.conf it can cause problems. Try to" elog "disable it (comment it with #)" echo "" elog "Make sure to add users to the scanner group: usermod -a -G scanner username" echo "" fi if use qt3 then elog "Also, notice that companion files are now installed. If someone detects their" elog "malfunctioning caused by non-samsung installer, please report them to Gentoo bugzilla" elog "via http://bugs.gentoo.org/show_bug.cgi?id=139715" echo "" fi if use usb then ewarn "Disable the usb USE flag if you connect your Samsung MFP to the parallel port" echo "" fi }