void-packages/srcpkgs/kcgi/template
2016-12-09 22:18:16 +00:00

37 lines
1.1 KiB
Bash

# Template file for 'kcgi'
pkgname=kcgi
version=0.9.2
revision=1
build_style=gnu-makefile
short_desc="Minimal CGI library for web applications in C"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="ISC"
homepage="http://kristaps.bsd.lv/kcgi/"
distfiles="http://kristaps.bsd.lv/kcgi/snapshots/kcgi-${version}.tgz"
checksum=4f734bd80b7a747bc2aa53b9ba9545b3b3ea2b58866570c17b4d4a3d8aa24f52
post_extract() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
sed -i 's/u_int/uint/g' md5.c md5.h
sed -i '/_DECLS/d' md5.h
sed -i '/#include <string.h>/a\ #include <unistd.h>' auth.c parent.c httpauth.c
sed -i '/#include <stdlib.h>/a\ #include <unistd.h>' sandbox.c
sed -i '/#include <time.h>/a\ #include <sys/types.h>' datetime.c
;;
esac
# do not build new kutil_log(3) interface
sed -i '/logging.[co]/d' GNUmakefile
sed -i '/CC.*-o/s/$/ $(LDFLAGS)/' GNUmakefile
sed -n '2,16p' kcgi.c > LICENSE
}
do_install() {
make \
PREFIX=${DESTDIR}/usr \
SBINDIR=${DESTDIR}/usr/bin \
MAN3DIR=${DESTDIR}/usr/share/man/man3 \
MAN8DIR=${DESTDIR}/usr/share/man/man8 \
install
vlicense LICENSE
}