blob: 386295f615a8c29474cb271e465c216c82b4e0d1 (
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
|
# Maintainer: Viktor Danov <orangeleaf12@gmail.com>
pkgname=abacus-git
pkgver=1.4.2
pkgrel=1
epoch=
pkgdesc="A simple interactive calculator REPL with support for variables, lambdas, and more."
arch=('x86_64')
url="https://github.com/viktordanov/abacus.git"
license=('MIT')
groups=()
depends=()
makedepends=('go' 'git')
checkdepends=()
optdepends=()
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
changelog=
source=()
noextract=()
md5sums=()
validpgpkeys=()
_gitroot="git@github.com:viktordanov/abacus.git"
_gitname="abacus"
build() {
cd ${srcdir}/
msg "Connecting to the GIT server...."
if [[ -d ${srcdir}/${_gitname} ]]; then
cd ${_gitname}
git pull origin
msg "The local files are updated..."
else
git clone ${_gitroot}
fi
msg "GIT checkout done."
msg "Starting make for: ${pkgname}"
if [[ -d ${srcdir}/${_gitname}-build ]]; then
msg "Cleaning the previous build directory..."
rm -rf ${srcdir}/${_gitname}-build
fi
git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
cd ${srcdir}/${_gitname}-build
make compile || return 1
}
package() {
mkdir -p ${pkgdir}/usr/bin
cp "${srcdir}/${_gitname}-build/build/abacus" "${pkgdir}/usr/bin"
chmod +x "${pkgdir}/usr/bin/abacus"
}
|