PKGBUILDs/community/yaws/PKGBUILD
2014-04-08 12:46:00 +00:00

56 lines
1.5 KiB
Bash

# $Id$
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Patrick Smits <mail@patricksmits.net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.com>
# - remove -m32 command from configure
pkgname=yaws
pkgver=1.98
pkgrel=1
pkgdesc='Pure Erlang HTTP web server/framework'
arch=('x86_64' 'i686')
url='http://yaws.hyber.org/'
license=('BSD')
depends=('pam' 'erlang-nox')
backup=('etc/yaws/yaws.conf')
options=('!emptydirs')
install="$pkgname.install"
source=("http://yaws.hyber.org/download/$pkgname-$pkgver.tar.gz"
"$pkgname.service")
sha256sums=('d47d14cce5173d18e5cf0e7f63b06447021ff250450ac4865547c1fe8e6a0831'
'09bd1f9f17833c83b4d82d3ac9dc2bf539c8e20ef92d438fced6e70b2aea61bc')
prepare() {
cd "$pkgname-$pkgver"
# python2 fix
for file in cgi.yaws cgi-bin/foo.py; do
sed -i '0,/on/s//on2/' "www/$file"
done
# R16B1 fix
sed -i 's/:sha(Salted)/:hash(sha, Salted)/' src/yaws_websockets.erl
# remove m32
sed -i 's/\-m32//g' configure
}
build() {
cd "$pkgname-$pkgver"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
}
package() {
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
install -d "$pkgdir/usr/lib/erlang/lib"
ln -s /usr/lib/yaws "$pkgdir/usr/lib/erlang/lib/$pkgname-$pkgver"
install -Dm644 "$pkgname.service" \
"$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$pkgname-$pkgver/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: