summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ce3680fda0d1c0261a3ecfe7892627801f3615d (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
# Maintainer: Andrej Marolt <andrej.marolt@gmail.com>
pkgname=openshift-origin-git
pkgver=1.0.0
pkgrel=13
pkgdesc="OpenShift Origin is a platform for developing, building, and deploying containerized applications. See https://docs.openshift.org/latest for more on running OpenShift Origin."
arch=(x86_64)
url="https://github.com/openshift/origin"
license=('Apache')
depends=('docker')
makedepends=('go')
optdepends=('zfs-dkms: zfs support')
provides=('openshift')
conflicts=('openshift')
if [[ $CARCH == 'x86_64' ]]; then
    source=("https://github.com/openshift/origin/archive/release-3.6.zip")
sha256sums=('SKIP')
fi

build() {
    export GOPATH=$(pwd)
    export OS_GIT_VERSION=
    export OS_GIT_MAJOR=
    export OS_GIT_MINOR=

    cd ./origin-release-3.6
    make clean build
    cd ./_output/local/bin/linux/amd64/
    mv ./openshift $srcdir/
    mv ./oc        $srcdir/
    mv ./kubefed   $srcdir/
}

package() {
    install -D -m755 $srcdir/oc        $pkgdir/usr/bin/oc
    install -D -m755 $srcdir/openshift $pkgdir/usr/bin/openshift
    install -D -m755 $srcdir/kubefed   $pkgdir/usr/bin/kubefed

    echo "Running openshift post_install script..."

    ln -s /usr/bin/openshift /usr/bin/kube-apiserver
    ln -s /usr/bin/openshift /usr/bin/kube-controller-manager
    ln -s /usr/bin/openshift /usr/bin/kubelet
    ln -s /usr/bin/openshift /usr/bin/kube-proxy
    ln -s /usr/bin/openshift /usr/bin/kube-scheduler
    ln -s /usr/bin/openshift /usr/bin/oadm
    ln -s /usr/bin/oc        /usr/bin/kubectl
}