Advertisement
xiota

PKGBUILD - libresprite-git

Sep 11th, 2023 (edited)
153
0
129 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.39 KB | Source Code | 0 0
  1. # Maintainer: xiota / aur.chaotic.cx
  2.  
  3. _pkgname="libresprite"
  4. pkgname="$_pkgname-git"
  5. pkgver=1.0.r171.gd3316387f
  6. pkgrel=1
  7. pkgdesc='Animated sprite editor and pixel art tool'
  8. arch=('x86_64' 'i686')
  9. url='https://github.com/LibreSprite/LibreSprite'
  10. license=('GPL')
  11. depends=(
  12.   'curl'
  13.   'freetype2'
  14.   'giflib'
  15.   'libjpeg-turbo'
  16.   'libpng'
  17.   'libwebp'
  18.   'lua'
  19.   'pixman'
  20.   'sdl2'
  21.   'sdl2_image'
  22.   'tinyxml2'
  23.   'zlib'
  24. )
  25. makedepends=(
  26.   'cmake'
  27.   'git'
  28.   'gtest'
  29. )
  30. optdepends=(
  31.   'chaotic-interfere: chaotic-aur interference tracker'
  32. )
  33.  
  34. _pkgsrc="$_pkgname"
  35. source=(
  36.   "$_pkgsrc"::"git+https://github.com/LibreSprite/LibreSprite.git"
  37.   "libresprite.desktop"
  38.  
  39.   'clip'::'git+https://github.com/aseprite/clip.git'
  40.   'duktape'::'git+https://github.com/libresprite/duktape.git'
  41.   'flic'::'git+https://github.com/aseprite/flic.git'
  42.   'observable'::'git+https://github.com/dacap/observable.git'
  43.   'simpleini'::'git+https://github.com/aseprite/simpleini.git'
  44.   'undo'::'git+https://github.com/aseprite/undo.git'
  45. )
  46.  
  47. sha256sums=(
  48.   'SKIP'
  49.   'd246c14dc6c0d71d02aba337c15c23611c6e982687300c86167f37b9926af7ba'
  50.  
  51.   'SKIP'
  52.   'SKIP'
  53.   'SKIP'
  54.   'SKIP'
  55.   'SKIP'
  56.   'SKIP'
  57. )
  58.  
  59. provides=(
  60.   libresprite
  61. )
  62. conflicts=(
  63.   aseprite
  64.   libresprite
  65. )
  66.  
  67. pkgver() {
  68.   cd "$_pkgsrc"
  69.   git describe --long --tags --exclude='*[a-zA-Z][a-zA-Z]*' \
  70.     | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
  71. }
  72.  
  73. prepare() {
  74.   # submodules for LibreSprite
  75.   cd "$_pkgsrc"
  76.   local -A _submodules=(
  77.     ['clip']='src/clip'
  78.     ['duktape']='third_party/duktape'
  79.     ['flic']='src/flic'
  80.     ['observable']='src/observable'
  81.     ['simpleini']='third_party/simpleini'
  82.     ['undo']='src/undo'
  83.   )
  84.   for key in ${!_submodules[@]} ; do
  85.     git submodule init "${_submodules[${key}]}"
  86.     git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}"
  87.     git -c protocol.file.allow=always submodule update "${_submodules[${key}]}"
  88.   done
  89. }
  90.  
  91. build() {
  92.   local _cmake_options=(
  93.     -B build
  94.     -S "$_pkgsrc"
  95.  
  96.     -DCMAKE_INSTALL_PREFIX="/usr"
  97.     -Wno-dev
  98.   )
  99.  
  100.   cmake "${_cmake_options[@]}"
  101.   cmake --build build
  102. }
  103.  
  104.  
  105. package() {
  106.   DESTDIR="${pkgdir:?}" cmake --install build
  107.  
  108.   install -Dm644 "$srcdir/libresprite.desktop" \
  109.     -t "${pkgdir:?}/usr/share/applications"
  110.  
  111.   install -Dm644 "$pkgdir/usr/share/libresprite/data/icons/ase64.png" \
  112.     "${pkgdir:?}/usr/share/pixmaps/libresprite.png"
  113. }
  114.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement