[arch-commits] Commit in (httplz httplz/repos httplz/trunk httplz/trunk/PKGBUILD)

Orhun Parmaksiz orhun at gemini.archlinux.org
Sun Jun 5 20:46:29 UTC 2022


    Date: Sunday, June 5, 2022 @ 20:46:28
  Author: orhun
Revision: 1224293

addpkg: httplz 1.12.5-2

Added:
  httplz/
  httplz/repos/
  httplz/trunk/
  httplz/trunk/PKGBUILD

----------+
 PKGBUILD |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

Added: httplz/trunk/PKGBUILD
===================================================================
--- httplz/trunk/PKGBUILD	                        (rev 0)
+++ httplz/trunk/PKGBUILD	2022-06-05 20:46:28 UTC (rev 1224293)
@@ -0,0 +1,52 @@
+# Maintainer: Orhun Parmaksız <orhun at archlinux.org>
+# Contributor: cyqsimon <28627918+cyqsimon at users.noreply.github.com>
+
+pkgname=httplz
+_pkgname=http
+pkgver=1.12.5
+pkgrel=2
+pkgdesc="Host These Things Please - a basic http server for hosting a folder fast and simply"
+arch=('x86_64')
+url="https://github.com/thecoshman/http"
+license=('MIT')
+depends=('openssl' 'bzip2')
+makedepends=('cargo' 'ruby-ronn-ng')
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
+        "Cargo.lock")
+sha512sums=('25cc6a542dac9d4cce8370cee49a71ab48db02a0706a7df92f1e3e0e8082db154d5e68224a23603b2143a087e86ce67383e55c66844e5cfd9fa340b5f4d80b38'
+            '92dac3cd205ff9634b424aee4c560b00df8b9d1c9c8d98acfd42440fc9871c0620b3299967960aa930e401e1127b77787a35b2bbd173304f7be6cf3e011f9f27')
+
+prepare() {
+  # https://github.com/thecoshman/http/issues/84
+  cp Cargo.lock "${_pkgname}-${pkgver}"
+  # fetch dependencies
+  cd "${_pkgname}-${pkgver}"
+  cargo fetch --locked --target="${CARCH}-unknown-linux-gnu"
+  # rename man page
+  mv "${_pkgname}.md" "${pkgname}.md"
+  mkdir man
+}
+
+build() {
+  cd "${_pkgname}-${pkgver}"
+  # only build and install the `httplz` binary and exclude `http`
+  # they are identical and `httplz` is significantly less likely to cause conflicts
+  cargo build --release --frozen --bin="$pkgname"
+  # generate man page
+  ronn --organization="http developers" "${pkgname}.md" -o man
+}
+
+check() {
+  cd "${_pkgname}-${pkgver}"
+  cargo test --frozen
+}
+
+package() {
+  cd "${_pkgname}-${pkgver}"
+  install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
+  install -Dm644 "man/${pkgname}.1" -t "$pkgdir/usr/share/man/man1"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list