summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2066a6034040e4ea471fa30482e80beb47a59912 (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
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
pkgname=openradtool
pkgdesc='Generator for front-end and back-end code for Web applications written in C'
pkgver=0.8.10
pkgrel=1
url='https://kristaps.bsd.lv/openradtool'
license=(custom:BSD)
makedepends=(bc bmake)
depends=(expat)
conflicts=(kwebapp)
replaces=(kwebapp)
optdepends=('sqlbox: Needed by code generated by openradtool')
arch=('x86_64')
source=("${url}/snapshots/openradtool-${pkgver}.tar.gz" makefile-ldflags.patch)
sha512sums=('37773d248c6a6c7c8bfcd97f5217fc517c2eb9adf587ab3daffd7555bc3416f06696afe33a68bc7d38586010d24b87115754cd54a93eb7e790ecf397b6bdecee'
            'f09505fffbe3d732880a1b95ca46c57d385ed70d15b1158cdc525f2a0887ef81e0f521bbf5a75348d03f8404586b99eb179b21b94a62312801cf284ca302bb52')

prepare () {
	cd "${pkgname}-${pkgver}"
	patch -p1 < "${srcdir}/makefile-ldflags.patch"
}

build () {
	cd "${pkgname}-${pkgver}"
	CFLAGS="${CFLAGS}" ./configure PREFIX=/usr MANDIR=/usr/share/man LDFLAGS="${LDFLAGS}"
	bmake
}

package () {
	cd "${pkgname}-${pkgver}"
	bmake install DESTDIR="${pkgdir}"
	strip -x --strip-unneeded "${pkgdir}"/usr/bin/ort*
	awk '/^\/\*/,/\*\// { print ; }' main.c > COPYING
	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}