Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: xiota / aur.chaotic.cx
- _pkgname="libresprite"
- pkgname="$_pkgname-git"
- pkgver=1.0.r171.gd3316387f
- pkgrel=1
- pkgdesc='Animated sprite editor and pixel art tool'
- arch=('x86_64' 'i686')
- url='https://github.com/LibreSprite/LibreSprite'
- license=('GPL')
- depends=(
- 'curl'
- 'freetype2'
- 'giflib'
- 'libjpeg-turbo'
- 'libpng'
- 'libwebp'
- 'lua'
- 'pixman'
- 'sdl2'
- 'sdl2_image'
- 'tinyxml2'
- 'zlib'
- )
- makedepends=(
- 'cmake'
- 'git'
- 'gtest'
- )
- optdepends=(
- 'chaotic-interfere: chaotic-aur interference tracker'
- )
- _pkgsrc="$_pkgname"
- source=(
- "$_pkgsrc"::"git+https://github.com/LibreSprite/LibreSprite.git"
- "libresprite.desktop"
- 'clip'::'git+https://github.com/aseprite/clip.git'
- 'duktape'::'git+https://github.com/libresprite/duktape.git'
- 'flic'::'git+https://github.com/aseprite/flic.git'
- 'observable'::'git+https://github.com/dacap/observable.git'
- 'simpleini'::'git+https://github.com/aseprite/simpleini.git'
- 'undo'::'git+https://github.com/aseprite/undo.git'
- )
- sha256sums=(
- 'SKIP'
- 'd246c14dc6c0d71d02aba337c15c23611c6e982687300c86167f37b9926af7ba'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- )
- provides=(
- libresprite
- )
- conflicts=(
- aseprite
- libresprite
- )
- pkgver() {
- cd "$_pkgsrc"
- git describe --long --tags --exclude='*[a-zA-Z][a-zA-Z]*' \
- | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
- }
- prepare() {
- # submodules for LibreSprite
- cd "$_pkgsrc"
- local -A _submodules=(
- ['clip']='src/clip'
- ['duktape']='third_party/duktape'
- ['flic']='src/flic'
- ['observable']='src/observable'
- ['simpleini']='third_party/simpleini'
- ['undo']='src/undo'
- )
- for key in ${!_submodules[@]} ; do
- git submodule init "${_submodules[${key}]}"
- git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}"
- git -c protocol.file.allow=always submodule update "${_submodules[${key}]}"
- done
- }
- build() {
- local _cmake_options=(
- -B build
- -S "$_pkgsrc"
- -DCMAKE_INSTALL_PREFIX="/usr"
- -Wno-dev
- )
- cmake "${_cmake_options[@]}"
- cmake --build build
- }
- package() {
- DESTDIR="${pkgdir:?}" cmake --install build
- install -Dm644 "$srcdir/libresprite.desktop" \
- -t "${pkgdir:?}/usr/share/applications"
- install -Dm644 "$pkgdir/usr/share/libresprite/data/icons/ase64.png" \
- "${pkgdir:?}/usr/share/pixmaps/libresprite.png"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement