summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD91
-rw-r--r--pioneer.desktop9
4 files changed, 78 insertions, 62 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 765ddab77ac2..ff6d7a2606e9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,27 +1,28 @@
-# Generated by mksrcinfo v8
-# Mon Feb 5 11:39:42 UTC 2018
pkgbase = pioneer
pkgdesc = A game of lonely space adventure
- pkgver = 20180203
- pkgrel = 1
+ pkgver = 20230203
+ pkgrel = 2
url = https://github.com/pioneerspacesim/pioneer
- arch = i686
arch = x86_64
- license = GPL
+ license = GPL3
+ makedepends = cmake
makedepends = naturaldocs
- depends = libsigc++
- depends = sdl2_image
- depends = freetype2
- depends = libvorbis
+ makedepends = ninja
depends = assimp
+ depends = freetype2
+ depends = glew
depends = hicolor-icon-theme
+ depends = libsigc++
+ depends = libvorbis
+ depends = lua52
+ depends = mesa
+ depends = sdl2_image
provides = pioneer
conflicts = pioneer-bin
conflicts = pioneer-git
- source = pioneer-20180203.tar.gz::http://github.com/pioneerspacesim/pioneer/archive/20180203.tar.gz
- source = pioneer.desktop
- sha256sums = 19aa89e8ec0221b937b9279e0d4897b3016e0ce80858d03600d3e80cd7daa907
- sha256sums = 31cc3f86dbab4dea44fc61312cbba30dc6d267a3d844bbb866fd2156c29032ef
+ source = pioneer-20230203.tar.gz::https://github.com/pioneerspacesim/pioneer/archive/20230203.tar.gz
+ source = fix_path_to_lua_h.patch::https://github.com/pioneerspacesim/pioneer/pull/5526/commits/058bb753ccddee110ed2fb76908cb25b5a656635.patch
+ sha256sums = 80eea94e0f7e4d8e6a0c4629bdfb89201f82aae2f59ee7a1f7a487eeeccf27c7
+ sha256sums = dbb08eccb356c7b00122487b7a49df4948b82256c52b9cc36c5122a057c0635e
pkgname = pioneer
-
diff --git a/.gitignore b/.gitignore
index 62f07109f0bb..976f890d0ea7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
-pkg
-src
-*.tar.gz
-*.tar.xz
-*.zip
+*~
+*.log
+pioneer-*.tar.*
+fix_path_to_lua_h.patch
diff --git a/PKGBUILD b/PKGBUILD
index 4cdb7b972981..05fa590c2d87 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,65 @@
-# Maintainer: Tarn Burton <twburton at gmail dot com>
-pkgname='pioneer'
-pkgver=20180203
-pkgrel=1
+# Maintainer: Stephan Springer <buzo+arch@Lini.de>
+# Contributor: Darren Wu <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
+# Contributor: Tarn Burton <twburton at gmail dot com>
+
+pkgname=pioneer
+pkgver=20230203
+pkgrel=2
pkgdesc="A game of lonely space adventure"
-arch=('i686' 'x86_64')
+arch=('x86_64')
url="https://github.com/pioneerspacesim/pioneer"
-license=('GPL')
+license=('GPL3')
provides=('pioneer')
conflicts=('pioneer-bin' 'pioneer-git')
-depends=('libsigc++' 'sdl2_image' 'freetype2' 'libvorbis' 'assimp' 'hicolor-icon-theme')
-makedepends=('naturaldocs')
-source=("$pkgname-$pkgver.tar.gz::http://github.com/pioneerspacesim/pioneer/archive/$pkgver.tar.gz" 'pioneer.desktop')
-sha256sums=('19aa89e8ec0221b937b9279e0d4897b3016e0ce80858d03600d3e80cd7daa907'
- '31cc3f86dbab4dea44fc61312cbba30dc6d267a3d844bbb866fd2156c29032ef')
-
-build() {
- cd "$pkgname-$pkgver"
- export PIONEER_DATA_DIR=/usr/share/pioneer
- ./bootstrap
- ./configure CXXFLAGS='-fPIC' --prefix=/usr
- make
- make codedoc
+depends=(
+ 'assimp'
+ 'freetype2'
+ 'glew'
+ 'hicolor-icon-theme'
+ 'libsigc++'
+ 'libvorbis'
+ 'lua52'
+ 'mesa'
+ 'sdl2_image'
+)
+makedepends=(cmake naturaldocs ninja)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/pioneerspacesim/pioneer/archive/$pkgver.tar.gz"
+ fix_path_to_lua_h.patch::https://github.com/pioneerspacesim/pioneer/pull/5526/commits/058bb753ccddee110ed2fb76908cb25b5a656635.patch)
+sha256sums=('80eea94e0f7e4d8e6a0c4629bdfb89201f82aae2f59ee7a1f7a487eeeccf27c7'
+ 'dbb08eccb356c7b00122487b7a49df4948b82256c52b9cc36c5122a057c0635e')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ # fix version string, don't use the build date
+ sed -i 's|PROJECT_VERSION "%Y%m%d"|PROJECT_VERSION "'$pkgver'"|' CMakeLists.txt
+ # https://github.com/pioneerspacesim/pioneer/issues/5525
+ patch -p1 -i "$srcdir/fix_path_to_lua_h.patch"
+}
+
+build()
+{
+ cmake -S "$pkgname-$pkgver" -B build -G Ninja \
+ -D CMAKE_INSTALL_PREFIX:PATH=/usr \
+ -D PIONEER_DATA_DIR:PATH=/usr/share/pioneer/ \
+ -D USE_SYSTEM_LIBGLEW:BOOL=ON \
+ -D USE_SYSTEM_LIBLUA:BOOL=ON \
+ -D CMAKE_EXPORT_COMPILE_COMMANDS=1 \
+ -Wno-dev
+
+ cmake --build build --target all build-data codedoc
}
-package() {
- cd "$pkgname-$pkgver"
- export PIONEER_DATA_DIR=/usr/share/pioneer
- make DESTDIR="$pkgdir" install
- install -Dm644 "$srcdir/pioneer.desktop" "$pkgdir/usr/share/applications/pioneer.desktop"
- for icon in application-icon/pngs/*
- do
- if [[ $icon =~ pioneer-([0-9]+x[0-9]+).png ]]; then
- install -Dm644 $icon "$pkgdir/usr/share/icons/hicolor/${BASH_REMATCH[1]}/apps/pioneer.png"
- fi
- done
- install -Dm644 "application-icon/badge-enlarged-text.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/pioneer.svg"
- mkdir -p "$pkgdir/usr/share/doc/pioneer"
- cp -R codedoc/* "$pkgdir/usr/share/doc/pioneer"
+package()
+{
+ DESTDIR="$pkgdir" cmake --install build
+
+ # appdata
+ mv "$pkgdir"/usr/share/{appdata,metainfo}
+
+ # remove empty directories
+ rmdir "$pkgdir"/usr/share/pioneer/music/core/{{un,}docked,near-planet}
+
+ # codedoc
+ mkdir --parents "$pkgdir/usr/share/doc"
+ cp --recursive "$pkgname-$pkgver"/codedoc "$pkgdir"/usr/share/doc/pioneer
}
diff --git a/pioneer.desktop b/pioneer.desktop
deleted file mode 100644
index 7c2d80e65822..000000000000
--- a/pioneer.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=Pioneer
-Comment=A freeform single player space adventure in the spirit of Frontier: Elite II.
-Path=/usr/share/pioneer/
-Exec=pioneer
-Icon=pioneer
-Terminal=false
-Type=Application
-Categories=Game;StrategyGame;