diff options
author | Rhys Perry | 2022-10-07 14:11:42 +0100 |
---|---|---|
committer | Rhys Perry | 2022-10-07 14:11:42 +0100 |
commit | 35c89c55c682d54dfb7440b0786e457a7bbfff11 (patch) | |
tree | 4accf5b934c6749192c0c416652ba3cb32600b9f | |
download | aur-35c89c55c682d54dfb7440b0786e457a7bbfff11.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 68 |
2 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5eaad9018abc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = engine-sim-git + pkgdesc = Combustion engine simulator that generates realistic audio. + pkgver = r235.1ca3c6b + pkgrel = 1 + url = https://github.com/ange-yaghi/engine-sim + arch = any + license = MIT + makedepends = cmake + makedepends = bison + makedepends = boost + makedepends = flex + makedepends = git + depends = sdl2 + depends = sdl2_image + provides = engine-sim + conflicts = engine-sim + source = git+https://github.com/bobsayshilol/engine-sim.git#branch=runtime-paths + source = git+https://github.com/ange-yaghi/csv-io.git + source = git+https://github.com/phire/delta-studio.git#branch=clang_linux + source = git+https://github.com/ange-yaghi/direct-to-video.git + source = git+https://github.com/ange-yaghi/piranha.git + source = git+https://github.com/ange-yaghi/simple-2d-constraint-solver.git + source = events.patch::https://github.com/phire/delta-studio/pull/2.patch + source = misc.patch::https://github.com/phire/delta-studio/pull/3.patch + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = engine-sim-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e452a2265af7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +# Maintainer: Rhys Perry <rhysperry111 AT gmail DOT com> +pkgname=engine-sim-git +provides=('engine-sim') +conflicts=('engine-sim') +pkgver=r235.1ca3c6b +pkgrel=1 +license=('MIT') +pkgdesc='Combustion engine simulator that generates realistic audio.' +makedepends=('cmake' 'bison' 'boost' 'flex' 'git') +depends=('sdl2' 'sdl2_image') +arch=('any') +url='https://github.com/ange-yaghi/engine-sim' +source=('git+https://github.com/bobsayshilol/engine-sim.git#branch=runtime-paths' + # Submodules + 'git+https://github.com/ange-yaghi/csv-io.git' + 'git+https://github.com/phire/delta-studio.git#branch=clang_linux' + 'git+https://github.com/ange-yaghi/direct-to-video.git' + 'git+https://github.com/ange-yaghi/piranha.git' + 'git+https://github.com/ange-yaghi/simple-2d-constraint-solver.git' + # Patches - misc still has some conflicts so we don't apply yet + 'events.patch::https://github.com/phire/delta-studio/pull/2.patch' + 'misc.patch::https://github.com/phire/delta-studio/pull/3.patch' + ) +md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') + +pkgver() { + cd engine-sim + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + # Submodule init + cd engine-sim + + git submodule init + for SUBMODULE in 'csv-io' 'delta-studio' 'direct-to-video' 'piranha' 'simple-2d-constraint-solver'; do + git config "submodule.externals/vendor/dependencies/submodules/${SUBMODULE}.url" "${srcdir}/${SUBMODULE}" + done + git submodule update + + cd dependencies/submodules/delta-studio + git am "${srcdir}/events.patch" +} + +build() { + cd engine-sim + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -DENGINE_SIM_DATA_ROOT=/usr/share/engine-sim .. + cmake --build . --target engine-sim-app +} + +package() { + cd engine-sim + # Install license to usr/share + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/wava/LICENSE" + # Install binary to usr/bin + install -Dm755 build/engine-sim-app "${pkgdir}/usr/bin/engine-sim" + + # Install data to usr/share + mkdir -p "${pkgdir}/usr/share/engine-sim/" + cp -r assets es "${pkgdir}/usr/share/engine-sim/" + mkdir -p "${pkgdir}/usr/share/engine-sim/dependencies/submodules/delta-studio/engines/basic/" + cp -r dependencies/submodules/delta-studio/engines/basic/fonts dependencies/submodules/delta-studio/engines/basic/shaders "${pkgdir}/usr/share/engine-sim/dependencies/submodules/delta-studio/engines/basic/" +} |