From 67f3bf4dbad3c8339fbef0b76302fe9b567228ec Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 29 Sep 2013 16:02:58 +0200 Subject: First approach: Dell printer driver --- net-print/dell-driver/dell-driver-1.00.ebuild | 102 ++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 net-print/dell-driver/dell-driver-1.00.ebuild (limited to 'net-print/dell-driver/dell-driver-1.00.ebuild') diff --git a/net-print/dell-driver/dell-driver-1.00.ebuild b/net-print/dell-driver/dell-driver-1.00.ebuild new file mode 100644 index 0000000..f5e00ce --- /dev/null +++ b/net-print/dell-driver/dell-driver-1.00.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" +inherit eutils multilib + +DESCRIPTION="Samsung binary unified driver" +HOMEPAGE="http://www.samsung.com" +SRC_URI="http://downloads.dell.com/FOLDER01446174M/1/B1265dfw_Linux_v1.00_Driver.tar.gz -> ${P}.tar.gz" + +LICENSE="samsung" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +# Parallel support looks ugly, not supported in this ebuild +IUSE="scanner qt4" +RESTRICT="mirror strip" + +DEPEND="" +RDEPEND="net-print/cups + !net-print/splix + scanner? ( media-gfx/sane-backends ) + qt4? ( dev-qt/qtcore:4 )" + +S=${WORKDIR}/cdroot/Linux + +src_unpack() { + # Trailing garbage error, do not die + tar xozf ${DISTDIR}/${A} +} + +src_prepare() { + # Fix permissions + find . -type d -exec chmod 755 '{}' \; + find . -type f -exec chmod 644 '{}' \; + find . -type f -name \*.sh -exec chmod 755 '{}' \; + chmod 755 ./i386/raster* + chmod 755 ./i386/psto* + chmod 755 ./i386/mfp + #chmod 755 ./i386/qt4apps/at_opt/bin/* + #chmod 755 ./x86_64/at_root/usr/sbin/* + chmod 755 ./x86_64/raster* + chmod 755 ./x86_64/psto* + chmod 755 ./x86_64/mfp + #chmod 755 ./x86_64/qt4apps/at_opt/bin/* +} + +src_install() { + SOPT="/opt/Samsung/mfp" + if [ "${ABI}" == "amd64" ]; then + SARCH="x86_64" + SLIBDIR="lib64" + else + SARCH="i386" + SLIBDIR="lib" + fi + + # Printer files + insinto /usr/libexec/cups/filter + insopts -m755 + doins ${SARCH}/ps* ${SARCH}/raster* + + insinto /usr/libexec/cups/backend + doins ${SARCH}/mfp + + dodir /usr/share/cups/model + cp -r noarch/at_opt/share/ppd "${D}"/usr/share/cups/model/dell + gzip "${D}"/usr/share/cups/model/dell/*.ppd + dolib ${SARCH}/at_root/usr/${SLIBDIR}/libmfp.so.1.0.1 + dolib ${SARCH}/libscmssc.so + + if use scanner; then + insinto /etc/sane.d + doins noarch/at_root/etc/sane.d/smfp.conf + + exeinto /usr/$(get_libdir)/sane/ + doexe ${SARCH}/at_root/usr/${SLIBDIR}/sane/* + fi + + if use qt4; then + insinto ${SOPT}/share + doins OEM.ini + cp -r noarch/at_opt/share/V* noarch/at_opt/share/help \ + noarch/at_opt/share/images noarch/at_opt/share/ui \ + noarch/at_opt/share/utils "${D}"/${SOPT}/share + + exeinto ${SOPT}/lib + doexe ${SARCH}/qt4apps/at_opt/lib/* + exeinto ${SOPT}/libexec + doexe ${SARCH}/qt4apps/at_opt/bin/* + for i in ${SARCH}/qt4apps/at_opt/bin/*; do + make_wrapper $(basename ${i}) ${SOPT}/libexec/$(basename ${i}) ${SOPT}/libexec ${SOPT}/lib ${SOPT}/bin + done + fi +} + +pkg_postinst() { + if use scanner; then + elog "You need to add smfp to /etc/sane.d/dll.conf:" + elog " # echo smfp >> /etc/sane.d/dll.conf" + fi +} -- cgit v1.2.3-70-g09d2