summaryrefslogtreecommitdiffstats
path: root/simple-http-server-git
diff options
context:
space:
mode:
Diffstat (limited to 'simple-http-server-git')
m---------simple-http-server-git0
-rw-r--r--simple-http-server-git/.SRCINFO21
-rw-r--r--simple-http-server-git/.gitignore1
-rw-r--r--simple-http-server-git/PKGBUILD39
-rw-r--r--simple-http-server-git/simple-http-server-git.install5
-rw-r--r--simple-http-server-git/simple-http-server@.service10
6 files changed, 76 insertions, 0 deletions
diff --git a/simple-http-server-git b/simple-http-server-git
deleted file mode 160000
Subproject 24d070c7fb63a50de8e7297d66322a30f1f7476
diff --git a/simple-http-server-git/.SRCINFO b/simple-http-server-git/.SRCINFO
new file mode 100644
index 0000000..8a483a1
--- /dev/null
+++ b/simple-http-server-git/.SRCINFO
@@ -0,0 +1,21 @@
1pkgbase = simple-http-server-git
2 pkgdesc = Simple http server in Rust
3 pkgver = 0.6.1.r6.g2712a92
4 pkgrel = 1
5 url = https://github.com/TheWaWaR/simple-http-server
6 install = simple-http-server-git.install
7 arch = i686
8 arch = x86_64
9 arch = armv7h
10 arch = aarch64
11 license = MIT
12 makedepends = cargo
13 depends = openssl-1.0
14 provides = simple-http-server
15 conflicts = simple-http-server
16 source = git+https://github.com/TheWaWaR/simple-http-server.git
17 source = simple-http-server@.service
18 sha384sums = SKIP
19 sha384sums = a92987285f702de7eb5c34261e1c7d187b63c151db91fe6428c94428f24f771f0d38139d30febc4dfbfc76a8a697312f
20
21pkgname = simple-http-server-git
diff --git a/simple-http-server-git/.gitignore b/simple-http-server-git/.gitignore
new file mode 100644
index 0000000..956021b
--- /dev/null
+++ b/simple-http-server-git/.gitignore
@@ -0,0 +1 @@
simple-http-server/
diff --git a/simple-http-server-git/PKGBUILD b/simple-http-server-git/PKGBUILD
new file mode 100644
index 0000000..14a087d
--- /dev/null
+++ b/simple-http-server-git/PKGBUILD
@@ -0,0 +1,39 @@
1# Maintainer: Yigit Sever <yigit at yigitsever dot com>
2# Contributor: caiye <ye dot jingchen at gmail dot com>
3# Contributor: Dario Ostuni <dario.ostuni@gmail.com>
4
5_pkgname=simple-http-server
6pkgname=$_pkgname-git
7pkgver=0.6.1.r6.g2712a92
8pkgrel=1
9pkgdesc="Simple http server in Rust"
10arch=('i686' 'x86_64' 'armv7h' 'aarch64')
11url="https://github.com/TheWaWaR/simple-http-server"
12license=('MIT')
13depends=('openssl-1.0')
14makedepends=('cargo')
15conflicts=('simple-http-server')
16provides=('simple-http-server')
17install=simple-http-server-git.install
18options=()
19source=("git+https://github.com/TheWaWaR/$_pkgname.git"
20 "simple-http-server@.service")
21sha384sums=('SKIP'
22 'a92987285f702de7eb5c34261e1c7d187b63c151db91fe6428c94428f24f771f0d38139d30febc4dfbfc76a8a697312f')
23
24pkgver() {
25 cd "$_pkgname"
26 git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
27}
28
29build() {
30 export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0"
31 export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0"
32 cd "$_pkgname"
33 cargo build --release --target-dir target
34}
35
36package() {
37 install -Dm755 "$_pkgname/target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
38 install -Dm644 ./simple-http-server@.service "$pkgdir/usr/lib/systemd/system/simple-http-server@.service"
39}
diff --git a/simple-http-server-git/simple-http-server-git.install b/simple-http-server-git/simple-http-server-git.install
new file mode 100644
index 0000000..57a17e7
--- /dev/null
+++ b/simple-http-server-git/simple-http-server-git.install
@@ -0,0 +1,5 @@
1# arg 1: the new package version
2post_install() {
3 echo 'Paths must be escaped when starting Systemd service'
4 echo 'example: systemctl start simple-http-server@$(systemd-escape -p /path/to/directory)'
5}
diff --git a/simple-http-server-git/simple-http-server@.service b/simple-http-server-git/simple-http-server@.service
new file mode 100644
index 0000000..ff8e1ed
--- /dev/null
+++ b/simple-http-server-git/simple-http-server@.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=Simple http server in Rust
3After=network.target network-online.target nss-lookup.target
4
5[Service]
6WorkingDirectory=%f
7ExecStart=/usr/bin/simple-http-server -p 80
8
9[Install]
10WantedBy=multi-user.target