Package Details: starruler2-git r27.ba99a9a-1

Git Clone URL: (read-only, click to copy)
Package Base: starruler2-git
Description: 4X Space Strategy game Star Ruler 2's open source distribution.
Upstream URL:
Licenses: MIT
Provides: starruler2
Submitter: ysblokje
Maintainer: quenyen
Last Packager: ysblokje
Votes: 12
Popularity: 0.101733
First Submitted: 2018-07-24 09:24
Last Updated: 2018-08-24 20:24

Latest Comments

ysblokje commented on 2020-05-27 18:04

I'm going to disown this package as I simply don't want to maintain it any longer, since I don't really play it anymore. (and I forgot about it for a long time ;) )

twilk commented on 2020-05-27 16:19

Here is an updated PKGBUILD that uses install instead of mkdir+cp. This fixes the *.desktop file; it's now installed properly instead of pointing into the build directory.

I've also changed the source of the git repository to SSH as the HTTPS transfer kept breaking for me, and I've bumped the pkgver to the current latest commit number.

# Maintainer: Ysblokje <ysblokje at gmail dot com>
# Contributor: Timo Wilken <>
# git version for the opensourced starruler2
pkgdesc="4X Space Strategy game Star Ruler 2's open source distribution."
depends=('libpng' 'zlib' 'glew' 'glu' 'freetype2' 'libvorbis' 'libogg' 'openal' 'bzip2' 'libxrandr' 'curl')
makedepends=('git' 'cmake' 'imagemagick' 'gcc' 'make')

pkgver() {
    cd StarRuler2-Source
    printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

build() {
    cd StarRuler2-Source
    LDFLAGS=-std=c++11 make -k -f source/linux/Makefile compile "-j$(nproc)"
    convert sr2.ico sr2.png

package() {
    install -Dt "$pkgdir/usr/share/applications/" starruler2.desktop
    cd "$srcdir/StarRuler2-Source"
    install -m 0644 -Dt "$pkgdir/usr/share/pixmaps/" sr2.png
    install -Dt "$pkgdir/opt/starruler2/"
    cp --preserve=mode -drt "$pkgdir/opt/starruler2/" bin maps mods locales data scripts

lightdot commented on 2019-06-09 00:31

After building the game I noticed that the .desktop file was packaged as an invalid symlink:

$ ll /usr/share/applications/starruler2.desktop
0 lrwxrwxrwx 1 root root 28 Jun  7 18:50 /usr/share/applications/starruler2.desktop -> /startdir/starruler2.desktop

while the icon is fine:

$ ll /usr/share/pixmaps/sr2.png
4 -rw-r--r-- 1 root root 2201 Jun  7 18:50 /usr/share/pixmaps/sr2.png

ysblokje commented on 2018-08-24 20:12

@TrialnError thanks for the suggestions! Incorporating them right now.

TrialnError commented on 2018-08-24 19:47

Some comments on the PKGBUILD.

The .desktop file should be added to the source line (like it is done with patch files and else). It would also error out earlier if, for whatever reason, the file is missing. And modifications could be detected. Additionally it makes the deprecated use of $startdir obsolete as the .desktop file will be available from $srcdir.

The empty prepare function could be removed, or the conversion of the icon file should be placed there.

Empty variables should also be removed (conflicts, optdepends).

If cp is used, it should look like $ cp -dpr --no-preserve=ownership.

And finally. Only the commit hash used as a pkgver is suboptimal. Especially if one is using a local repository. Should more like the fourth example from the VCS Guidelines: printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

ysblokje commented on 2018-08-23 09:21

sorry for the late replies, I just got back from my vacation. @phw, I should. @Eremiel the game needs to be started from it's basefolder otherwise it won't work. A symlink won´t work so an additional script must be written. It's one of the reasons I wrote the .desktop file.

Eremiell commented on 2018-08-08 06:44

Could you please add symlink to /usr/bin? Right now I have to start it using full path. Thanks!

phw commented on 2018-08-07 16:06

Please add git to makedepends, it is required to fetch the sources.

kleintux commented on 2018-07-26 05:41

Works perfect. Thanks.