summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabioLolix2022-03-30 19:26:34 +0200
committerFabioLolix2022-03-30 19:26:34 +0200
commit68f1ae326ced8892a2bd6447fd0c35e96b1656ee (patch)
tree262f1574e311f04db2fc333530e489b85314d414
parent81d6d32ccadd33b4bf0eb54c7e337cfa2e9bd1d7 (diff)
downloadaur-68f1ae326ced8892a2bd6447fd0c35e96b1656ee.tar.gz
add OCR
-rw-r--r--.SRCINFO74
-rw-r--r--PKGBUILD99
2 files changed, 166 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 338c5c3492f0..d614474aa207 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vuescan-bin
pkgdesc = A powerful proprietary scanning tool developed by Hamrick Software
pkgver = 9.7.82
- pkgrel = 1
+ pkgrel = 2
url = https://www.hamrick.com/
arch = i686
arch = x86_64
@@ -13,12 +13,78 @@ pkgbase = vuescan-bin
depends = libusb-compat
options = !strip
source = vuescan-LICENSE.txt
+ source = ocr_bg-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_bg.bin
+ source = ocr_ca-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_ca.bin
+ source = ocr_zh-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_zh.bin
+ source = ocr_tw-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_tw.bin
+ source = ocr_cs-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_cs.bin
+ source = ocr_da-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_da.bin
+ source = ocr_nl-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_nl.bin
+ source = ocr_fi-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_fi.bin
+ source = ocr_fr-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_fr.bin
+ source = ocr_de-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_de.bin
+ source = ocr_el-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_el.bin
+ source = ocr_hu-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_hu.bin
+ source = ocr_id-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_id.bin
+ source = ocr_it-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_it.bin
+ source = ocr_ja-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_ja.bin
+ source = ocr_ko-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_ko.bin
+ source = ocr_lv-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_lv.bin
+ source = ocr_lt-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_lt.bin
+ source = ocr_no-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_no.bin
+ source = ocr_pl-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_pl.bin
+ source = ocr_pt-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_pt.bin
+ source = ocr_ro-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_ro.bin
+ source = ocr_ru-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_ru.bin
+ source = ocr_sr-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_sr.bin
+ source = ocr_sk-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_sk.bin
+ source = ocr_sl-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_sl.bin
+ source = ocr_es-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_es.bin
+ source = ocr_sv-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_sv.bin
+ source = ocr_th-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_th.bin
+ source = ocr_tl-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_tl.bin
+ source = ocr_tr-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_tr.bin
+ source = ocr_uk-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_uk.bin
+ source = ocr_vi-2022-03-30-19.bin::https://www.hamrick.com/files/ocr_vi.bin
sha256sums = SKIP
- source_i686 = vuescan-x32-2022-03-28-22.rpm::https://www.hamrick.com/files/vuex3297.rpm
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ source_i686 = vuescan-x32-2022-03-30-19.rpm::https://www.hamrick.com/files/vuex3297.rpm
sha256sums_i686 = SKIP
- source_x86_64 = vuescan-x64-2022-03-28-22.rpm::https://www.hamrick.com/files/vuex6497.rpm
+ source_x86_64 = vuescan-x64-2022-03-30-19.rpm::https://www.hamrick.com/files/vuex6497.rpm
sha256sums_x86_64 = SKIP
- source_aarch64 = vuescan-arm64-2022-03-28-22.rpm::https://www.hamrick.com/files/vuea6497.rpm
+ source_aarch64 = vuescan-arm64-2022-03-30-19.rpm::https://www.hamrick.com/files/vuea6497.rpm
sha256sums_aarch64 = SKIP
pkgname = vuescan-bin
diff --git a/PKGBUILD b/PKGBUILD
index b2b283d148cd..025a2f0a4338 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,94 @@
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
+# Contributor: wget
# Contributor: ninian <mcfadzean.org.uk ta linux>
pkgname=vuescan-bin
pkgver=9.7.82
-pkgrel=1
+pkgrel=2
pkgdesc="A powerful proprietary scanning tool developed by Hamrick Software"
arch=(i686 x86_64 armv6h aarch64)
url="https://www.hamrick.com/"
license=('custom')
depends=(gtk2 libsm libusb-compat)
options=(!strip) # required to accept registration details
-source=(vuescan-LICENSE.txt)
+source=(
+ "vuescan-LICENSE.txt"
+ "ocr_bg-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_bg.bin"
+ "ocr_ca-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_ca.bin"
+ "ocr_zh-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_zh.bin"
+ "ocr_tw-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_tw.bin"
+ "ocr_cs-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_cs.bin"
+ "ocr_da-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_da.bin"
+ "ocr_nl-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_nl.bin"
+ "ocr_fi-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_fi.bin"
+ "ocr_fr-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_fr.bin"
+ "ocr_de-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_de.bin"
+ "ocr_el-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_el.bin"
+ "ocr_hu-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_hu.bin"
+ "ocr_id-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_id.bin"
+ "ocr_it-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_it.bin"
+ "ocr_ja-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_ja.bin"
+ "ocr_ko-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_ko.bin"
+ "ocr_lv-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_lv.bin"
+ "ocr_lt-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_lt.bin"
+ "ocr_no-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_no.bin"
+ "ocr_pl-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_pl.bin"
+ "ocr_pt-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_pt.bin"
+ "ocr_ro-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_ro.bin"
+ "ocr_ru-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_ru.bin"
+ "ocr_sr-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_sr.bin"
+ "ocr_sk-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_sk.bin"
+ "ocr_sl-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_sl.bin"
+ "ocr_es-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_es.bin"
+ "ocr_sv-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_sv.bin"
+ "ocr_th-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_th.bin"
+ "ocr_tl-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_tl.bin"
+ "ocr_tr-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_tr.bin"
+ "ocr_uk-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_uk.bin"
+ "ocr_vi-$(date +%F-%H).bin::https://www.hamrick.com/files/ocr_vi.bin"
+)
source_i686=("vuescan-x32-$(date +%F-%H).rpm::https://www.hamrick.com/files/vuex3297.rpm")
source_x86_64=("vuescan-x64-$(date +%F-%H).rpm::https://www.hamrick.com/files/vuex6497.rpm")
source_aarch64=("vuescan-arm64-$(date +%F-%H).rpm::https://www.hamrick.com/files/vuea6497.rpm")
-sha256sums=('SKIP')
+# To recompute digests for ocr_* files using the same ordering as the Hamrick
+# website, use this:
+# for i in $(grep ocr_ PKGBUILD | grep http | cut -d '/' -f 5); do echo "'"$(sha256sum "$i" | cut -d ' ' -f 1)"'"; done
+# But we are skipping them
+sha256sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
sha256sums_i686=('SKIP')
sha256sums_x86_64=('SKIP')
sha256sums_aarch64=('SKIP')
@@ -26,5 +100,24 @@ pkgver() {
package() {
cp -a "${srcdir}"/usr "${pkgdir}"/
cp -a "${srcdir}"/lib "${pkgdir}"/usr
+
+ # ocr files need to be alongside the vuescan executable. Solution: move the
+ # vuescan executable to lib and symlink /usr/bin/vuescan to the executable
+ # now being in lib.
+ install -dm755 "${pkgdir}/usr/lib/vuescan"
+ mv "${pkgdir}"/usr/bin/* "${pkgdir}/usr/lib/vuescan"
+ ln -s /usr/lib/vuescan/vuescan "${pkgdir}/usr/bin/vuescan"
+
+
+ cd "${pkgdir}/usr/lib/vuescan"
+ # Copy the ocr_* files
+ cp "${srcdir}"/ocr_*$(date +%F-%H).bin ./
+ # Remove date
+ for i in ./ocr_*$(date +%F-%H).bin; do
+ # Remove date suffix in the filename like ocr_fr-2022-03-28-00.bin
+ mv "$i" "${i/%-$(date +%F-%H).bin/.bin}"
+ i="${i/%-$(date +%F-%H).bin/.bin}"
+ done
+
install -Dm644 "${srcdir}/vuescan-LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}