summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 23c4c7fa39e5df0e965a96597eb8ada6827cba1b (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
# Maintainer: Laurent Haar laurent.haar@epitech.eu
pkgname=blih-custom
pkgver=1.0
pkgrel=1
pkgdesc="Bocal Lightweight Interface for Humans, git repositories and SSH public keys management tool for EPITECH students"
arch=('any')
url="https://github.com/Seres67/blih-custom"
license=('BSD')
depends=('python>=3.3.0'
	'python-requests'
	'git')
provides=('blih')
conflicts=('blih')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Seres67/${pkgname}/releases/download/v${pkgver}/v${pkgver}.tar.gz")
sha256sums=('SKIP')

prepare() {
	sed -i s/python3.3/python/ "${pkgname}/${pkgname}.py"
}

build() {
        cd "${pkgname}"
	mv "${pkgname}.py" "${pkgname}"
        if [[ -z "${BLIH_USER}" ]]; then
            echo "Please define BLIH_USER env var to your epitech mail address (firstname.lastname@epitech.eu)"
            exit 1
        fi
        sed -i "s|BLIH_USER|\"$BLIH_USER\"|" "${pkgname}"
	chmod 755 "${pkgname}"
        mv "${pkgname}" "blih"
}

package() {
	mkdir -p "${pkgdir}/usr/bin"
	cp -a "${pkgname}/blih" "${pkgdir}/usr/bin"
}