summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 70b262d81031e66cc2b2a0d75ff731ba2e777a44 (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
# Maintainer: XiaYeSuiFeng <xiayesuifeng@firerain.me>
pkgname=gopanel-bin
_pkgname=gopanel
pkgver=0.2.1
pkgrel=1
pkgdesc='A control panel that is written in Golang and is able to manage Caddy 2'
arch=('x86_64')
license=('GPLv3')
url='https://gitlab.com/xiayesuifeng/gopanel'
backup=('etc/gopanel/config.json')
depends=('caddy')
makedepends=('unzip')
source=("${_pkgname}-${pkgver}.zip::https://gitlab.com/xiayesuifeng/${_pkgname}/-/jobs/artifacts/${pkgver}/download?job=build-gopanel")
sha256sums=('87d4ebe76f052ab769989f581130521d3a9bd51c9d1d10a1dd9d9a2646292ddb')

package() {
  cd ${srcdir}/gopanel
  install -d "$pkgdir/etc/gopanel/app.conf.d"
  install -d "$pkgdir/usr/share/gopanel"
  install -D -m 0755 gopanel "$pkgdir/usr/bin/gopanel"
  install -D -m 0644 systemd/gopanel.service "$pkgdir/usr/lib/systemd/system/gopanel.service"
  install -D -m 0644 config.default.json "$pkgdir/etc/gopanel/config.json"
  sed -i 's|http://localhost:2019|unix//run/caddy/admin.socket|g' "$pkgdir/etc/gopanel/config.json"
  cp -rf web "${pkgdir}/usr/share/gopanel/web"
  chmod -R 0644 "${pkgdir}/usr/share/gopanel/web"
}