PKGBUILDs/community/yaws/PKGBUILD

58 lines
1.6 KiB
Bash
Raw Normal View History

2012-12-01 22:03:28 +00:00
# $Id$
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
2013-04-20 23:12:15 +00:00
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
2012-12-01 22:03:28 +00:00
# Contributor: Patrick Smits <mail@patricksmits.net>
2012-11-29 16:18:16 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.com>
# - remove -m32 command from configure
pkgname=yaws
2014-12-08 14:23:04 +00:00
pkgver=1.99
2014-12-11 22:08:30 +00:00
pkgrel=2
2013-11-04 12:12:30 +00:00
pkgdesc='Pure Erlang HTTP web server/framework'
arch=('x86_64' 'i686')
url='http://yaws.hyber.org/'
license=('BSD')
2013-08-01 13:55:27 +00:00
depends=('pam' 'erlang-nox')
backup=('etc/yaws/yaws.conf')
options=('!emptydirs')
2013-11-04 12:12:30 +00:00
install="$pkgname.install"
2012-12-01 22:03:28 +00:00
source=("http://yaws.hyber.org/download/$pkgname-$pkgver.tar.gz"
"$pkgname.service")
2014-12-08 14:23:04 +00:00
sha256sums=('94f1ef7c588c2c864c0755c565bdd0f3a359878ed344d54774974449d0abfe14'
2013-11-04 12:12:30 +00:00
'09bd1f9f17833c83b4d82d3ac9dc2bf539c8e20ef92d438fced6e70b2aea61bc')
2013-04-20 23:12:15 +00:00
prepare() {
cd "$pkgname-$pkgver"
2013-01-17 17:03:20 +00:00
# python2 fix
for file in cgi.yaws cgi-bin/foo.py; do
sed -i '0,/on/s//on2/' "www/$file"
done
2013-08-01 13:55:27 +00:00
# R16B1 fix
sed -i 's/:sha(Salted)/:hash(sha, Salted)/' src/yaws_websockets.erl
2014-12-11 22:08:30 +00:00
# hostname/config fix
sed -i 's/%host%/\*/g' scripts/yaws.conf.template
2013-04-20 23:12:15 +00:00
# remove m32
sed -i 's/\-m32//g' configure
}
build() {
cd "$pkgname-$pkgver"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
}
package() {
2013-11-04 12:12:30 +00:00
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"
2013-11-04 12:12:30 +00:00
install -Dm644 "$pkgname.service" \
2012-12-01 22:03:28 +00:00
"$pkgdir/usr/lib/systemd/system/$pkgname.service"
2013-11-04 12:12:30 +00:00
install -Dm644 "$pkgname-$pkgver/LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: