master chld/ports-heresy / utils / twin / ndmake.sh
 1#!/bin/sh -ue
 2NAME=twin
 3VERSION=git
 4RELEASE=1
 5SOURCE="https://github.com/cosmos72/${NAME}"
 6
 7build(){
 8    
 9    CFLAGS='-static -O3 -pipe' LDFLAGS='-static' ./configure \
10	  --prefix=/ \
11	  --libdir=/lib \
12	  --bindir=/bin \
13	  --enable-silent-rules \
14	  --sbindir=/sbin \
15	  --without-gnu-ld \
16	  --without-x \
17	  --sysconfdir=/etc \
18	  --enable-static \
19	  --enable-server-static=yes \
20	  --disable-hw-x11 \
21	  --disable-hw-xft \
22	  --disable-shared \
23	  --disable-dlopen || die 'configure failed'
24    
25    sed -i 's/gcc/gcc -static/g' `find . -name Makefile -type f`
26    sed -i 's/g++/g++ -static/g' `find . -name Makefile -type f`
27    
28    gmake LDFLAGS='-static -all-static' CFLAGS='-static -O3 -pipe' || die 'gmake failed'
29    gmake LDFLAGS='-static' CFLAGS='-static -O3 -pipe' DESTDIR="$PKG" install || die 'install failed'
30}
31
32. ${0%/*}/../../libsh/libdmake.sh