summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09b664bf599a5e289d5561b01de4eea06cc15fd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pkgname=openra-yr-git
_pkgname=openra-yr
pkgver=227.git.7d6f264
pkgrel=1
pkgdesc="A Command & Conquer: Yuri's Revenge-inspired mod of OpenRA"
arch=('any')
url="https://github.com/cookgreen/Yuris-Revenge"
license=('GPL3')
install=openra-yr.install
depends=('mono' 'ttf-dejavu' 'openal' 'libgl' 'freetype2' 'sdl2' 'lua51' 'hicolor-icon-theme' 'gtk-update-icon-cache'
         'desktop-file-utils' 'xdg-utils' 'zenity')
makedepends=('dos2unix' 'git' 'unzip')
provides=('openra-yr')
options=(!strip)
source=("git+${url}.git"
"openra-yr"
"openra-yr.appdata.xml"
"openra-yr.desktop")
md5sums=('SKIP'
         '9ddf56b241cd992d455ee3c7b602382b'
         '51b3883b5f26625f30256a13cb729ea5'
         '3be388e2b2fb8b8c33b2e5f3232e9cda')

pkgver() {
    cd $srcdir/Yuris-Revenge
    no=$(git rev-list --count HEAD)
    hash=$(git log | head -n 1 | cut -d ' ' -f 2 | head -c 7)
    printf "${no}.git.${hash}"
}

prepare() {
    cd $srcdir/Yuris-Revenge
    dos2unix *.md
}

build() {
    cd $srcdir/Yuris-Revenge
    make version VERSION="${pkgver}"
    make
}

package() {
    cd $srcdir/Yuris-Revenge
    mkdir -p $pkgdir/usr/{lib/openra-yr/mods,bin,share/pixmaps,share/doc/packages/openra-yr,share/applications,share/appdata}
    install -dm775 $pkgdir/var/games/openra-yr
    cp -r engine/{glsl,lua,AUTHORS,COPYING,Eluant.dll*,FuzzyLogicLibrary.dll,GeoLite2-Country.mmdb.gz,'global mix database.dat',ICSharpCode.SharpZipLib.dll,launch-dedicated.sh,launch-game.sh,MaxMind.Db.dll,OpenAL-CS.dll,OpenAL-CS.dll.config,Open.Nat.dll,OpenRA.Game.exe,OpenRA.Platforms.Default.dll,OpenRA.Server.exe,OpenRA.Utility.exe,rix0rrr.BeaconLib.dll,SDL2-CS.dll,SDL2-CS.dll.config,SharpFont.dll,SharpFont.dll.config,VERSION} $pkgdir/usr/lib/openra-yr
    cp -r mods/yr $pkgdir/usr/lib/openra-yr/mods
    cp -r engine/mods/{common,modcontent} $pkgdir/usr/lib/openra-yr/mods
    install -Dm755 $srcdir/openra-yr $pkgdir/usr/bin/openra-yr
    cp -r $srcdir/openra-yr.appdata.xml $pkgdir/usr/share/appdata/openra-yr.appdata.xml
    cp -r README.md $pkgdir/usr/share/doc/packages/openra-yr/README.md
    cp -r mods/yr/icon.png $pkgdir/usr/share/pixmaps/openra-yr.png
    install -Dm644 $srcdir/openra-yr.desktop $pkgdir/usr/share/applications/openra-yr.desktop
    rm $pkgdir/usr/lib/openra-yr/*.sh
}