blob: ca767d18c5fdde0f686877c42237331c1f9b8427 (
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
|
# Maintainer: Your Name <benjamin.voisin@ens-rennes.fr>
pkgname=belenios
pkgver=2.5.1
pkgrel=1
pkgdesc="State-of-the-art secure, private and verifiable voting system"
arch=('x86_64')
url="https://gitlab.inria.fr/belenios/belenios.git"
license=('GPL')
groups=()
depends=('ocaml' 'opam' 'npm' 'nodejs')
makedepends=('dune' 'git' 'gmp' 'libsodium' 'pkg-config' 'm4' 'sqlite3' 'openssl' 'curl' 'zip' 'unzip' 'ncurses' 'gd' 'cracklib' 'jq' 'sed')
_tag=55f9dc8ea92a8ff60e4e93d3473bfd496e179616 #git rev-parse $pkgver
source=( "$pkgname-$pkgver::git+https://gitlab.inria.fr/belenios/belenios.git#tag=$_tag")
sha256sums=('SKIP')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
opam init -n > /dev/null
if (( $(opam switch list | grep "$pkgname" -c) == "0" )); then
echo "Creating the $pkgname switch"
opam switch create $pkgname --empty > /dev/null
fi
opam switch $pkgname
eval $(opam env --switch=$pkgname --set-switch)
opam switch set-invariant ocaml-base-compiler=4.14.1 --switch=$pkgname > /dev/null
opam install --yes --switch=$pkgname base64 hex dune atdgen zarith cryptokit calendar cmdliner sqlite3 csv ocsipersist-sqlite eliom gettext-camomile ocamlnet
}
build() {
cd "$srcdir/$pkgname-$pkgver"
eval $(opam env --switch=$pkgname --set-switch)
make
sed -i "s/nodejs/node/g" frontend/Makefile
make build-release-server
}
package() {
cd "$srcdir/$pkgname-$pkgver"
cp -r _run/usr $pkgdir/
}
check() {
cd "$srcdir/$pkgname-$pkgver"
eval $(opam env --switch=$pkgname --set-switch)
make check
}
|