summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Scheirer2017-06-12 12:23:40 -0400
committerMatthew Scheirer2017-06-12 12:24:22 -0400
commitb2fa7567c11da0b69479bf0e2e61ba02bddaa0f1 (patch)
tree909463e6251fd738c245c690a5a0d4bf973e64e8
downloadaur-pachost.tar.gz
initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD24
-rw-r--r--pachost.service12
3 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4a13a19d5939
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Mon Jun 12 16:23:14 UTC 2017
+pkgbase = pachost
+ pkgdesc = A rocket powered dumb file server to share a pacman cache on the local network.
+ pkgver = 0.1.0
+ pkgrel = 1
+ url = https://gitlab.com/zanny/pachost
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = cargo
+ makedepends = git
+ makedepends = rust-nightly
+ source = git+https://gitlab.com/zanny/pachost.git
+ source = pachost.service
+ sha256sums = SKIP
+ sha256sums = d180cde13c353df50940491ef5ad4bffd9e1abed661da964bd413548e4d7d8a8
+
+pkgname = pachost
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..78bc382dab13
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Zanny <lordzanny@gmail.com>
+pkgname=pachost
+pkgver=0.1.0
+pkgrel=1
+pkgdesc="A rocket powered dumb file server to share a pacman cache on the local network."
+arch=(i686 x86_64)
+url="https://gitlab.com/zanny/pachost"
+license=('GPL')
+makedepends=(cargo git rust-nightly)
+source=('git+https://gitlab.com/zanny/pachost.git'
+ 'pachost.service')
+sha256sums=('SKIP'
+ 'd180cde13c353df50940491ef5ad4bffd9e1abed661da964bd413548e4d7d8a8')
+
+build() {
+ cd "$srcdir/$pkgname"
+ cargo build --release
+}
+
+package() {
+ install -Dm755 "$srcdir/$pkgname/target/release/pachost" "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 "$srcdir/$pkgname/templates/index.html.tera" "$pkgdir/usr/share/$pkgname/index.html.tera"
+ install -Dm644 "$srcdir/pachost.service" "$pkgdir/usr/lib/systemd/system/pachost.service"
+}
diff --git a/pachost.service b/pachost.service
new file mode 100644
index 000000000000..73aa367e6f49
--- /dev/null
+++ b/pachost.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Pachost Mirror Server
+After=network.target
+
+[Service]
+Type=simple
+Environment=ROCKET_ENV=prod
+Environment=ROCKET_TEMPLATE_DIR=/usr/share/pachost/
+ExecStart=/usr/bin/pachost
+
+[Install]
+WantedBy=multi-user.target