Advertisement
Guest User

PKGBUILD

a guest
Jan 25th, 2024
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.48 KB | Software | 0 0
  1. # Maintainer: Wai <waicool20@gmail.com>
  2. pkgname=huiontablet
  3. pkgver=v15.0.0.151
  4. pkgrel=1
  5. pkgdesc="Official Huion tablet drivers"
  6. arch=('x86_64')
  7. url="https://www.huion.com/download/"
  8. license=('unknown')
  9. source=("https://driverdl.huion.com/driver/GT1902_GT2701/V2/HuionTablet_LinuxDriver_v15.0.0.151.x86_64.tar.xz")
  10. md5sums=("aabd72ec1159b3695609dd89b1f75f66")
  11.  
  12. prepare() {
  13.   cd "${srcdir}"
  14.  
  15.   # Modify install script with our dirs
  16.   sed -E -i "s|(sysRuleDir=).*|\1$pkgdir/usr/lib/udev/rules.d|" install.sh
  17.   sed -E -i "s|(sysAppDir=).*|\1$pkgdir/usr/lib/|" install.sh
  18.   sed -E -i "s|(sysDesktopDir=).*|\1$pkgdir/usr/share/applications|" install.sh
  19.   sed -E -i "s|(sysAppIconDir=).*|\1$pkgdir/usr/share/icons|" install.sh
  20.   sed -E -i "s|(sysAutoStartDir=).*|\1$pkgdir/etc/xdg/autostart|" install.sh
  21.  
  22.   sed -E -i "s|killall.*||" install.sh
  23.   sed -E -i "s|sudo ||" install.sh
  24.   sed -E -i "s|/usr/lib/huiontablet/res|$pkgdir\0|" install.sh
  25.  
  26.   # Remove stuff after this line
  27.   sed -E -i "/#Copy config files/Q" install.sh
  28. }
  29.  
  30. package() {
  31.   # Fix for "Can't translate pathname" error in CJK language environment
  32.   export LC_ALL=C.UTF-8
  33.  
  34.   cd "${srcdir}"
  35.  
  36.   # Make directories
  37.   grep "sys.*Dir=" install.sh | sed -E 's/.*=(.*)/\1/' | tr -d '"' | xargs mkdir -p
  38.  
  39.   # Invoke install script
  40.   sh install.sh
  41.  
  42.   # Set the permission of "/usr/lib/huiontablet" folder to 777
  43.   # Fix for not being able to change button or area mapping
  44.   chmod -R +0777 $pkgdir/usr/lib/huiontablet
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement