diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-07-02 04:07:19 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-07-02 04:07:19 +0300 |
commit | cbb1f5e2f47da83209867b6bbfad1841ee70f8a5 (patch) | |
tree | 0e9cb6d6e2c8db8355df4f7c20b7b4bc85738f8a | |
parent | c9250bdb6a0bc672a235d4365cc01ef2b8d61480 (diff) |
foo2zjs ported from gentoo
-rw-r--r-- | metadata/categories.conf | 1 | ||||
-rw-r--r-- | packages/net-print/foo2zjs/files/foo2zjs-udev.patch | 12 | ||||
-rw-r--r-- | packages/net-print/foo2zjs/files/foo2zjs-usbbackend.patch | 12 | ||||
-rw-r--r-- | packages/net-print/foo2zjs/foo2zjs-scm.exheres-0 | 72 |
4 files changed, 97 insertions, 0 deletions
diff --git a/metadata/categories.conf b/metadata/categories.conf index c152d34..45e1a0b 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -15,3 +15,4 @@ media-sound media net-vpn net-misc +net-print diff --git a/packages/net-print/foo2zjs/files/foo2zjs-udev.patch b/packages/net-print/foo2zjs/files/foo2zjs-udev.patch new file mode 100644 index 0000000..0703839 --- /dev/null +++ b/packages/net-print/foo2zjs/files/foo2zjs-udev.patch @@ -0,0 +1,12 @@ +diff -ruN foo2zjs/Makefile foo2zjs.orig/Makefile +--- foo2zjs/Makefile 2012-01-18 21:53:45.834944820 +0100 ++++ foo2zjs.orig/Makefile 2012-01-18 21:51:18.872936603 +0100 +@@ -933,7 +933,7 @@ + echo " *** OR (generic linux)"; \ + echo " *** # rm -f $(LIBUDEVDIR)/*-printers.rules"; \ + echo " ***"; \ +- exit 1; \ ++ # exit 1; \ + fi + # ... OK! + # diff --git a/packages/net-print/foo2zjs/files/foo2zjs-usbbackend.patch b/packages/net-print/foo2zjs/files/foo2zjs-usbbackend.patch new file mode 100644 index 0000000..b73c79b --- /dev/null +++ b/packages/net-print/foo2zjs/files/foo2zjs-usbbackend.patch @@ -0,0 +1,12 @@ +diff -ruN foo2zjs.orig/hplj1000 foo2zjs/hplj1000 +--- foo2zjs.orig/hplj1000 2013-01-11 17:20:04.000000000 +0100 ++++ foo2zjs/hplj1000 2013-03-24 20:49:16.150065578 +0100 +@@ -42,7 +42,7 @@ + # Path to the USB CUPS backend. We use this backend to upload the firmware + # into the printer when we are on a CUPS/libusb-based system. + # +-USB_BACKEND=/usr/lib/cups/backend/usb ++USB_BACKEND=/usr/libexec/cups/backend/usb + + # + # Directory to find downloadable HP firmware files sihpMMMM.dl diff --git a/packages/net-print/foo2zjs/foo2zjs-scm.exheres-0 b/packages/net-print/foo2zjs/foo2zjs-scm.exheres-0 new file mode 100644 index 0000000..127e8ac --- /dev/null +++ b/packages/net-print/foo2zjs/foo2zjs-scm.exheres-0 @@ -0,0 +1,72 @@ +# Distributed under the terms of the GNU General Public License v2 + +SUMMARY="Support for printing to ZjStream-based printers" +HOMEPAGE="http://foo2zjs.rkkda.com/" + +#LICENSE="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 +} |