jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit d0801d5dc4686e2fc343cdd7a942d8c0532d2a78
parent 3cdda3d76f88bd35b40e30e2dd018fefbd6732bd
Author: Jaromil <jaromil@dyne.org>
Date:   Sat,  1 Sep 2012 08:18:44 +0200

better build system for testing

Diffstat:
Mbuild/build-gnu.sh | 182++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 111 insertions(+), 71 deletions(-)

diff --git a/build/build-gnu.sh b/build/build-gnu.sh @@ -10,91 +10,131 @@ pushd .. which apt-get && distro=debian which yum && distro=fedora - +target=all +{ test -z $1 } || { target="$1" } # no other distro supported atm +mkdir -p build/gnu + case $distro in debian) - mkdir -p build/gnu - - echo "Checking software to install..." - which zsh || sudo apt-get install zsh - which mutt || sudo apt-get install mutt - which procmail || sudo apt-get install procmail - which msmtp || sudo apt-get install msmtp - which pinentry || sudo apt-get install pinentry-curses - which fetchmail || sudo apt-get install fetchmail - which wipe || sudo apt-get install wipe - - echo "Checking build dependencies" - which gcc || sudo apt-get install gcc - which bison || sudo apt-get install bison - which flex || sudo apt-get install flex - which sqlite3 || sudo apt-get install sqlite3 - [ -r /usr/share/doc/libgnome-keyring-dev/copyright ] || \ - sudo apt-get install libglib2.0-dev libgnome-keyring-dev - sudo apt-get install libtokyocabinet-dev - echo "All dependencies installed" - pushd src - echo -n "Compiling the address parser... " - - - echo "fetchaddr" - $cc -c fetchaddr.c helpers.c rfc2047.c rfc822.c; \ - $cc -o fetchaddr fetchaddr.o helpers.o rfc2047.o rfc822.o -lbz2 - popd - - echo "Compiling the search engine..." - pushd src/mairix - CC="$cc" ./configure - make > /dev/null - popd - - - echo -n "Compiling the date parser... " - pushd src - $cc -I mairix -c fetchdate.c - $cc -DHAS_STDINT_H -DHAS_INTTYPES_H -DUSE_GZIP_MBOX \ - -o fetchdate fetchdate.o \ - mairix/datescan.o mairix/db.o mairix/dotlock.o \ - mairix/expandstr.o mairix/glob.o mairix/md5.o \ - mairix/nvpscan.o mairix/rfc822.o mairix/stats.o \ - mairix/writer.o mairix/dates.o mairix/dirscan.o \ - mairix/dumper.o mairix/fromcheck.o mairix/hash.o mairix/mbox.o \ - mairix/nvp.o mairix/reader.o mairix/search.o mairix/tok.o \ - -lz -lbz2 - echo "fetchdate" - popd - cp src/mairix/mairix build/gnu/ - cp src/fetchaddr build/gnu/ - cp src/fetchdate build/gnu/ + { test "$target" = "deps" } || { + test "$target" = "all" } && { + echo "Checking software to install..." + which zsh || sudo apt-get install zsh + which mutt || sudo apt-get install mutt + which procmail || sudo apt-get install procmail + which msmtp || sudo apt-get install msmtp + which pinentry || sudo apt-get install pinentry-curses + which fetchmail || sudo apt-get install fetchmail + which wipe || sudo apt-get install wipe + + echo "Checking build dependencies" + which gcc || sudo apt-get install gcc + which bison || sudo apt-get install bison + which flex || sudo apt-get install flex + which sqlite3 || sudo apt-get install sqlite3 + [ -r /usr/share/doc/libgnome-keyring-dev/copyright ] || \ + sudo apt-get install libglib2.0-dev libgnome-keyring-dev + sudo apt-get install libtokyocabinet-dev + echo "All dependencies installed" + } + + { test "$target" = "dotlock" } || { + test "$target" = "all" } && { + pushd src + echo -n "Compiling the file lock utility... " + $cc -o dotlock dotlock.c + popd + } + + { test "$target" = "fetchaddr" } || { + test "$target" = "all" } && { + pushd src + echo -n "Compiling the address parser... " + $cc -c fetchaddr.c helpers.c rfc2047.c rfc822.c; + $cc -o fetchaddr fetchaddr.o helpers.o rfc2047.o rfc822.o -lbz2 + popd + cp src/fetchaddr build/gnu/ + } + + { test "$target" = "mairix" } || { + test "$target" = "all" } && { + echo "Compiling the search engine..." + pushd src/mairix + CC="$cc" ./configure > /dev/null + make > make.log + popd + cp src/mairix/mairix build/gnu/ + } + + { test "$target" = "fetchdate" } && { + echo -n "Compiling the date parser... " + pushd src + $cc -I mairix -c fetchdate.c + $cc -DHAS_STDINT_H -DHAS_INTTYPES_H -DUSE_GZIP_MBOX \ + -o fetchdate fetchdate.o \ + mairix/datescan.o mairix/db.o mairix/dotlock.o \ + mairix/expandstr.o mairix/glob.o mairix/md5.o \ + mairix/nvpscan.o mairix/rfc822.o mairix/stats.o \ + mairix/writer.o mairix/dates.o mairix/dirscan.o \ + mairix/dumper.o mairix/fromcheck.o mairix/hash.o mairix/mbox.o \ + mairix/nvp.o mairix/reader.o mairix/search.o mairix/tok.o \ + -lz -lbz2 + popd + cp src/fetchdate build/gnu/ + } + + + + { test "$target" = "gnome-keyring" } || { + test "$target" = "all" } && { + echo "Compiling gnome-keyring" + pushd src/gnome-keyring + $cc jaro-gnome-keyring.c -o jaro-gnome-keyring \ + `pkg-config --cflags --libs glib-2.0 gnome-keyring-1` + popd + cp src/gnome-keyring/jaro-gnome-keyring build/gnu/ + } + + { test "$target" = "mutt" } || { + test "$target" = "all" } && { + echo "Compiling Mutt (MUA)" + pushd src/mutt-1.5.21 + CC="$cc" ./configure \ + --with-ssl --with-gnutls --enable-imap --disable-debug --with-slang \ + --enable-hcache --with-regex --with-tokyocabinet --with-mixmaster \ + --with-mailpath=Mail --with-homespool=Mail/known --with-exec-shell=/usr/bin/zsh \ + > /dev/null + make > make.log + popd + cp src/mutt-1.5.21/mutt build/gnu/mutt-jaro + } + + { test "$target" = "mixmaster" } && { + echo "Compiling Mixmaster (anonymous remailer)" + pushd src/mixmaster-3.0/Src + mixmaster_sources=(main menustats mix rem rem1 rem2 chain chain1 chain2 nym) + mixmaster_sources+=(pgp pgpdb pgpdata pgpget pgpcreat pool mail rfc822 mime keymgt) + mixmaster_sources+=(compress stats crypto random rndseed util buffers maildir parsedate.tab) + bison parsedate.y + for s in ${=mixmaster_sources}; do ${=cc} -c ${s}.c; done + ${=cc} -o mixmaster *.o -lssl + popd + cp src/mixmaster-3.0/Src/mixmaster build/gnu + } - echo "Compiling gnome-keyring" - pushd src/gnome-keyring - $cc jaro-gnome-keyring.c -o jaro-gnome-keyring \ - `pkg-config --cflags --libs glib-2.0 gnome-keyring-1` - popd - cp src/gnome-keyring/jaro-gnome-keyring build/gnu/ - echo "Compiling mutt" - pushd src/mutt-1.5.21 - CC="$cc" ./configure \ - --with-ssl --with-gnutls --enable-imap --disable-debug --with-slang \ - --enable-hcache --with-regex --with-tokyocabinet --with-mixmaster \ - --with-mailpath=Mail --with-homespool=Mail/known --with-exec-shell=/usr/bin/zsh - make > /dev/null - popd - cp src/mutt-1.5.21/mutt build/gnu/mutt-jaro echo "Done compiling." echo "Now run ./install.sh and Jaro Mail will be ready in ~/Mail" echo "or \"./install.sh path\" to install it somewhere else." ;; - + fedora) - mkdir -p build/gnu + echo "Checking software to install..." which zsh || sudo yum install zsh