# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 SUMMARY="Support for printing to ZjStream-based printers" HOMEPAGE="http://foo2zjs.rkkda.com/" LICENCES="GPL-2" SLOT="0" PLATFORMS="~amd64 ~x86" DEPENDENCIES=" build: app-arch/unzip app-editors/vim net-misc/wget sys-apps/ed sys-apps/bc run: net-print/cups net-print/cups-filters net-print/cups-filters test: sys-process/time " DEFAULT_SRC_COMPILE_PARAMS="-j1" DEFAULT_SRC_INSTALL_PARAMS="-j1" WORK=${WORKBASE}/${PNV} src_unpack() { edo mkdir "${WORK}" edo wget "http://foo2zjs.rkkda.com/${PN}.tar.gz" -O "${WORK}/${PN}.tar.gz" cd ${WORKBASE}/${PNV} edo tar zxf "${WORK}/${PN}.tar.gz" edo cd ${WORK}/${PN} emake getweb edo sed -e '/^WGETOPTS/s/-q//g' -i getweb edo ./getweb all } src_prepare() { WORK=${WORKBASE}/${PNV}/${PN} cd ${WORK} expatch "${FILES}/${PN}-udev.patch" expatch "${FILES}/${PN}-usbbackend.patch" # Prevent an access violation. # sed -e "s~/etc~${D}/etc~g" -i Makefile || die # sed -e "s~/etc~${D}/etc~g" -i hplj1000 || die # Prevent an access violation, do not create symlinks on live file system # during installation. edo sed -e 's/ install-filter / /g' -i Makefile # Prevent an access violation, do not remove files from live filesystem # during make install # sed -e '/rm .*LIBUDEVDIR)\//d' -i Makefile || die # sed -e '/rm .*lib\/udev\/rules.d\//d' -i hplj1000 || die } src_install() { dodir /usr/share/ppd default edo rmdir "${IMAGE}/usr/share/foo2hbpl/icm" edo rmdir "${IMAGE}/usr/share/foo2hbpl" edo rmdir "${IMAGE}/usr/share/foo2ddst/icm" edo rmdir "${IMAGE}/usr/share/foo2ddst" cd "${IMAGE}" edo mkdir -p usr/$(exhost --target)/bin edo mv usr/bin/* usr/$(exhost --target)/bin/ edo mv bin/* usr/$(exhost --target)/bin/ edo rmdir usr/bin edo rmdir bin }