summaryrefslogtreecommitdiffstats
path: root/testing/hiawatha/APKBUILD
blob: ba1fc411f6c88ebde4854ee2b6b5526e36eef6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer: Kurt Marasco <celilo at lavabit dot com>
# Contributor: Pascal Ernster <aur at hardfalcon dot net>

pkgname=hiawatha
pkgver=9.6
pkgrel=0
pkgdesc='Secure and advanced webserver'
url='https://www.hiawatha-webserver.org/'
arch=all
license='GPL'
subpackages="$pkgname-doc"
makedepends="cmake libxml2-dev libxslt-dev"
source="https://hiawatha-webserver.org/files/$pkgname-$pkgver.tar.gz
        hiawatha.initd
        hiawatha.conf.sample"

build() {
  cd "$srcdir"/$pkgname-$pkgver
        
  cmake . -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_BINDIR=/usr/bin \
    -DCMAKE_INSTALL_SBINDIR=/usr/sbin \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc/hiawatha \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCMAKE_INSTALL_MANDIR=/usr/share/man \
    -DCONFIG_DIR=/etc/hiawatha \
    -DLOG_DIR=/var/log/hiawatha \
    -DPID_DIR=/var/run \
    -DENABLE_SSL=ON \
    -DWEBROOT_DIR=/var/www/hiawatha \
    -DWORK_DIR=/var/lib/hiawatha || return 1

    make || return 1
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  make DESTDIR="$pkgdir/" install || return 1
	
  sed -i 's|#ServerId = www-data|ServerId = nobody|' \
    "$pkgdir"/etc/hiawatha/hiawatha.conf || return 1
  sed -i 's|www-data|nobody|g' logrotate.d/hiawatha || return 1
  install -Dm644 logrotate.d/hiawatha \
    "$pkgdir"/etc/logrotate.d/hiawatha || return 1
  install -Dm755 "$srcdir"/hiawatha.initd \
    "$pkgdir"/etc/init.d/hiawatha || return 1
  install -Dm644 "$srcdir"/hiawatha.conf.sample \
    "$pkgdir"/usr/share/doc/hiawatha/hiawatha.conf.sample || return 1
}

md5sums="f43c98a8ed19c586ff5798f58689fcfd  hiawatha-9.6.tar.gz
3bf112b794aa10debb93b5d892dfa425  hiawatha.initd
fb24fcbfa820a5b85f6c4c8a520a6920  hiawatha.conf.sample"
sha256sums="13132fdb322a8d222f7fa25fa19b5485fcdf7a9568fbe4a52c99905571a75a45  hiawatha-9.6.tar.gz
c229c23712d71cf830a46f152f78a1aa726cf7c7cf9129ef7acfefb73483ae4c  hiawatha.initd
4671d2586cbe3cd6497b16ff422c6143cdab40641ef3c9c4988c478351a8f5e7  hiawatha.conf.sample"
sha512sums="0b5967fc4661baa5f18ab6889aa739d3733b634ddfb01b3dc38df1e9b5da3811060d2b988af43bdece7468c768707736fec303a37e0f51a1aaab6dec9dd7e736  hiawatha-9.6.tar.gz
412ba77b765015dccf6804d0ef06c55590b7dbec0bf3beb18652e05ae0efc364061bb8892e9727d2a7ac5df93656b62bcb89448dfa4272ae6ae26c633523b17a  hiawatha.initd
b2aad6d02e03a3e25dc6dc30deab4637a7de5448255b6b707363e8c71ae1029e669bacdb6b88889ec1aa804fe717560e872dc44d049127af9aa155a8895c8a60  hiawatha.conf.sample"