summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 20605d44e117ac41ce8e392d33a3b6330b53cdd5 (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
# Maintainer: Zhustec <zhustec@foxmail.com>

pkgname=erlang-lager
_pkgname="${pkgname/erlang-/}"
pkgver=3.6.4
pkgrel=1
pkgdesc="Erlang logging framework"
arch=("x86_64")
url=https://hex.pm/packages/lager
license=("Apache 2")
depends=("erlang-nox" "erlang-goldrush")
makedepends=("rebar")
source=("https://repo.hex.pm/tarballs/$_pkgname-$pkgver.tar")
sha256sums=("6cbef7e038d772a6bf834ba7aaf55a1484a97adfe8075b4a23b0086a8fe697a8")

build() {
    cd "$srcdir" && tar xvaf contents.tar.gz

    sed -i '51,54d' rebar.config
    sed -i '8d' rebar.config.script

    rebar compile
}
    
package() {
    cd "$srcdir"
    mkdir -p "$pkgdir/usr/lib/erlang/lib/$_pkgname-$pkgver"

    for i in ebin include priv src; do
        cp -R $i "$pkgdir/usr/lib/erlang/lib/$_pkgname-$pkgver"
    done

    install -Dm644 ./LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}