Package Details: starruler2-git r27.ba99a9a-1

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

Latest Comments

1 2 Next › Last »

eclairevoyant commented on 2023-04-22 02:00 (UTC)

make and gcc shouldn't be in makedepends, they're part of base-devel

lightdot commented on 2021-11-12 16:59 (UTC)

@vagyok, I've pushed this as openstarruler-git, with minor changes. Let me know if you'd like to co-maintain.

Perhaps these packages could be merged in the future, but since they have different sources, they might as well stay separate. One way or the other is OK by me...

vagyok commented on 2021-09-24 05:23 (UTC) (edited on 2021-09-24 05:24 (UTC) by vagyok)

I've updated the PKGBUILD to use the more up-to-date OpenSRProject community fork, and incorporate the necessary Data files as well. I'd suggest renaming the package openstarruler-git to reflect the name of the repository.

# Maintainer: Ysblokje <ysblokje at gmail dot com>
# Contributor: Timo Wilken <timo.21.wilken+aur@gmail.com>
# git version for the opensourced starruler2
pkgname=openstarruler-git
pkgver=r68.f07b3cd
pkgrel=1
pkgdesc="4X Space Strategy game Star Ruler 2's open source distribution."
arch=('x86_64')
url="http://starruler2.com/"
license=('MIT')
depends=('libpng' 'zlib' 'glew' 'glu' 'freetype2' 'libvorbis' 'libogg' 'openal' 'bzip2' 'libxrandr' 'curl')
makedepends=('git' 'cmake' 'imagemagick' 'gcc' 'make')
provides=('starruler2')
source=('OpenStarRuler::git+https://github.com/OpenSRProject/OpenStarRuler.git'
        'OpenStarRuler-Data::git+https://github.com/OpenSRProject/OpenStarRuler-Data.git')
sha256sums=('SKIP'
            'SKIP')

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

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

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

ysblokje commented on 2020-05-27 18:04 (UTC) (edited on 2020-05-27 18:05 (UTC) by ysblokje)

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 (UTC) (edited on 2020-05-27 16:21 (UTC) by twilk)

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 <timo.21.wilken+aur@gmail.com>
# git version for the opensourced starruler2
pkgname=starruler2-git
pkgver=r38.beec9bf
pkgrel=1
pkgdesc="4X Space Strategy game Star Ruler 2's open source distribution."
arch=('x86_64')
url="http://starruler2.com/"
license=('MIT')
depends=('libpng' 'zlib' 'glew' 'glu' 'freetype2' 'libvorbis' 'libogg' 'openal' 'bzip2' 'libxrandr' 'curl')
makedepends=('git' 'cmake' 'imagemagick' 'gcc' 'make')
provides=('starruler2')
source=('git+ssh://git@ssh.github.com/BlindMindStudios/StarRuler2-Source.git'
        'starruler2.desktop')
sha256sums=('SKIP'
            'c2df769b599b5f9ba5804052f8a32c2625fd99be9201660830f2be405f374e0b')

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/" StarRuler2.sh
    cp --preserve=mode -drt "$pkgdir/opt/starruler2/" bin maps mods locales data scripts
}

lightdot commented on 2019-06-09 00:31 (UTC)

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 (UTC) (edited on 2018-08-24 20:12 (UTC) by ysblokje)

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

TrialnError commented on 2018-08-24 19:47 (UTC)

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 (UTC) (edited on 2018-08-23 09:21 (UTC) by ysblokje)

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 (UTC)

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