pkgname=cortex-command-community-git
pkgver=v0.1.0.pre2.r2371.g0298cb78
_gitname=Cortex-Command-Community-Project-Source
pkgrel=1
pkgdesc="Action 2D side-scrolling game with advanced physics"
arch=('x86_64')
url="https://cortex-command-community.github.io/"
license=('AGPL3')
depends=('allegro4' 'libpng' 'boost' 'flac' 'luajit' 'minizip' 'lz4' 'libx11')
makedepends=('meson')
source=('git+https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source.git'
'git+https://github.com/cortex-command-community/Cortex-Command-Community-Project-Data.git')
md5sums=(SKIP SKIP)
pkgver() {
cd "$_gitname"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$_gitname"
arch-meson build
ninja -C build
}
package() {
cd "$_gitname"
meson install -C build --destdir "$pkgdir"
}
You can probably make the package() function a bit simpler, see https://wiki.archlinux.org/title/Meson_ … guidelines .
mkdir -p "$pkgdir/usr/local/bin"
ln -s "/opt/CortexCommand/Cortex.sh" "$pkgdir/usr/local/bin/CortexCommand"
/usr/local is intended for (local) system administrators and should never be touched by packages.
just create the link in /usr/bin .
PKGBUILD
pkgname=cortex-command-community-git
pkgver=v0.1.0.pre2.r2371.g0298cb78
_gitname=Cortex-Command-Community-Project-Source
_data=Cortex-Command-Community-Project-Data
pkgrel=1
pkgdesc="Action 2D side-scrolling game with advanced physics"
arch=('x86_64')
url="https://cortex-command-community.github.io/"
license=('AGPL3')
depends=('allegro4' 'libpng' 'boost' 'flac' 'luajit' 'minizip' 'lz4' 'libx11')
makedepends=('meson')
source=('git+https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source.git'
'git+https://github.com/cortex-command-community/Cortex-Command-Community-Project-Data.git')
md5sums=(SKIP SKIP)
pkgver() {
cd "$_gitname"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$_gitname"
meson build
ninja -C build
}
package() {
cd "$_gitname"
mkdir -p "$pkgdir/opt/CortexCommand"
mkdir -p "$pkgdir/usr/bin"
cp build/CortexCommand "$pkgdir/opt/CortexCommand/"
cp external/lib/linux/x86_64/*.so* "$pkgdir/opt/CortexCommand"
cd "../$_data"
cp -r * "$pkgdir/opt/CortexCommand/"
mkdir "$pkgdir/opt/CortexCommand/_ScreenShots"
find "$pkgdir/opt/CortexCommand" -type d -exec chmod 777 {} +
chmod 777 "$pkgdir/opt/CortexCommand/CortexCommand"
cp "$pkgdir/../../Cortex.sh" "$pkgdir/opt/CortexCommand/"
ln -s "/opt/CortexCommand/Cortex.sh" "$pkgdir/usr/bin/CortexCommand"
}
Cortex.sh
#!/bin/sh
cd /opt/CortexCommand
exec ./CortexCommand "$@"