-
Notifications
You must be signed in to change notification settings - Fork 58
/
build.sh
executable file
·72 lines (61 loc) · 1.72 KB
/
build.sh
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
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}
# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
. ../../lib/build.sh
PROG=fcgiwrap
VER=1.1.0
PKG=ooce/application/fcgiwrap
SUMMARY="Simple FastCGI wrapper for CGI scripts"
DESC="fcgiwrap is a simple server for running CGI applications \
over FastCGI. It hopes to provide clean CGI support to Nginx \
(and other web servers that may need it)."
set_arch 64
XFORM_ARGS="
-DPREFIX=${PREFIX#/}
-DPROG=$PROG
-DVER=$VER
"
BUILD_DEPENDS_IPS+="
ooce/library/fcgi2
"
# The packaged Makefile.in will install the final binary into
# $(prefix)$(sbindir) so override the fully-qualified --sbindir that comes
# in from the framework. configure does check if the argument is fully
# qualified hence the leading /
CONFIGURE_OPTS="
--without-systemd
--sbindir=/sbin
"
# configure does not properly use pkg-config for these.
CFLAGS+=" -I$PREFIX/include"
LDFLAGS[amd64]+=" -L$PREFIX/lib/amd64 -R$PREFIX/lib/amd64 -lsocket"
extract_licence() {
logmsg "-- extracting licence"
pushd $TMPDIR/$BUILDDIR > /dev/null
sed '/^$/q' < $PROG.c > LICENCE
popd > /dev/null
}
init
download_source $PROG $VER
extract_licence
patch_source
run_autoreconf -i
prep_build
build
strip_install
install_smf application $PROG.xml
make_package
clean_up
# Vim hints
# vim:ts=4:sw=4:et:fdm=marker