PKGBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Maintainer: Luke Shumaker <lukeshu@parabola.nu>
  2. pkgname=dbscripts
  3. pkgver=20181010
  4. pkgdesc='Server-side programs for Parabola Pacman repositories'
  5. url='https://git.parabola.nu/packages/dbscripts.git/'
  6. license=('GPL')
  7. backup=(
  8. etc/$pkgname/config
  9. etc/$pkgname/config.local
  10. etc/$pkgname/config.local.archlinux32
  11. etc/$pkgname/config.local.archlinuxarm
  12. etc/$pkgname/config.local.community
  13. etc/$pkgname/config.local.import-ourarches
  14. etc/$pkgname/config.local.packages
  15. etc/$pkgname/config.local.parabola
  16. etc/$pkgname/db-cleanup.conf
  17. etc/$pkgname/db-import-any.conf
  18. etc/$pkgname/db-import-archlinuxarm.conf
  19. etc/$pkgname/db-import-keyring.conf
  20. etc/$pkgname/torrent.conf
  21. )
  22. pkgrel=1
  23. arch=('any')
  24. depends=('librelib>=20180428' libretools rsync expac mktorrent)
  25. source=("https://repo.parabola.nu/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig})
  26. sha256sums=('bbc49a01680326d865e6a5b511e414d9dd8b2b77528ae3606fce772ffcc872da'
  27. 'SKIP')
  28. #validpgpkeys=('99195DD3BB6FE10A2F36ED8445698744D4FFBFC9') # Luke Shumaker
  29. validpgpkeys=('1B8C5E87702444D3D825CC8086ED62396D5DBA58') # Omar Vega Ramos
  30. _gitver='commit=3b4edf8ed6d60f4257a7415eda6bcbedc30221c9'
  31. mksource=("$pkgname-$pkgver::git://git.parabola.nu/packages/dbscripts.git/#$_gitver")
  32. mkmd5sums=('SKIP')
  33. package() {
  34. mkdir -p "$pkgdir"/opt
  35. cp -a "$srcdir/$pkgname-$pkgver" "$pkgdir/opt/$pkgname"
  36. mkdir -p "$pkgdir"/usr/bin
  37. find "$pkgdir/opt/$pkgname" -maxdepth 1 -type f -executable -not -name 'config-*' -exec ln -sr {} "$pkgdir"/usr/bin \;
  38. mkdir -p "$pkgdir"/etc/$pkgname
  39. local file
  40. for file in "${backup[@]}"; do
  41. mv -T "$pkgdir/opt/$pkgname/${file##*/}" "$pkgdir/$file"
  42. if [[ ${file##*/} != config.* ]]; then
  43. ln -sr "$pkgdir/$file" "$pkgdir/opt/$pkgname"
  44. fi
  45. done
  46. mkdir -p "$pkgdir"/usr/lib/systemd
  47. mv -T "$pkgdir/opt/$pkgname/systemd" "$pkgdir/usr/lib/systemd/system"
  48. mkdir -p "$pkgdir"/usr/share/doc/$pkgname
  49. ln -sr "$pkgdir"/opt/$pkgname/README.md "$pkgdir"/usr/share/doc/$pkgname
  50. }