summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0005c8b24dace29651f0a14deb156067b66d365f (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
# Maintainer: Alexandre M <me@itsalex.fr>
# Contributor: Jimi M <jmaiquez@student.42.fr>
pkgname=serve
pkgver=0.1
pkgrel=1
pkgdesc="Serve static files by one simple command"
arch=(any)
url="https://github.com/ItsJimi/serve"
license=('MIT')
groups=()
depends=()
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
makedepends=('go, git')
_gitroot="git://github.com/ItsJimi/serve"
_gitname="serve"

 
build() {
    msg "Récupération des sources sur le serveur git"
    if [[ -d $_gitname ]] ; then
        cd $_gitname && git pull origin && cd .. || return 1 
        msg "Les fichiers locaux ont été mis à jour."
    else
        git clone $_gitroot || return 1
        msg "Les fichiers ont été téléchargés."
    fi
    cd $_gitname

    go get golang.org/x/net/http2
    go build
}


package() {
  cd "$srcdir/$pkgname"

  cp serve $pkgdir
}