PKGBUILD 780 B

12345678910111213141516171819202122232425262728293031
  1. # Maintainer: Alexander Rosenberg <zanderpkg at pm dot me>
  2. pkgname='license-tool'
  3. pkgver=7
  4. pkgrel=1
  5. pkgdesc='A simple tool for creating LICENSE files'
  6. url='https://git.zander.im/Zander671/license-tool'
  7. arch=('x86_64')
  8. license=('GPL3')
  9. depends=('rust')
  10. source=('git+https://git.zander.im/Zander671/license-tool.git')
  11. sha256sums=('SKIP')
  12. pkgver(){
  13. cd "$pkgname"
  14. git rev-list --count HEAD
  15. }
  16. build() {
  17. cd "$pkgname"
  18. export GLOBAL_DATA_PATH='/usr/share/license-tool/'
  19. cargo build --release
  20. }
  21. package() {
  22. install -Dt "$pkgdir/usr/bin/" "$pkgname/target/release/license-tool"
  23. install -m 0644 -Dt "$pkgdir/usr/share/zsh/site-functions" "$pkgname/_license-tool"
  24. mkdir -p "$pkgdir/usr/share/"
  25. cp -r "$pkgname/licenses" "$pkgdir/usr/share/license-tool"
  26. }