You are not logged in.
Cortex Command Community Project is a AGPL3 game based on the commercial game Cortex Command.
I've already made a working pkgbuild but I don't really have the time to maintain it myself and it could probably do with cleaning up anyways, since I had some significant problems getting it to work.
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 "$@"
Last edited by Chryseus8 (2022-01-10 17:05:12)
Offline
Please remove all empty files (like backup=() ) to improve readability.
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 .
Last edited by Lone_Wolf (2022-01-10 12:59:19)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
The pkgdesc variable shouldn't contain the name of the software.
https://wiki.archlinux.org/title/PKGBUILD#pkgdesc
Offline
Thanks for the suggestions, I cleaned up the PKGBUILD, this appears to all work correctly however I suspect there may be a bug in the game which prevents it from running unless all the files are in one place.
It constantly spawns a new process and fails to start, I've reported this so unless it's my own fault it should be fixed soon, in the meantime my previous mess will get it running at least.
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"
}
Offline
It looks like it will be very difficult to include in the AUR so I'm marking this as solved.
While the source was released under the AGPL3, the data is very much non-free, there is also the added complication of it bundling fmod.
Offline