From 31d147b20c67d95a9e306d0749200bf964ac42af Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 29 Oct 2021 01:30:24 +0300 Subject: Use actual files instead of submodules --- simple-http-server-git | 1 - simple-http-server-git/.SRCINFO | 21 ++++++++++++ simple-http-server-git/.gitignore | 1 + simple-http-server-git/PKGBUILD | 39 ++++++++++++++++++++++ .../simple-http-server-git.install | 5 +++ simple-http-server-git/simple-http-server@.service | 10 ++++++ 6 files changed, 76 insertions(+), 1 deletion(-) delete mode 160000 simple-http-server-git create mode 100644 simple-http-server-git/.SRCINFO create mode 100644 simple-http-server-git/.gitignore create mode 100644 simple-http-server-git/PKGBUILD create mode 100644 simple-http-server-git/simple-http-server-git.install create mode 100644 simple-http-server-git/simple-http-server@.service (limited to 'simple-http-server-git') diff --git a/simple-http-server-git b/simple-http-server-git deleted file mode 160000 index 24d070c..0000000 --- a/simple-http-server-git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 24d070c7fb63a50de8e7297d66322a30f1f7476b 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 @@ +pkgbase = simple-http-server-git + pkgdesc = Simple http server in Rust + pkgver = 0.6.1.r6.g2712a92 + pkgrel = 1 + url = https://github.com/TheWaWaR/simple-http-server + install = simple-http-server-git.install + arch = i686 + arch = x86_64 + arch = armv7h + arch = aarch64 + license = MIT + makedepends = cargo + depends = openssl-1.0 + provides = simple-http-server + conflicts = simple-http-server + source = git+https://github.com/TheWaWaR/simple-http-server.git + source = simple-http-server@.service + sha384sums = SKIP + sha384sums = a92987285f702de7eb5c34261e1c7d187b63c151db91fe6428c94428f24f771f0d38139d30febc4dfbfc76a8a697312f + +pkgname = 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 @@ +# Maintainer: Yigit Sever +# Contributor: caiye +# Contributor: Dario Ostuni + +_pkgname=simple-http-server +pkgname=$_pkgname-git +pkgver=0.6.1.r6.g2712a92 +pkgrel=1 +pkgdesc="Simple http server in Rust" +arch=('i686' 'x86_64' 'armv7h' 'aarch64') +url="https://github.com/TheWaWaR/simple-http-server" +license=('MIT') +depends=('openssl-1.0') +makedepends=('cargo') +conflicts=('simple-http-server') +provides=('simple-http-server') +install=simple-http-server-git.install +options=() +source=("git+https://github.com/TheWaWaR/$_pkgname.git" + "simple-http-server@.service") +sha384sums=('SKIP' + 'a92987285f702de7eb5c34261e1c7d187b63c151db91fe6428c94428f24f771f0d38139d30febc4dfbfc76a8a697312f') + +pkgver() { + cd "$_pkgname" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0" + export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0" + cd "$_pkgname" + cargo build --release --target-dir target +} + +package() { + install -Dm755 "$_pkgname/target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname" + install -Dm644 ./simple-http-server@.service "$pkgdir/usr/lib/systemd/system/simple-http-server@.service" +} 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 @@ +# arg 1: the new package version +post_install() { + echo 'Paths must be escaped when starting Systemd service' + echo 'example: systemctl start simple-http-server@$(systemd-escape -p /path/to/directory)' +} 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 @@ +[Unit] +Description=Simple http server in Rust +After=network.target network-online.target nss-lookup.target + +[Service] +WorkingDirectory=%f +ExecStart=/usr/bin/simple-http-server -p 80 + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-70-g09d2