summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e61f4268688be8378826b5329f8a4c55eb93b276 (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
# 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.7.8
pkgrel=1
url='https://kristaps.bsd.lv/openradtool'
license=(custom:BSD)
makedepends=(bc)
depends=(expat)
conflicts=(kwebapp)
replaces=(kwebapp)
optdepends=('ksql: Needed by code generated by openradtool')
arch=('x86_64')
source=("${url}/snapshots/openradtool-${pkgver}.tar.gz" makefile-ldflags.patch)
sha512sums=('c06d6b5a0e5f6f5039a40e04957163c1f07e380ce8f5b06bb98ede587199eacdc029d4b73ebcbd56fed47a826938e2718e4f62bdc2f0db9459d99dcfb5f066eb'
            '4b77c7b740f8654ac089a5d34154066282b0c74cfc4121039c7e3551897d60f745df83dec9ed1ce178d016e5c9f520781809e0e231988e086a3a07254e5d7466')

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

build () {
	cd "${pkgname}-${pkgver}"
	CFLAGS="${CFLAGS}" ./configure PREFIX=/usr MANDIR=/usr/share/man
	echo "LDFLAGS += ${LDFLAGS}" >> Makefile.configure
	make
}

package () {
	cd "${pkgname}-${pkgver}"
	make 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"
}