80 lines
2.3 KiB
Bash
80 lines
2.3 KiB
Bash
# Template file for 'samsung-unified-driver'
|
|
pkgname=samsung-unified-driver
|
|
version=1.00.37
|
|
revision=4
|
|
archs="i686 x86_64"
|
|
create_wrksrc=yes
|
|
depends="cups ghostscript libusb-compat sane"
|
|
short_desc="Unified Linux Driver for Samsung printers and scanners"
|
|
maintainer="Thomas Bernard <thomas@famillebernardgouriou.fr>"
|
|
license="custom:Propietary"
|
|
homepage="https://www.samsung.com"
|
|
distfiles="https://downloadcenter.samsung.com/content/DR/201512/20151210091120064/uld_v${version}_00.99.tar.gz"
|
|
checksum="6b85253ea0bb51d241f6fd665ff0d39464cdad87084802a77a385c707fa2c664"
|
|
repository=nonfree
|
|
nostrip=true
|
|
|
|
post_extract() {
|
|
mv uld/i386 uld/i686
|
|
}
|
|
|
|
do_install() {
|
|
|
|
vlicense uld/noarch/license/eula.txt
|
|
vlicense uld/noarch/license/eula-fr.txt
|
|
|
|
# install the printer driver
|
|
vmkdir /usr/lib
|
|
vcopy uld/$XBPS_TARGET_MACHINE/libscmssc.so /usr/lib
|
|
|
|
vmkdir /usr/lib/cups/backend
|
|
vcopy uld/$XBPS_TARGET_MACHINE/smfpnetdiscovery /usr/lib/cups/backend
|
|
|
|
vmkdir /usr/lib/cups/filter
|
|
vcopy uld/$XBPS_TARGET_MACHINE/pstosecps /usr/lib/cups/filter
|
|
vcopy uld/$XBPS_TARGET_MACHINE/rastertospl /usr/lib/cups/filter
|
|
|
|
vmkdir /usr/share/ppd/suld
|
|
for ppd in uld/noarch/share/ppd/*.ppd; do
|
|
gzip < "$ppd" > "$DESTDIR"/usr/share/ppd/suld/"${ppd##*/}".gz
|
|
done
|
|
|
|
vmkdir /usr/share/ppd/suld/cms
|
|
for cts in uld/noarch/share/ppd/cms/*.cts; do
|
|
vcopy "$cts" /usr/share/ppd/suld/cms
|
|
done
|
|
|
|
# install the scanner driver
|
|
|
|
vmkdir /usr/share
|
|
|
|
vcopy uld/noarch/share/locale /usr/share
|
|
rm -f "$DESTDIR"/usr/share/locale/fr/LC_MESSAGES/install.mo
|
|
|
|
vmkdir /etc/sane.d
|
|
vcopy uld/noarch/etc/smfp.conf /etc/sane.d
|
|
vcopy $FILESDIR/xerox_mfp-smfp.conf /etc/sane.d
|
|
|
|
vmkdir /etc/sane.d/dll.d
|
|
echo smfp > "$DESTDIR"/etc/sane.d/dll.d/smfp-scanner
|
|
echo xerox_mfp-smfp > "$DESTDIR"/etc/sane.d/dll.d/smfp-scanner-fix
|
|
|
|
vmkdir /usr/lib/sane
|
|
vcopy uld/$XBPS_TARGET_MACHINE/libsane-smfp.so.1.0.1 /usr/lib/sane
|
|
ln -s libsane-smfp.so.1.0.1 "$DESTDIR"/usr/lib/sane/libsane-smfp.so.1
|
|
ln -s libsane-smfp.so.1 "$DESTDIR"/usr/lib/sane/libsane-smfp.so
|
|
|
|
vmkdir /usr/lib/udev/rules.d
|
|
(
|
|
OEM_FILE=uld/noarch/oem.conf
|
|
INSTALL_LOG_FILE=/dev/null
|
|
source uld/noarch/scripting_utils
|
|
source uld/noarch/package_utils
|
|
source uld/noarch/scanner-script.pkg
|
|
fill_full_template uld/noarch/etc/smfp.rules.in "$DESTDIR"/usr/lib/udev/rules.d/60_smfp_samsung.rules
|
|
|
|
vmkdir /opt/samsung/scanner/share
|
|
vcopy "$OEM_FILE" /opt/samsung/scanner/share
|
|
)
|
|
|
|
}
|