lesebas

PKGBUILD Scagearmp2 4.30

Mar 5th, 2022 (edited)
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.51 KB | None | 0 0
  1. # Maintainer: Oliver Gatti
  2. # Contributor: Andrew Titmuss <andrew@coffeetocode.me>
  3.  
  4. pkgname=scangearmp2
  5. pkgver=4.30
  6. pkgrel=1
  7. pkgdesc="Canon ScanGear MP v2 scanner driver."
  8. arch=('i686' 'x86_64')
  9. url="https://www.canon.co.uk"
  10. license=('GPL' 'custom:canon')
  11. depends=('gtk2' 'libusb')
  12.  
  13. provides=('scangearmp2')
  14.  
  15. source=("https://gdlp01.c-wss.com/gds/2/0100011322/01/scangearmp2-source-4.30-1.tar.gz" \
  16.     scangearmp2.desktop)
  17. sha256sums=('ae337238379541d8f99f09bf24e82d291b8141e5a7758d46c0002a9becb828b8'
  18.             'd9b449d6c78c92f296acef85209b30c7d80b8bac692f135d071730ef0051d64b')
  19.  
  20. [[ "$CARCH" == "x86_64" ]] && _arch="64" || _arch="32"
  21.  
  22. prepare() {
  23.     patch -p1 < ../patch-usb
  24.     cd "$pkgname-source-$pkgver-$pkgrel"
  25. }
  26.  
  27. build() {
  28.     cd "$pkgname-source-$pkgver-$pkgrel"
  29.  
  30.     pushd "scangearmp2"
  31.     ./autogen.sh --prefix=/usr \
  32.              --enable-libpath=/usr/lib \
  33.              LDFLAGS="-L../../com/libs_bin$_arch"
  34.     make
  35.     popd
  36. }
  37.  
  38. check() {
  39.     cd "$pkgname-source-$pkgver-$pkgrel"
  40.  
  41.     pushd "scangearmp2"
  42.     make check
  43.     popd
  44. }
  45.  
  46. package() {
  47.     mkdir -p "$pkgdir/usr/share/applications"
  48.     install -m755 "scangearmp2.desktop" "$pkgdir/usr/share/applications"
  49.  
  50.     cd "$pkgname-source-$pkgver-$pkgrel"
  51.  
  52.     mkdir -p "$pkgdir/usr/lib/bjlib"
  53.  
  54.     install -m644 "com/ini/canon_mfp2_net.ini" "$pkgdir/usr/lib/bjlib"
  55.  
  56.     install -sm755 "com/libs_bin$_arch/libcncpmslld2.so.3.0.0" "$pkgdir/usr/lib"
  57.     ln -s "/usr/lib/libcncpmslld2.so.3.0.0" "$pkgdir/usr/lib/libcncpmslld2.so"
  58.  
  59.     install -sm755 "com/libs_bin$_arch/libcncpnet2.so.1.2.5" "$pkgdir/usr/lib"
  60.     ln -s "/usr/lib/libcncpnet2.so.1.2.5" "$pkgdir/usr/lib/libcncpnet2.so"
  61.  
  62.     install -sm755 "com/libs_bin$_arch/libcncpnet20.so.1.0.0" "$pkgdir/usr/lib"
  63.     ln -s "/usr/lib/libcncpnet20.so.1.0.0" "$pkgdir/usr/lib/libcncpnet20.so"
  64.  
  65.     install -sm755 "com/libs_bin$_arch/libcncpnet30.so.1.0.0" "$pkgdir/usr/lib"
  66.     ln -s "/usr/lib/libcncpnet30.so.1.0.0" "$pkgdir/usr/lib/libcncpnet30.so"
  67.  
  68.     mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
  69.  
  70.     install -m644 "doc/LICENSE-scangearmp-${pkgver}EN.txt" "$pkgdir/usr/share/licenses/$pkgname"
  71.     install -m644 "doc/LICENSE-scangearmp-${pkgver}FR.txt" "$pkgdir/usr/share/licenses/$pkgname"
  72.     install -m644 "doc/LICENSE-scangearmp-${pkgver}JP.txt" "$pkgdir/usr/share/licenses/$pkgname"
  73.     install -m644 "doc/LICENSE-scangearmp-${pkgver}SC.txt" "$pkgdir/usr/share/licenses/$pkgname"
  74.  
  75.     mkdir -p "$pkgdir/etc/udev/rules.d"
  76.     install -m644 "scangearmp2/etc/80-canon_mfp2.rules" "$pkgdir/etc/udev/rules.d"
  77.  
  78.     pushd "scangearmp2"
  79.     make DESTDIR="$pkgdir/" install
  80.     popd
  81. }
  82.  
  83.  
Add Comment
Please, Sign In to add comment