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 483b0da4d14b2fada3e58b3e5dbf2450b194cd0a
parent b6940fa1e09d088aeb1a7e3d85f1ccfbcf977812
Author: Jaromil <jaromil@dyne.org>
Date:   Sat, 16 Jun 2012 16:44:48 +0200

build fixes on gnu systems (10x hk)

Diffstat:
M.gitignore | 3+++
Mbuild/build-gnu.sh | 37+++++++++++++++++++++++--------------
Dsrc/mairix/Makefile | 114-------------------------------------------------------------------------------
Dsrc/mairix/config.log | 14--------------
4 files changed, 26 insertions(+), 142 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -2,3 +2,5 @@ *.o dotlock fetchaddr +src/mairix/Makefile +src/mairix/config.log+ \ No newline at end of file diff --git a/build/build-gnu.sh b/build/build-gnu.sh @@ -11,6 +11,7 @@ which apt-get && distro=debian 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 @@ -19,14 +20,26 @@ case $distro in 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 bison + which bison || sudo apt-get install bison + which flex || sudo apt-get install bison + [ -r /usr/share/doc/libgnome-keyring-dev/copyright ] || \ + sudo apt-get install libglib2.0-dev libgnome-keyring-dev + echo "All dependencies installed" + echo -n "Compiling the address parser... " + cd src echo -n "fetchaddr " [ -x fetchaddr ] || \ gcc -Os -c -static fetchaddr.c helpers.c rfc2047.c rfc822.c; \ - gcc -Os -static -o fetchaddr fetchaddr.o helpers.o rfc2047.o rfc822.o; + gcc -Os -static -o fetchaddr fetchaddr.o helpers.o rfc2047.o rfc822.o + cd - > /dev/null + cp src/fetchaddr build/gnu/ echo echo "Compiling the search engine..." @@ -35,18 +48,15 @@ case $distro in make > /dev/null cd - > /dev/null cp src/mairix/mairix build/gnu/ - if [ -r /usr/bin/gnome-keyring ]; then - echo "Compiling gnome-keyring, need to install -dev packages" - sudo apt-get install libglib2.0-dev libgnome-keyring-dev - cd src/gnome-keyring -# [ -x jaro-gnome-keyring ] || \ - gcc jaro-gnome-keyring.c \ - `pkg-config --cflags --libs glib-2.0 gnome-keyring-1` \ - -O2 -o jaro-gnome-keyring - cd - > /dev/null - cp src/gnome-keyring/jaro-gnome-keyring build/gnu/ - fi - + + echo "Compiling gnome-keyring" + cd src/gnome-keyring + gcc jaro-gnome-keyring.c \ + `pkg-config --cflags --libs glib-2.0 gnome-keyring-1` \ + -O2 -o jaro-gnome-keyring + cd - > /dev/null + cp src/gnome-keyring/jaro-gnome-keyring build/gnu/ + 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." @@ -56,4 +66,3 @@ case $distro in echo "Error: no distro recognized, build by hand." ;; esac - diff --git a/src/mairix/Makefile b/src/mairix/Makefile @@ -1,114 +0,0 @@ -######################################################################### -# -# mairix - message index builder and finder for maildir folders. -# -# Copyright (C) Richard P. Curnow 2002-2004,2006 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# ======================================================================= - -######################################################################### -# Edit the following variables as required -CC=gcc -CFLAGS=-O2 -Wall -DHAS_STDINT_H -DHAS_INTTYPES_H -DUSE_GZIP_MBOX -DUSE_BZIP_MBOX -CPPFLAGS= -LDFLAGS= -LIBS=-lz -lbz2 - -####################################################################### -# If you're generating a package, you may want to use -# make DESTDIR=temporary_dir install -# to get the software installed to a directory where you can create -# a tdl.tar.gz from it -DESTDIR= - -####################################################################### - -prefix=$(DESTDIR)/usr/local -bindir=$(DESTDIR)/usr/local/bin -mandir=$(DESTDIR)/usr/local/man -man1dir=$(mandir)/man1 -man5dir=$(mandir)/man5 -infodir=$(DESTDIR)/usr/local/info -docdir=$(DESTDIR)/usr/local/doc/mairix-0.23 - -######################################################################### -# Things below this point shouldn't need to be edited. - -OBJ = mairix.o db.o rfc822.o tok.o hash.o dirscan.o writer.o \ - reader.o search.o stats.o dates.o datescan.o mbox.o md5.o \ - fromcheck.o glob.o dumper.o expandstr.o dotlock.o \ - nvp.o nvpscan.o - -all : mairix - -mairix : $(OBJ) - $(CC) -o mairix $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) - -%.o : %.c memmac.h mairix.h reader.h Makefile - $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< - -datescan.c datescan.h : datescan.nfa ./dfasyn/dfasyn - ./dfasyn/dfasyn -o datescan.c -ho datescan.h -r datescan.report -u datescan.nfa - -fromcheck.c fromcheck.h : fromcheck.nfa ./dfasyn/dfasyn - ./dfasyn/dfasyn -o fromcheck.c -ho fromcheck.h -r fromcheck.report -u fromcheck.nfa - -nvpscan.c nvpscan.h : nvp.nfa ./dfasyn/dfasyn - ./dfasyn/dfasyn -o nvpscan.c -ho nvpscan.h -r nvpscan.report -u nvp.nfa - -dates.o : datescan.h -mbox.o : fromcheck.h -nvp.o : nvpscan.h - -version.h: - ./mkversion - -./dfasyn/dfasyn: - if [ -d dfasyn ]; then cd dfasyn ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" ; else echo "No dfasyn subdirectory?" ; exit 1 ; fi - -clean: - -rm -f *~ *.o mairix *.s core - -rm -f mairix.cp mairix.fn mairix.aux mairix.log mairix.ky mairix.pg mairix.toc mairix.tp mairix.vr - -rm -f fromcheck.[ch] datescan.[ch] - -rm -f nvpscan.[ch] - if [ -d dfasyn ]; then cd dfasyn ; $(MAKE) clean ; fi - if [ -d test ]; then cd test ; $(MAKE) clean ; fi - -distclean: clean - if [ -d test ]; then cd test ; $(MAKE) distclean ; fi - -rm -f Makefile config.log - -install: - [ -d $(prefix) ] || mkdir -p $(prefix) - [ -d $(bindir) ] || mkdir -p $(bindir) - [ -d $(mandir) ] || mkdir -p $(mandir) - [ -d $(man1dir) ] || mkdir -p $(man1dir) - [ -d $(man5dir) ] || mkdir -p $(man5dir) - cp -f mairix $(bindir) - chmod 555 $(bindir)/mairix - cp -f mairix.1 $(man1dir) - chmod 444 $(man1dir)/mairix.1 - cp -f mairixrc.5 $(man5dir) - chmod 444 $(man5dir)/mairixrc.5 - -check: mairix - if [ -d test ]; then cd test ; $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" check ; else echo "No test subdirectory?" ; exit 1 ; fi - -.PHONY : all install clean distclean check - -mairix.o : version.h - - diff --git a/src/mairix/config.log b/src/mairix/config.log @@ -1,14 +0,0 @@ -Test program is -#include <zlib.h> -int main () { - const char *foo; - foo = zlibVersion(); - return 0; -} -Test program is -#include <bzlib.h> -int main () { - const char *foo; - foo = BZ2_bzlibVersion(); - return 0; -}