summaryrefslogtreecommitdiffstats
path: root/simple-http-server-git/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'simple-http-server-git/PKGBUILD')
-rw-r--r--simple-http-server-git/PKGBUILD39
1 files changed, 39 insertions, 0 deletions
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}