summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiayesuifeng2020-07-01 20:37:06 +0800
committerxiayesuifeng2020-07-01 20:37:06 +0800
commit45edd90e233e3cb3e9960e80991f92602cbba4ae (patch)
tree9e9512d93ac4d084d3600187e2e5b11a9a846c08
downloadaur-45edd90e233e3cb3e9960e80991f92602cbba4ae.tar.gz
add gopanel
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD35
2 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..47421ab1d3d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = gopanel
+ pkgdesc = A control panel that is written in Golang and is able to manage Caddy 2
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://gitlab.com/xiayesuifeng/gopanel
+ arch = x86_64
+ license = GPLv3
+ makedepends = go
+ makedepends = npm
+ depends = caddy2
+ backup = etc/gopanel/config.json
+ source = https://gitlab.com/xiayesuifeng/gopanel/-/archive/0.0.1/gopanel-0.0.1.tar.gz
+ source = gopanel-web.tar.gz::https://gitlab.com/xiayesuifeng/gopanel-web/-/archive/master/gopanel-web-master.tar.gz
+ sha256sums = 728621f83072b6fde3f57fe6e99f7aabda7d22ba040f15348730ad01fd851411
+ sha256sums = SKIP
+
+pkgname = gopanel
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bfc57085ff2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: XiaYeSuiFeng <xiayesuifeng@firerain.me>
+pkgname=gopanel
+pkgver=0.0.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=('caddy2')
+makedepends=('go' 'npm')
+source=("https://gitlab.com/xiayesuifeng/${pkgname}/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "gopanel-web.tar.gz::https://gitlab.com/xiayesuifeng/${pkgname}-web/-/archive/master/gopanel-web-master.tar.gz")
+sha256sums=('728621f83072b6fde3f57fe6e99f7aabda7d22ba040f15348730ad01fd851411'
+ 'SKIP')
+
+build() {
+ cd ${srcdir}/gopanel-web-master
+ npm install
+ npm run build
+ cd ${srcdir}/${pkgname}-${pkgver}
+ go build -v
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ mkdir -p "$pkgdir/etc/gopanel/app.conf.d"
+ mkdir -p "$pkgdir/usr/share/gopanel/web"
+ 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"
+ cp -rf ${srcdir}/gopanel-web-master/build "${pkgdir}/usr/share/gopanel/web"
+ chmod -R 0644 "${pkgdir}/usr/share/gopanel/web"
+}