diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-print/kyocera-1x2x-mfp-driver |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-print/kyocera-1x2x-mfp-driver')
4 files changed, 160 insertions, 0 deletions
diff --git a/net-print/kyocera-1x2x-mfp-driver/Manifest b/net-print/kyocera-1x2x-mfp-driver/Manifest new file mode 100644 index 000000000000..8a1e36086ba0 --- /dev/null +++ b/net-print/kyocera-1x2x-mfp-driver/Manifest @@ -0,0 +1,4 @@ +AUX rastertokpsl-fix.sh 399 SHA256 b9259f8dabf96b0a2d4e9d87ea1b55b9061a18b02269c9344c8e6049a7febb6a SHA512 7d757297b737a4fcebfd91bde4457674b738bf227480d5bcbf5049eb332c215395bca7798cd1931592ada217b5d85806fe567bd1741d8fadc23b572642901d09 WHIRLPOOL 5e7153632a79dc18ca77b64624a642060f1338e1985abe1eadf87dd39a21fcdb82835ea3483490a9b03a7a171613951c49fb2603ae9397d0549ece3d8f26f1d9 +DIST LinuxDrv_1.1203_FS-1x2xMFP.zip 5392941 SHA256 ee88eca053203d5ceec48f05ef7e99b45ca18afb72b91f0c94407ae5ee68f7c3 SHA512 afbe237d25d784a6202be01669ccb5e1f0f9a6349b6b74227723905529f23da6d7880b25420b289277020450286d02f579722add5c0d48c839ac44152a60d1ab WHIRLPOOL 5e87ca28c92e22840e0680c054d6f5d63f0905f5eed459a016ab42652a3e98a16ef390627ab8d2690f90bf9da98aef7d856571cc680567c6f81cc2d3ed76126a +EBUILD kyocera-1x2x-mfp-driver-1.1203-r1.ebuild 3430 SHA256 a73301cd3d911dda855fcac67d93100b3f904dacbbddeea001a8a3438e439d7e SHA512 6995f4bd77b97cfc0b33b73c3b574868ad4b2f8355213d42ae373c457668b2406b07efb338eef43789f152d5d7f51e82d9154bbccc02116b8c35ad3cff2322dd WHIRLPOOL 9cb326b2c2442c73ef84e402222283a76da0bfc123253fdc6caa46cf428182fbcd6626f9e392cdd728fa83ea20ac793b1e8e1df8a36f54d8435101195044542e +MISC metadata.xml 529 SHA256 2df39412cadf71da56dc0be4fd48e3aed2bb0220f0b940a5ad8c3826acd818a6 SHA512 b0b99720ff90cee4eeaffe3639191500deacaef20283e5ef2bacbb4d1d10227d945beb12767bd46a39b98b9634debccebdede469d371315a1656c18fe4eb5400 WHIRLPOOL a06c2545f6c3ad8ef775ac4946af1aea281255c1e3a24a9818094b21bae08f8412124e43d97d827b13ab8eead077483f126b1b1837f269f6fa98303cf5679ee2 diff --git a/net-print/kyocera-1x2x-mfp-driver/files/rastertokpsl-fix.sh b/net-print/kyocera-1x2x-mfp-driver/files/rastertokpsl-fix.sh new file mode 100644 index 000000000000..af898459f65f --- /dev/null +++ b/net-print/kyocera-1x2x-mfp-driver/files/rastertokpsl-fix.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# This file is a slightly modified version of 'rastertokpsl_wrapper' script +# by Maxim Norin. See https://github.com/mnorin/kyocera-ppd-installer for +# the original version. +# Distributed under the terms of the GNU General Public License v2. +jobname="$(echo "$3" | grep -Eo "[[:alnum:]]" | tr -d "\n" | tail -c 20)" +/usr/libexec/cups/filter/rastertokpsl "$1" "$2" "${jobname}" "$4" "$5" diff --git a/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r1.ebuild b/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r1.ebuild new file mode 100644 index 000000000000..a235beae8bdc --- /dev/null +++ b/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r1.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Printer descriptions (PPDs) and filters for Kyocera 1x2x MFP" +HOMEPAGE="http://www.kyoceradocumentsolutions.eu" +SRC_URI="LinuxDrv_${PV}_FS-1x2xMFP.zip" + +LICENSE="GPL-2 kyocera-mita-ppds" +SLOT="0" + +KEYWORDS="-* ~amd64" + +IUSE_L10N=(en ar cs de el es fr he hu it ko pl pt ro ru th tr vi zh-CN zh-TW) +IUSE="+rastertokpsl-fix ${IUSE_L10N[@]/#/l10n_}" +REQUIRED_USE="|| ( ${IUSE_L10N[@]/#/l10n_} )" + +RDEPEND="net-print/cups" +DEPEND="app-arch/unzip" +RESTRICT="fetch mirror" +QA_PREBUILT="/usr/libexec/cups/filter/rastertokpsl" + +get_tarball_name() { + # Note the capitalization inconsistency. Don't "fix" that. + case "$1" in + ar) echo arabic ;; + cs) echo czech ;; + de) echo German ;; + el) echo greek ;; + en) echo English ;; + es) echo Spanish ;; + fr) echo French ;; + he) echo hebrew ;; + hu) echo hungarian ;; + it) echo Italian ;; + ko) echo Korean ;; + pl) echo polish ;; + pt) echo Portuguese ;; + ro) echo romanian ;; + ru) echo russian ;; + th) echo thai ;; + tr) echo turkish ;; + vi) echo vietnamese ;; + zh-CN) echo simplified ;; + zh-TW) echo traditional ;; + *) die ;; + esac +} + +pkg_nofetch() { + einfo "Please, navigate your browser to the following URL and manually" + einfo "download the file named '${A}', then put it into your DISTDIR." + einfo "https://www.kyoceradocumentsolutions.eu/index/service/dlc.false.driver.FS1025MFP._.EN.html" + einfo + einfo "Consider keeping a local copy of the file since there're chances" + einfo "the company is going to eventually stop hosting it for whatever" + einfo "reason." +} + +src_unpack() { + unpack ${A} + S="${WORKDIR}/Linux/$(usex amd64 64bit 32bit)/Global" + + cd "${S}" || die + local l10n + for l10n in ${L10N}; do + local language="$(get_tarball_name "${l10n}")" + unpack "./${language}.tar.gz" + done +} + +src_prepare() { + eapply_user + + # Original PPD files need patching, since they expect their filter + # program to reside under /usr/lib, but Gentoo uses /usr/libexec. + + local orig="/usr/lib/cups/filter/rastertokpsl" + local repl="/usr/libexec/cups/filter/rastertokpsl" + if use rastertokpsl-fix; then + repl+="-fix.sh" + fi + + sed -i "s|${orig}|${repl}|g" ./*/Kyocera*.ppd || die +} + +src_install() { + insinto /usr/share/cups/model/KyoceraMita + + install_with_l10n_suffix() { + local l10n="$1"; shift + local file + for file; do + local bn="${file}" + bn="${bn##*/}" + bn="${bn%.ppd}" + newins "${file}" "${bn}_${l10n}.ppd" + done + } + + local l10n + for l10n in ${L10N}; do + local language="$(get_tarball_name "${l10n}")" + install_with_l10n_suffix "${l10n}" "./${language}"/Kyocera*.ppd + done + + exeinto /usr/libexec/cups/filter + + # Each unpacked tarball contains an exact copy of 'rastertokpsl', + # just take any of them. + local rasterfile="$(find -name rastertokpsl -print -quit)" + [[ $? -eq 0 && -n "${rasterfile}" ]] || die + doexe "${rasterfile}" + + if use rastertokpsl-fix; then + doexe "${FILESDIR}/rastertokpsl-fix.sh" + fi + + dodoc ../../Readme.htm + + elog "This packages installs Kyocera's 'Readme.htm' file (see package" + elog "documentation directory) which lists several common problems and" + elog "workarounds. You might want to have a look on it." + elog "(Merging the package with 'rastertokpsl-fix' USE flag can save you" + elog "from getting some of these problems.)" + elog + elog "Hint: try socket:// protocol when configuring network printing." +} diff --git a/net-print/kyocera-1x2x-mfp-driver/metadata.xml b/net-print/kyocera-1x2x-mfp-driver/metadata.xml new file mode 100644 index 000000000000..ebe2cdf388d4 --- /dev/null +++ b/net-print/kyocera-1x2x-mfp-driver/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> + +<pkgmetadata> + <maintainer type="person"> + <email>firegurafiku@gmail.com</email> + <name>Pavel Kretov</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + + <use> + <flag name="rastertokpsl-fix"> + Use custom wrapper script to sanitize arguments before passing + to 'rastertokpsl' filter program + </flag> + </use> +</pkgmetadata> |