summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD53
-rw-r--r--conf4
-rw-r--r--service20
-rw-r--r--tmpfiles1
5 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..893f5208c60d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = caddy1-git
+ pkgdesc = HTTP/2 Web Server with Automatic HTTPS
+ pkgver = 20200413.3b4f7a3c
+ pkgrel = 1
+ url = https://caddyserver.com/
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = go
+ provides = caddy1
+ conflicts = caddy1
+ backup = etc/caddy1.conf
+ source = git+https://github.com/mholt/caddy.git#branch=v1
+ source = tmpfiles
+ source = service
+ source = conf
+ sha256sums = SKIP
+ sha256sums = c479f5736770bbcbe73511955f626b1eadebee37376af0637aed50bf113a6241
+ sha256sums = bafc3d626f91c4a8135a7b7fbf9c662d50acf37a001976ac4e5f193b4a2aa79c
+ sha256sums = 5c48ac9bb5bdba72d2f5aed5a32356f38b196c88a18ba0c91cb6157675506ea1
+
+pkgname = caddy1-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..eb66a6521355
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Wei Congrui < crvv.mail at gmail dot com >
+# Contributor: Carl George < arch at cgtx dot us >
+# Contributor: Eric Engeström <eric at engestrom dot ch>
+# Contributor: Andreas Linz <klingt.net at gmail dot com>
+# Contributor: Akshay S Dinesh <asdofindia at gmail dot com>
+
+pkgname=caddy1-git
+_pkgname=caddy1
+pkgver=20200413.3b4f7a3c
+pkgrel=1
+pkgdesc='HTTP/2 Web Server with Automatic HTTPS'
+url='https://caddyserver.com/'
+license=('Apache')
+arch=('x86_64')
+makedepends=('git' 'go')
+source=("git+https://github.com/mholt/caddy.git#branch=v1"
+ 'tmpfiles'
+ 'service'
+ 'conf')
+sha256sums=('SKIP'
+ 'c479f5736770bbcbe73511955f626b1eadebee37376af0637aed50bf113a6241'
+ 'bafc3d626f91c4a8135a7b7fbf9c662d50acf37a001976ac4e5f193b4a2aa79c'
+ '5c48ac9bb5bdba72d2f5aed5a32356f38b196c88a18ba0c91cb6157675506ea1')
+
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+
+backup=('etc/caddy1.conf')
+
+pkgver() {
+ cd "${srcdir}/caddy"
+ git log -1 --format='%cd.%h' --date=short | tr -d -
+}
+
+prepare() {
+ cd "${srcdir}/caddy"
+ go get -v -d
+}
+
+build() {
+ cd "${srcdir}/caddy"
+ cd caddy
+ go build -v
+}
+
+package() {
+ cd "${srcdir}/caddy"
+ install -D -m 0755 caddy/caddy "${pkgdir}/usr/bin/caddy1"
+ install -D -m 0644 ../tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/caddy1.conf"
+ install -D -m 0644 ../service "${pkgdir}/usr/lib/systemd/system/caddy1.service"
+ install -D -m 0644 ../conf "${pkgdir}/etc/caddy1.conf"
+}
diff --git a/conf b/conf
new file mode 100644
index 000000000000..6249d834cd8a
--- /dev/null
+++ b/conf
@@ -0,0 +1,4 @@
+*:80 {
+ gzip
+ root /srv/http
+}
diff --git a/service b/service
new file mode 100644
index 000000000000..a1845711c648
--- /dev/null
+++ b/service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Caddy HTTP/2 web server
+Documentation=https://caddyserver.com/docs
+After=network-online.target
+
+[Service]
+User=http
+Group=http
+Environment=CADDYPATH=/var/lib/caddy1
+ExecStart=/usr/bin/caddy1 -agree -conf /etc/caddy1.conf
+ExecReload=/usr/bin/kill -USR1 $MAINPID
+PrivateTmp=true
+ProtectHome=true
+PrivateDevices=true
+ProtectSystem=strict
+ReadWritePaths=/var/lib/caddy1
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target
diff --git a/tmpfiles b/tmpfiles
new file mode 100644
index 000000000000..23924e920105
--- /dev/null
+++ b/tmpfiles
@@ -0,0 +1 @@
+d /var/lib/caddy1 0750 http http