PKGBUILD 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. pkgname=wm-scripts-intothegnu-git
  2. pkgver=1.0.r0.g8ae32f5
  3. pkgrel=1
  4. license=(GPL)
  5. arch=('any')
  6. groups=('intothegnu-config')
  7. depends=('dunst')
  8. optdepends=('pulseaudio: volume and mute notification' 'pipewire-pulse: volume and mute notification' 'imagemagick: screenshot' 'scrot: screenshot' 'newsboat: newsboat script' 'xbacklight: backlight script' 'ffmpeg: record script')
  9. makedepends=(git)
  10. source=(git+https://notabug.org/BezierQuadratic/wm-scripts.git)
  11. sha256sums=('SKIP')
  12. pkgver(){
  13. cd wm-scripts
  14. git describe --long --tags | sed 's/-/.r/;s/-/./'
  15. }
  16. package(){
  17. cd $srcdir/wm-scripts
  18. mkdir -p $pkgdir/usr/bin
  19. mkdir -p $pkgdir/usr/share/licenses/wm-scripts-intothegnu
  20. cp LICENSE $pkgdir/usr/share/licenses/wm-scripts-intothegnu
  21. sourcefiles="$(find . -iname '*.sh')"
  22. destfiles="${sourcefiles//.sh/}"
  23. current_line=1
  24. tot_lines="$(echo "$sourcefiles" | wc -l)"
  25. while [ "$current_line" -le "$tot_lines" ]; do
  26. install -m 755 "$(echo "$sourcefiles" | sed -n "$current_line"p)" $pkgdir/usr/bin/"$(echo "$destfiles" | sed -n "$current_line"p)"
  27. current_line=$((current_line + 1))
  28. done
  29. }