brother-brscan3: don't manually extract deb
This commit is contained in:
parent
32c8249840
commit
1e7708dc1c
@ -4,8 +4,8 @@ version=0.2.13
|
||||
revision=2
|
||||
archs="i686 x86_64"
|
||||
create_wrksrc=yes
|
||||
hostmakedepends="tar"
|
||||
makedepends="sane-devel curl"
|
||||
hostmakedepends="curl"
|
||||
makedepends="sane-devel"
|
||||
depends="sane"
|
||||
short_desc="SANE scanner driver for brscan3-compatible Brother scanners"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
@ -16,38 +16,13 @@ nodebug=yes
|
||||
_license_checksum=4ab8b9269a74377ee85458cc4dfbacfbf6d26665426572fe16f7102af214bd3c
|
||||
|
||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||
debpkgid="1.amd64"
|
||||
distfiles="https://download.brother.com/welcome/dlf006642/brscan3-${version}-${debpkgid}.deb"
|
||||
distfiles="https://download.brother.com/welcome/dlf006642/brscan3-${version}-1.amd64.deb"
|
||||
checksum="446adf531bf39032892e9504ce34b7bf889e0f8628c0732cebb3b83fafb327b8"
|
||||
mylibdir="lib64"
|
||||
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
|
||||
debpkgid="1.i386"
|
||||
distfiles="https://download.brother.com/welcome/dlf006641/brscan3-${version}-${debpkgid}.deb"
|
||||
distfiles="https://download.brother.com/welcome/dlf006641/brscan3-${version}-1.i386.deb"
|
||||
checksum="ad06665cac32035893f614d9305dabf73145af454f1aeb6b8b7c7fa2700fe2e6"
|
||||
mylibdir="lib"
|
||||
fi
|
||||
|
||||
do_extract() {
|
||||
ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/brscan3-${version}-${debpkgid}.deb
|
||||
cd ${wrksrc}
|
||||
bsdtar xzpvf data.tar.gz
|
||||
}
|
||||
|
||||
do_install() {
|
||||
# dlls and symlink (correctly put in /usr/lib)
|
||||
cd ${wrksrc}
|
||||
vinstall ./usr/${mylibdir}/sane/libsane-brother3.so.1.0.7 755 usr/lib/sane
|
||||
ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so.1
|
||||
ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so
|
||||
vinstall ./usr/${mylibdir}/libbrscandec3.so.1.0.0 755 usr/lib
|
||||
ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1
|
||||
ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so
|
||||
vmkdir /opt/Brother
|
||||
vcopy "./usr/local/Brother/*" /opt/Brother/
|
||||
chmod o-w ${DESTDIR}/opt/Brother/sane/brsanenetdevice3.cfg
|
||||
vlicense LICENSE
|
||||
}
|
||||
|
||||
post_extract() {
|
||||
curl -sk https://support.brother.com/g/s/agreement/English_lpr/agree.html | \
|
||||
sed -n \
|
||||
@ -63,4 +38,21 @@ post_extract() {
|
||||
if [ "$filesum" != "$_license_checksum" ]; then
|
||||
msg_error "SHA256 mismatch for LICENSE:\n$filesum\n"
|
||||
fi
|
||||
|
||||
if [ -d usr/lib64 ]; then
|
||||
mv usr/lib64 usr/lib
|
||||
fi
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vinstall usr/lib/sane/libsane-brother3.so.1.0.7 755 usr/lib/sane
|
||||
ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so.1
|
||||
ln -sf /usr/lib/sane/libsane-brother3.so.1.0.7 ${DESTDIR}/usr/lib/sane/libsane-brother3.so
|
||||
vinstall usr/lib/libbrscandec3.so.1.0.0 755 usr/lib
|
||||
ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so.1
|
||||
ln -sf /usr/lib/libbrscandec3.so.1.0.0 ${DESTDIR}/usr/lib/libbrscandec3.so
|
||||
vmkdir /opt
|
||||
vcopy usr/local/Brother /opt
|
||||
chmod o-w ${DESTDIR}/opt/Brother/sane/brsanenetdevice3.cfg
|
||||
vlicense LICENSE
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user