summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 50c28819b0a2eb9af3d140306334d9f9b2858007 (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
# Maintainer: TheAirBlow <pilexet.danila at gmail dot com>
# Contributor: indjera <indjera at gmail dot com>
# Uses latest public Xamarin DevOps successfull run:
# https://dev.azure.com/xamarin/public/_build?definitionId=48&view=runs&statusFilter=succeeded

pkgname=xamarin-android
_buildid=43659 # Build ID from public Xamarin DevOps
_version=11.4.99.0 # Version supplied from any artifact filename
pkgver=${_version}.${_buildid}
pkgrel=1
provides=('xamarin-android')
conflicts=('xamarin-android-git'
	   'xamarin-android')
pkgdesc="Provides open-source bindings of the Android SDK for use with .NET managed languages"
arch=('x86_64')
depends=('msbuild'
         'mono>=3.0.0'
         'glibc>=2.28'
         'libzip>=1.5.1'
         'gcc-libs>=5.2'
         'lib32-gcc-libs>=5.2'
         'ncurses>=6'
         'zlib>=1:1.2.0')
makedepends=('nodejs'
             'npm'
             'wget'
             'unzip')
optdepends=('jdk8-openjdk: For building Xamarin.Android Apps'
            'fsharp: For compiling Xamarin.Android F# projects')
url='https://github.com/xamarin/xamarin-android'
license=('MIT')

prepare() {
    cd ..
    echo "Downloading npm modules..."
    npm i
    echo "Getting download url..."
    Link=$(node index.js ${_buildid})
    echo "Got link: ${Link}"
    cd ${srcdir}
    echo "Downloading..."
    wget -O build.zip ${Link}
    echo "Extracting artifacts..."
    bsdtar xf build.zip
}

package() {
    cd "${srcdir}/installers-unsigned - Linux"
    echo "Extracting .deb artifact..."
    bsdtar xf xamarin.android-oss_${_version}_amd64.deb
    echo "Extracting .deb data..."
    bsdtar xf data.tar.xz
    echo "Installing..."
    chmod -R g-w usr
    mv usr "${pkgdir}"
}