[arch-commits] Commit in yaws/repos (4 files)

Felix Yan felixonmars at archlinux.org
Tue Jul 7 16:12:03 UTC 2020


    Date: Tuesday, July 7, 2020 @ 16:12:02
  Author: felixonmars
Revision: 659161

archrelease: copy trunk to community-staging-x86_64

Added:
  yaws/repos/community-staging-x86_64/
  yaws/repos/community-staging-x86_64/PKGBUILD
    (from rev 659159, yaws/trunk/PKGBUILD)
  yaws/repos/community-staging-x86_64/yaws.install
    (from rev 659159, yaws/trunk/yaws.install)
  yaws/repos/community-staging-x86_64/yaws.service
    (from rev 659160, yaws/trunk/yaws.service)

--------------+
 PKGBUILD     |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 yaws.install |   13 +++++++++++
 yaws.service |   13 +++++++++++
 3 files changed, 88 insertions(+)

Copied: yaws/repos/community-staging-x86_64/PKGBUILD (from rev 659159, yaws/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-07-07 16:12:02 UTC (rev 659161)
@@ -0,0 +1,62 @@
+# Maintainer: Alexander F. Rødseth <xyproto at archlinux.org>
+# Contributor: Vesa Kaihlavirta <vegai at iki.fi>
+# Contributor: Patrick Smits <mail at patricksmits.net>
+
+pkgname=yaws
+pkgver=2.0.7
+pkgrel=2
+pkgdesc='Web server for dynamic content written in Erlang'
+arch=(x86_64)
+url='http://yaws.hyber.org/'
+license=(BSD)
+depends=(erlang-nox pam)
+backup=(etc/yaws/yaws.conf)
+options=(!emptydirs)
+install=$pkgname.install
+source=("https://github.com/klacke/yaws/archive/$pkgname-$pkgver.tar.gz"
+        "$pkgname.service")
+sha256sums=('083b1b6be581fdfb66d77a151bbb2fc3897b1b0497352ff6c93c2256ef2b08f6'
+            '3628a0f6fdacc91c216cb782e3f3da638958cca6eee34a0a1e692482659109db')
+
+prepare() {
+  cd "$pkgname-$pkgname-$pkgver"
+
+  # python2 fix
+  sed -i 's:n/python:n/python2:' www/cgi{.yaws,-bin/foo.py}
+
+  # treat warnings as warnings
+  sed -i 's/-Werror//g' include.mk
+
+  # Prepare configure and make
+  autoreconf -fi
+}
+
+build() {
+  cd "$pkgname-$pkgname-$pkgver"
+
+  export wwwdir=/srv/http/yaws
+  ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
+  make
+}
+
+package() {
+  cd "$pkgname-$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" install
+
+  install -d "$pkgdir/usr/lib/erlang/lib"
+  ln -s /usr/lib/yaws "$pkgdir/usr/lib/erlang/lib/$pkgname-$pkgver"
+  install -Dm644 "$srcdir/$pkgname.service" \
+    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+  install -Dm644 "$srcdir/$pkgname-$pkgname-$pkgver/LICENSE" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # path fix
+  cp -ru examples/include "$pkgdir/usr/lib/yaws-$pkgver/examples/"
+  mv "$pkgdir/srv/http/yaws/"* "$pkgdir/srv/http/www" || true
+  rmdir --ignore-fail-on-non-empty "$pkgdir/srv/http/yaws"
+  mv "$pkgdir/srv/http/www" "$pkgdir/srv/http/yaws" || true
+}
+
+# getver: raw.githubusercontent.com/klacke/yaws/master/vsn.mk
+# vim: ts=2 sw=2 et:

Copied: yaws/repos/community-staging-x86_64/yaws.install (from rev 659159, yaws/trunk/yaws.install)
===================================================================
--- community-staging-x86_64/yaws.install	                        (rev 0)
+++ community-staging-x86_64/yaws.install	2020-07-07 16:12:02 UTC (rev 659161)
@@ -0,0 +1,13 @@
+post_upgrade() {
+  mkdir -p /var/log/yaws
+}
+
+post_install() {
+  post_upgrade
+}
+
+post_remove() {
+  rmdir --ignore-fail-on-non-empty /var/log/yaws
+}
+
+# vim: ts=2 sw=2 et:

Copied: yaws/repos/community-staging-x86_64/yaws.service (from rev 659160, yaws/trunk/yaws.service)
===================================================================
--- community-staging-x86_64/yaws.service	                        (rev 0)
+++ community-staging-x86_64/yaws.service	2020-07-07 16:12:02 UTC (rev 659161)
@@ -0,0 +1,13 @@
+[Unit]
+Description=Web server/framework written in Erlang
+After=syslog.target network.target
+
+[Service]
+Type=forking
+GuessMainPID=no
+ExecStart=/usr/bin/yaws --daemon --heart
+ExecReload=/usr/bin/yaws --hup
+ExecStop=/usr/bin/yaws --stop
+
+[Install]
+WantedBy=multi-user.target


More information about the arch-commits mailing list