--- parser3/buildall 2012/07/19 15:05:19 1.2 +++ parser3/buildall 2012/10/19 10:47:24 1.6 @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: buildall,v 1.2 2012/07/19 15:05:19 moko Exp $ +# $Id: buildall,v 1.6 2012/10/19 10:47:24 moko Exp $ install_directory=$HOME/parser3install sendmail_command="/usr/sbin/sendmail -i -t -f postmaster" @@ -11,11 +11,11 @@ project_dir=`pwd` build_xml="yes" build_gmime="" build_apache="" +build_stripped="" options="--with-included-ltdl" options="$options --with-gc=$project_dir/gc/lib" options="$options --with-pcre=$project_dir/pcre" -#options="$options --disable-safe-mode" #options="$options --disable-stringstream" echo -n "Building statically linked parser3" @@ -35,9 +35,13 @@ for PARAM; do options="$options --with-mailreceive=$project_dir/gnome" build_gmime="yes" ;; + "--strip") + echo -n ", without debug information" + build_stripped="yes" + ;; "--help") echo - echo "Usage: buildall [--without-xml] [--with-apache] [--with-mailreceive] [other configure options ...]" + echo "Usage: buildall [--without-xml] [--with-apache] [--with-mailreceive] [--strip] [--disable-safe-mode] [other configure options ...]" exit 1 ;; *) @@ -70,7 +74,7 @@ fi ############################### Support functions ################################ -prepare.gz () { +prepare_gz () { cd $project_dir/src if test ! -f "$lib.tar.gz"; then @@ -84,7 +88,7 @@ prepare.gz () { cd $lib } -prepare.xz () { +prepare_xz () { cd $project_dir/src if test ! -f "$lib.tar.xz"; then @@ -111,7 +115,7 @@ mkdir src >/dev/null 2>&1 if test ! -f "$project_dir/gc/lib/libgc.a"; then # libgc="gc6.8" # FreeBSD 4.X is not supported in newer gc version lib="gc-7.1" - prepare.gz gc http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$lib.tar.gz + prepare_gz gc http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$lib.tar.gz echo "Configuring gc..." CPPFLAGS="-DUSE_LIBC_PRIVATES -DUSE_MMAP -DDONT_ADD_BYTE_AT_END" \ ./configure --prefix=$project_dir/gc \ @@ -125,7 +129,7 @@ fi if test ! -f "$project_dir/pcre/lib/libpcre.a"; then lib="pcre-8.30" - prepare.gz pcre ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz + prepare_gz pcre ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$lib.tar.gz echo "Configuring pcre..." ./configure --prefix="$project_dir/pcre" \ --with-match-limit-recursion=10000 \ @@ -143,7 +147,7 @@ fi if test "$build_xml" = "yes" -a ! -f "$project_dir/gnome/lib/libxml2.a"; then lib="libxml2-2.8.0" - prepare.gz libxml ftp://xmlsoft.org/libxml2/$lib.tar.gz + prepare_gz libxml ftp://xmlsoft.org/libxml2/$lib.tar.gz #sax1, output, tree, xinclude[in libxslt], html[in libxslt, mode=html?], xptr[xinclude], pattern -- needed! echo "Configuring libxml..." ./configure --prefix=$project_dir/gnome \ @@ -176,7 +180,7 @@ fi if test "$build_xml" = "yes" -a ! -f "$project_dir/gnome/lib/libxslt.a"; then lib="libxslt-1.1.26" - prepare.gz libxslt ftp://xmlsoft.org/libxslt/$libxslt.tar.gz + prepare_gz libxslt ftp://xmlsoft.org/libxslt/$lib.tar.gz echo "Configuring libxslt..." ./configure --prefix=$project_dir/gnome \ --with-libxml-prefix=$project_dir/gnome \ @@ -206,13 +210,12 @@ fi if test ! -f "$project_dir/gnome/lib/libglib-2.0.a"; then lib="glib-2.28.8" - prepare.xz glib ftp://ftp.gnome.org/pub/GNOME/sources/glib/2.28/$lib.tar.xz + prepare_xz glib ftp://ftp.gnome.org/pub/GNOME/sources/glib/2.28/$lib.tar.xz echo "Configuring glib..." ./configure --prefix=$project_dir/gnome \ --enable-dtrace=no \ --enable-debug=no \ --enable-iconv-cache=no \ - --disable-threads \ --disable-fam \ --disable-selinux \ --disable-xattr \ @@ -226,7 +229,7 @@ fi if test ! -f "$project_dir/gnome/lib/libgmime-2.4.a"; then lib="gmime-2.4.32" - prepare.xz gmime ftp://ftp.gnome.org/pub/GNOME/sources/gmime/2.4/$libgmime.tar.xz + prepare_xz gmime ftp://ftp.gnome.org/pub/GNOME/sources/gmime/2.4/$lib.tar.xz echo "Configuring gmime..." ./configure --prefix=$project_dir/gnome \ --disable-glibtest \ @@ -242,17 +245,18 @@ fi fi cd $parser3_dir -#if test ! -f "Makefile"; then +if test ! -f "Makefile"; then echo "Configuring parser3..." ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options --silent $cflags $gmime_cflags -#fi +fi echo "Building parser3..." make install if test $? -ne 0; then exit 1; fi -#remove debug info -#strip ${install_directory}/bin/parser3 +if test "$build_stripped" = "yes"; then + strip ${install_directory}/bin/parser3 +fi echo "DONE" echo