summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e0021daef3fdcc7d4394fbf134fe65cc99157af (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
# Maintainer: networkjanitor <networkjanitor@xyooz.net>
pkgname=ezau-git
_pkgname=ezau
pkgver=r40.4918d36
pkgrel=1
pkgdesc="EVTC Zipper And Uploader"
arch=("x86_64")
url="https://gitlab.com/dunj3/ezau"
license=("MIT")
provides=("${_pkgname}")
conflicts=("${_pkgname}-bin" "${_pkgname}")
makedepends=('cargo' 'git')
depends=("openssl")
source=(
    "${_pkgname}::git+https://gitlab.com/dunj3/ezau.git#branch=master"
)
sha256sums=('SKIP')
backup=(
	"etc/ezau.toml"
)

pkgver() {
  cd "${_pkgname}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
    cd "${_pkgname}"
    cargo build --release --locked --features "im-discord im-matrix"
}

check() {
    cd "${_pkgname}"
    cargo test --release --locked --features "im-discord im-matrix"
}

package() {
    cd "${_pkgname}"
    install -Dm 755 "target/release/ezau" "${pkgdir}/usr/bin/${_pkgname}"
    install -Dm 644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm 644 "ezau-sample.toml" "${pkgdir}/usr/share/${_pkgname}/ezau-sample.toml"
    install -Dm 644 "ezau-sample.toml" "${pkgdir}/etc/ezau.toml"
    install -Dm 644 "ezau.service" "${pkgdir}/usr/share/${pkgname}/${_pkgname}.service"
    echo "INFO: Since arcdps.cbtlogs directory configuration is currently only possible on command line,"\
	  "please edit the /usr/share/${pkgname}/${_pkgname}.service to match the correct path and copy it to ~/.config/systemd/user/"\
	  "This behavior might change in future versions."
    # install -Dm 644 "ezau.service" "${pkgdir}/usr/lib/systemd/user/ezau.service"
}