summary refs log tree commit diff
path: root/lib2.sh
blob: ea7cbe09a83ab471d3096c214944c9731bd38a33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[ -z "$pkgname" ] && error "pkgname unset"
[ -z "$version" ] && error "version unset"

: ${distfiles:=""}
configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin --mandir=/usr/share/man --infodir=/usr/share/info --libexecdir=/usr/lib --localstatedir=/var ${configure_args}"
: ${makejobs:=-j16}
: ${make_default_target:=all}
: ${make_default_args:=}
: ${CC:=gcc}
: ${CXX:=g++}
: ${CFLAGS:=-O2 -pipe -fstack-protector-strong -fstack-clash-protection -D_FORTIFY_SOURCE=2}
: ${CXXFLAGS:=$CFLAGS}
: ${LDFLAGS:=-Wl,-z,relro -Wl,-z,now}
: ${make_install_target:=install}
: ${make_install_args:=}
: ${DESTDIR:=/dst/$pkgname/$version}

for s in fetch extract configure build check install; do
  verbose pre_$s
  verbose do_$s
  verbose post_$s
done