Skip to content

Commit

Permalink
New package: pfusp-2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuakraemer committed May 3, 2022
1 parent ca1ee6e commit fce675b
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 0 deletions.
26 changes: 26 additions & 0 deletions srcpkgs/pfusp/files/60-pfusp.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ACTION!="add", GOTO="pfusp_scanner_rules_end"
ENV{DEVTYPE}!="usb_device", GOTO="pfusp_scanner_rules_end"
ATTR{idVendor}!="04c5", GOTO="pfusp_scanner_rules_end"

LABEL="pfusp_scanner_rules_begin"
#SP-1120
ATTRS{idProduct}=="1473", ENV{pfusp_driver}="yes"
#SP-1125
ATTRS{idProduct}=="1475", ENV{pfusp_driver}="yes"
#SP-1130
ATTRS{idProduct}=="1476", ENV{pfusp_driver}="yes"
#SP-1425
ATTRS{idProduct}=="1524", ENV{pfusp_driver}="yes"
#SP-1120N
ATTRS{idProduct}=="1625", ENV{pfusp_driver}="yes"
#SP-1125N
ATTRS{idProduct}=="1626", ENV{pfusp_driver}="yes"
#SP-1130N
ATTRS{idProduct}=="1627", ENV{pfusp_driver}="yes"
# Give scanner users read/write permissions on the device.
ENV{pfusp_driver}=="yes", MODE="0666", OWNER="root", GROUP="root"

# Device detection by pfusp depends on libsane_matched being set.
ENV{pfusp_driver}=="yes", ENV{libsane_matched}="yes"

LABEL="pfusp_scanner_rules_end"
15 changes: 15 additions & 0 deletions srcpkgs/pfusp/files/consumablessettings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Root>
<SP-1120>
<IgnoreEnergyStar3>0</IgnoreEnergyStar3>
</SP-1120>
<SP-1125>
<IgnoreEnergyStar3>0</IgnoreEnergyStar3>
</SP-1125>
<SP-1130>
<IgnoreEnergyStar3>0</IgnoreEnergyStar3>
</SP-1130>
<SP-1425>
<IgnoreEnergyStar3>0</IgnoreEnergyStar3>
</SP-1425>
<Version>2.2.0</Version>
</Root>
1 change: 1 addition & 0 deletions srcpkgs/pfusp/files/pfusp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pfusp
21 changes: 21 additions & 0 deletions srcpkgs/pfusp/files/pfusp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#SP-1120
usb 0x04c5 0x1473

#SP-1125
usb 0x04c5 0x1475

#SP-1130
usb 0x04c5 0x1476

#SP-1425
usb 0x04c5 0x1524

#SP-1120N
usb 0x04c5 0x1625

#SP-1125N
usb 0x04c5 0x1626

#SP-1130N
usb 0x04c5 0x1627

1 change: 1 addition & 0 deletions srcpkgs/pfusp/files/simple-scan.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PAPER_SIZE=0
45 changes: 45 additions & 0 deletions srcpkgs/pfusp/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Template file for 'pfusp'
pkgname=pfusp
version=2.2.0
revision=1
archs="x86_64"
hostmakedepends="binutils tar xz"
depends="sane"
short_desc="SANE backend for Fujitsu SP series scanners"
maintainer="Joshua Krämer <joshua@kraemer.link>"
license="custom:EULA"
homepage="https://imagescanner.fujitsu.com/global/dl/index-sps.html"
distfiles="https://origin.pfultd.com/downloads/IMAGE/driver/ubuntu/220/pfusp-ubuntu_${version}_amd64.deb
https://origin.pfultd.com/downloads/IMAGE/driver/ubuntu/220/P2U3-0210-03ENZ0.pdf"
checksum="6bd1289b52a2d2574f5260dd29ea9e1a9a75bd6f02ccc904c9fc3d6f2d8642dc
cbf3cbb95d7266a53b8203c590af8256787b588b5ba12cfb30c645edf8d2fd85"
restricted=yes
repository=nonfree

do_extract() {
ar p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/pfusp-ubuntu_${version}_amd64.deb data.tar.xz | tar -xJf -
}

do_install() {
vcopy "*" /
vdoc opt/pfusp/readme.txt
vdoc opt/pfusp/readmeJPN.txt
vdoc ${XBPS_SRCDISTDIR}/${pkgname}-${version}/P2U3-0210-03ENZ0.pdf
vlicense opt/pfusp/LicenseENU.txt
vlicense opt/pfusp/LicenseJPN.txt
rm ${DESTDIR}/opt/pfusp/*.txt

cd ${DESTDIR}/opt/pfusp
chmod 755 bin/* consumables/* etc/pfuspsysinfo.sh lib/* pfuspgetinfo/*

vmkdir usr/bin
vmkdir etc
ln -s -t ${DESTDIR}/usr/bin /opt/pfusp/consumables/pfuspconsumables
ln -s -t ${DESTDIR}/usr/bin /opt/pfusp/bin/pfuspscanmanager
ln -s /opt/pfusp/etc ${DESTDIR}/etc/pfusp

cd ${FILESDIR}
vinstall 60-pfusp.rules 644 usr/lib/udev/rules.d
vinstall pfusp 644 etc/sane.d/dll.d
vcopy "pfusp.conf simple-scan.conf consumablessettings.xml" opt/pfusp/etc
}

0 comments on commit fce675b

Please sign in to comment.