summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 097c7b679899c63da65d6022ee1dbce5a1baabe7 (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
56
57
58
59
60
61
62
63
64
65
66
67
# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
# for more information on packaging from GIT sources.

# Maintainer: Andrew Smith <ChucklesTheBeard@gmail.com>
# Contributer: Patrik Plihal <patrik.plihal@gmail.com>

pkgname=ckan-git
pkgver=v1.14.2.r1.g1519f19
pkgrel=1
pkgdesc="A metadata repository and associated tools for searching, installing, and managing mods for Kerbal Space Program (KSP)"
arch=('any')
url="http://forum.kerbalspaceprogram.com/threads/100067-"
license=('MIT')
provides=('ckan')
conflicts=('ckan')
depends=('mono' 'curl')
makedepends=('git' 'python2' 'python2-requests')
source=('git://github.com/KSP-CKAN/CKAN'
        'disable_version_checks.diff')
sha256sums=('SKIP'
            '21ed582d41da7f52ea4014fdcfadcadb7025f0fbae924fccd345c3b1f0fbff44')

pkgver() {
  cd "$srcdir/CKAN"
  git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  
  # ignore certain version checks that return "inconclusive" exceptions for development builds
  cd "$srcdir/CKAN/"
  git apply $srcdir/disable_version_checks.diff
}

build() {
  cd "$srcdir/CKAN"
  xbuild /verbosity:minimal CKAN.sln

  cd "$srcdir/CKAN/Cmdline"
  mono ../Core/packages/ILRepack.1.25.0/tools/ILRepack.exe \
    /target:exe \
    /out:$srcdir/ckan.exe \
    bin/Debug/CmdLine.exe \
    bin/Debug/CKAN-GUI.exe \
    bin/Debug/ChinhDo.Transactions.dll \
    bin/Debug/CKAN.dll \
    bin/Debug/CommandLine.dll \
    bin/Debug/ICSharpCode.SharpZipLib.dll \
    bin/Debug/log4net.dll \
    bin/Debug/Newtonsoft.Json.dll \
    bin/Debug/INIFileParser.dll \
    bin/Debug/CurlSharp.dll
}

check() {
  #nunit-console4 is included in mono

  cd "$srcdir/CKAN/"
  command nunit-console4 --exclude=FlakyNetwork Tests/bin/Debug/CKAN.Tests.dll
}

package() {
  mkdir -p "$pkgdir/usr/bin/"
  cp $srcdir/ckan.exe "$pkgdir/usr/bin/ckan"
}

# vim:set ts=2 sw=2 et: