Advertisement
Guest User

Untitled

a guest
Aug 16th, 2024
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. # Maintainer: brent s. <bts[at]square-r00t[dot]net>
  2. validpgpkeys=('748231EBCBD808A14F5E85D28C004C2F93481F6B')
  3. # Bug reports can be filed at https://bugs.square-r00t.net/index.php?project=3
  4. # News updates for packages can be followed at https://devblog.square-r00t.net
  5. pkgname=q2pro-git
  6. pkgver=r3411
  7. pkgrel=1
  8. pkgdesc="An enhanced Quake 2 client and server (Git/source build)"
  9. arch=( 'i686' 'x86_64' )
  10. url="http://skuller.net/q2pro/"
  11. license=( 'GPL2' )
  12. depends=( 'sdl' 'zlib' )
  13. optdepends=('quake2: additional mods (symlink to ~/.q2pro)')
  14. makedepends=('libpng12' 'libjpeg6-turbo' 'curl' 'openal')
  15. _pkgname=q2pro
  16. conflicts=('q2pro')
  17. install=q2pro.install
  18. changelog=
  19. noextract=()
  20. source=("q2pro::git+https://github.com/AndreyNazarov/q2pro.git")
  21. # see https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git_Submodules if you require git submodules
  22. sha512sums=('SKIP')
  23. pkgver() {
  24. cd "${srcdir}/${_pkgname}"
  25. # no tags, so number of revisions e.g. r1142.a17a017
  26. #printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  27. printf "r%s" "$(git rev-list --count HEAD)"
  28. ## most recent annotated tag e.g. 2.0.r6.ga17a017
  29. #git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  30. ## most recent un-annotated tag e.g. 0.71.r115.gd95ee07
  31. #git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  32. ## or:
  33. ##git describe --long --tags | sed 's/-/.r/;s/-/./'
  34. ## project uses tags with prefix. e.g. v...
  35. #git describe --long | sed 's/^foo-//;s/\([^-]*-g\)/r\1/;s/-/./g'
  36. ## both with fallback, e.g. 0.9.9.r27.g2b039da with tags, else r1581.2b039da
  37. #( set -o pipefail
  38. # git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
  39. # printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  40. #)
  41. }
  42. build() {
  43. cd "${srcdir}/${_pkgname}"
  44. meson setup builddir
  45. meson configure -Dprefix=/usr builddir
  46. meson compile -C builddir
  47.  
  48. }
  49. package() {
  50. cd "${srcdir}/${_pkgname}/"
  51. install -D -m 0644 ${srcdir}/${_pkgname}/README.md ${pkgdir}/usr/share/doc/${_pkgname}/README.md
  52. install -D -m 0644 ${srcdir}/${_pkgname}/INSTALL.md ${pkgdir}/usr/share/doc/${_pkgname}/INSTALL.md
  53. cp -a ${srcdir}/${_pkgname}/doc/* ${pkgdir}/usr/share/doc/${_pkgname}/.
  54. install -d -m 0755 ${pkgdir}/usr/share/${_pkgname}/baseq2
  55. install -d -m 0755 ${pkgdir}/usr/lib/${_pkgname}/baseq2
  56. install -d -m 0755 ${pkgdir}/usr/bin
  57. # r1093 doesn't seem to honor manpage installation
  58. install -d -m 0755 ${pkgdir}/usr/share/man/man6
  59. gzip -c ${srcdir}/${_pkgname}/man/q2pro.6.txt > ${pkgdir}/usr/share/man/man6/q2pro.6.gz
  60. gzip -c ${srcdir}/${_pkgname}/man/q2proded.6.txt > ${pkgdir}/usr/share/man/man6/q2proded.6.gz
  61. install -D -m 0644 ${srcdir}/${_pkgname}/src/client/ui/q2pro.menu ${pkgdir}/usr/share/${_pkgname}/baseq2/q2pro.menu
  62. cp -a ${srcdir}/${_pkgname}/builddir/game*.so ${pkgdir}/usr/lib/${_pkgname}/baseq2/.
  63. cp -a ${srcdir}/${_pkgname}/builddir/${_pkgname}{,ded} ${pkgdir}/usr/bin/.
  64. install -D -m 0644 ${srcdir}/${_pkgname}/src/unix/res/q2pro.desktop ${pkgdir}/usr/share/applications/q2pro.desktop
  65. install -D -m 0644 ${srcdir}/${_pkgname}/src/unix/res/q2pro.xpm ${pkgdir}/usr/share/pixmaps/q2pro.xpm
  66. }
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement