New package: ipp-usb-0.9.17

This commit is contained in:
Philipp David 2021-02-20 23:28:15 +01:00 committed by Érico Nogueira Rolim
parent 64fb9387a3
commit f18cec01be
4 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,23 @@
Void-specific instructions:
============================
By default, ipp-usb constantly runs in the background. It can also run on
demand by utilizing udev rules to detect usb printers. You can enable
this functionality by doing the following:
echo 'OPTS=udev' > /etc/sv/ipp-usb/conf
touch /etc/sv/ipp-usb/down
ln -s /etc/sv/ipp-usb /var/service
cp /usr/share/doc/ipp-usb/71-ipp-usb.rules /etc/udev/rules.d/
Afterwards restart your computer or reload udev rules with `udevadm trigger`.
You can also link the udev rules instead of copying them, this way they get
updated with the package automatically:
ln -s /usr/share/doc/ipp-usb/71-ipp-usb.rules /etc/udev/rules.d/
Do note that because udev rules may run before runsvdir, having a printer
connected at boot time will not reliably cause ipp-usb to start.
Run the ipp-usb service once at startup with a oneshot-style service or cron
to address this.

View file

@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
[ -r ./conf ] && . ./conf
exec ipp-usb ${OPTS:=standalone}

View file

@ -0,0 +1,5 @@
--- systemd-udev/71-ipp-usb.rules
+++ systemd-udev/71-ipp-usb.rules
@@ -1 +1 @@
-ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:070104:*", OWNER="root", GROUP="lp", MODE="0664", TAG+="systemd", ENV{SYSTEMD_WANTS}+="ipp-usb.service"
+ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:070104:*", OWNER="root", GROUP="lp", MODE="0664", RUN+="/usr/bin/sv o ipp-usb"

26
srcpkgs/ipp-usb/template Normal file
View file

@ -0,0 +1,26 @@
# Template file for 'ipp-usb'
pkgname=ipp-usb
version=0.9.17
revision=1
build_style=go
go_import_path="github.com/OpenPrinting/ipp-usb"
conf_files="/etc/ipp-usb/ipp-usb.conf"
hostmakedepends="pkg-config"
makedepends="avahi-libs-devel libusb-devel"
depends="avahi"
short_desc="Allows using the IPP protocol over usb connections"
maintainer="Philipp David <pd@3b.pm>"
license="BSD-2-Clause"
homepage="https://github.com/OpenPrinting/ipp-usb"
distfiles="https://github.com/OpenPrinting/ipp-usb/archive/$version.tar.gz"
checksum=4c1fbd89f7d971eed8447cd80d3e4723edd968043cb2fa4c490ac305720156c3
post_install() {
vsv ipp-usb
vman ipp-usb.8
vdoc README.md
vdoc ${FILESDIR}/README.voidlinux
vdoc systemd-udev/71-ipp-usb.rules
vinstall ipp-usb.conf 644 /etc/ipp-usb
vlicense LICENSE
}