]> git.armaanb.net Git - asd-repo.git/blob - extra/perl/build
perl: move to extra
[asd-repo.git] / extra / perl / build
1 #!/bin/sh -e
2
3 export BUILD_ZLIB=0
4 export BUILD_BZIP2=0
5 export LDFLAGS="$LDFLAGS -pthread"
6 export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE"
7
8 ./Configure \
9     -des \
10     -Dprefix=/usr \
11     -Dvendorprefix=/usr \
12     -Dusevendorprefix \
13     -Duseshrplib \
14     -Dusesoname \
15     -Dusethreads \
16     -Dinc_version_list=none \
17     -Dd_sockaddr_in6=define \
18     -Dcccdlflags=-fPIC \
19     -Dccflags="$CFLAGS" \
20     -Dlddlflags="-shared $LDFLAGS" \
21     -Dldflags="$LDFLAGS" \
22     -Doptimize="-Wall $CFLAGS" \
23     -Dcc="${CC:-cc}" \
24     -Dar="${AR:-ar}" \
25     -Dnm="${NM:-nm}" \
26     -Dranlib="${RANLIB:-ranlib}" \
27     -Dperl_static_inline="static __inline__" \
28     -Dd_static_inline
29
30 make
31 make DESTDIR="$1" install
32
33 # Remove all unneeded files.
34 find "$1" -name \*.pod       -exec rm -f {} +
35 find "$1" -name .packlist    -exec rm -f {} +
36 find "$1" -name README\*     -exec rm -f {} +
37 find "$1" -name TODO\*       -exec rm -f {} +
38 find "$1" -name Change\*     -exec rm -f {} +
39 find "$1" -name \*.bs        -exec rm -f {} +
40 find "$1" -name \*.0 -type f -exec rm -f {} +
41
42 # Fix permissions.
43 find "$1/usr/lib" -type f -exec chmod 644 {} \;