master hovercats/oakiss / repo / perl / build
 1#!/bin/sh -e
 2
 3export LDFLAGS="$LDFLAGS -pthread"
 4export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE"
 5
 6./Configure \
 7    -des \
 8    -Dprefix=/usr \
 9    -Dvendorprefix=/usr \
10    -Dusevendorprefix \
11    -Duseshrplib \
12    -Dusesoname \
13    -Dusethreads \
14    -Dinc_version_list=none \
15    -Dd_sockaddr_in6=define \
16    -Dcccdlflags=-fPIC \
17    -Dccflags="$CFLAGS" \
18    -Dlddlflags="-shared $LDFLAGS" \
19    -Dldflags="$LDFLAGS" \
20    -Doptimize="-Wall $CFLAGS" \
21    -Dcc="$CC" \
22    -Dar="$AR" \
23    -Dnm="$NM" \
24    -Dranlib="$RANLIB" \
25    -Dman1ext=1 \
26    -Dman3ext=3pm \
27    -Dperl_static_inline="static __inline__" \
28    -Dd_static_inline \
29    -DNO_ZLIB \
30    -DNO_BZLIB
31
32make
33make DESTDIR="$1" install.perl
34
35# Remove all unneeded files.
36find "$1" -name \*.pod       -exec rm -f {} +
37find "$1" -name .packlist    -exec rm -f {} +
38find "$1" -name README\*     -exec rm -f {} +
39find "$1" -name TODO\*       -exec rm -f {} +
40find "$1" -name Change\*     -exec rm -f {} +
41find "$1" -name \*.bs        -exec rm -f {} +
42find "$1" -name \*.0 -type f -exec rm -f {} +