commit ee055bb641d8b61cc6cfe73b79ad96061174f6a9
parent 4c583dbfc99afa4fbc83756785dae5583ac62e12
Author: Jaromil <jaromil@dyne.org>
Date: Mon, 18 Jun 2012 12:58:48 +0200
build and install fixes
Diffstat:
5 files changed, 105 insertions(+), 124 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,6 +3,7 @@
*.zwc
dotlock
fetchaddr
+fetchdate
src/mairix/Makefile
src/mairix/config.log
src/mairix/mairix
diff --git a/build/build-gnu.sh b/build/build-gnu.sh
@@ -38,8 +38,17 @@ case $distro in
echo "fetchaddr"
gcc $cflags -c fetchaddr.c helpers.c rfc2047.c rfc822.c; \
gcc $cflags -o fetchaddr fetchaddr.o helpers.o rfc2047.o rfc822.o
+ cd - > /dev/null
+
+ echo "Compiling the search engine..."
+ cd src/mairix
+ ./configure
+ make > /dev/null
+ cd - > /dev/null
+
echo -n "Compiling the date parser... "
+ cd src
gcc $cflags -I mairix -c fetchdate.c
gcc $cflags -DHAS_STDINT_H -DHAS_INTTYPES_H -DUSE_GZIP_MBOX \
-o fetchdate fetchdate.o \
@@ -49,23 +58,14 @@ case $distro in
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
+ -lz
echo "fetchdate"
-
-
cd - > /dev/null
+ cp src/mairix/mairix build/gnu/
cp src/fetchaddr build/gnu/
cp src/fetchdate build/gnu/
- echo
- echo "Compiling the search engine..."
- cd src/mairix
- ./configure
- make > /dev/null
- cd - > /dev/null
- cp src/mairix/mairix build/gnu/
-
echo "Compiling gnome-keyring"
cd src/gnome-keyring
gcc jaro-gnome-keyring.c \
diff --git a/install.sh b/install.sh
@@ -204,8 +204,8 @@ fi
# our own libraries
act "Compiling Jaro Mail ZLibs"
+{ test -d ${WORKDIR}/zlibs } && { rm -f $WORKDIR/zlibs/* }
${=mkdir} $WORKDIR/zlibs
-rm -f $WORKDIR/zlibs/*
cp -a src/zlibs/* $WORKDIR/zlibs
for z in `find $WORKDIR/zlibs -type f`; do
zcompile -R ${z}
diff --git a/src/jaro b/src/jaro
@@ -122,7 +122,7 @@ ${=mkdir} $WORKDIR
chmod 700 $WORKDIR
PATH=$WORKDIR/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/local/bin
-
+{ test -r $WORKDIR/zlibs/accounts } && {
# load our ZLibs
. $WORKDIR/zlibs/accounts
. $WORKDIR/zlibs/addressbook
@@ -134,6 +134,7 @@ PATH=$WORKDIR/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/local/bin
. $WORKDIR/zlibs/password
. $WORKDIR/zlibs/search
. $WORKDIR/zlibs/stats
+}
# temporary directory
TMPDIR=$WORKDIR/tmp
@@ -209,6 +210,96 @@ TRAPINT() {
else exit 1; fi
}
+
+check_bin() {
+ # check for required programs
+ for req in pinentry fetchmail procmail mutt; do
+ which $req >/dev/null
+ { test $? != 0 } && {
+ error "Cannot find $req. Please install it."
+ return 1
+ }
+ done
+
+ # which wipe command to use
+ which wipe > /dev/null
+ { test $? = 0 } && {
+ rm="wipe -f -s -q -R /dev/urandom"; return 0 }
+ which srm > /dev/null
+ { test $? = 0 } && {
+ rm="srm -m"; return 0 }
+ rm="rm -f"
+ return 0
+}
+
+
+option_is_set() {
+ #First argument, the option (something like "-s")
+ #Second (optional) argument: if it's "out", command will print it out 'set'/'unset'
+ # This is useful for if conditions
+ #Return 0 if is set, 1 otherwise
+ [[ -n ${(k)opts[$1]} ]];
+ r=$?
+ if [[ $2 == out ]]; then
+ if [[ $r == 0 ]]; then
+ echo 'set'
+ else
+ echo 'unset'
+ fi
+ fi
+ return $r;
+}
+option_value() {
+ #First argument, the option (something like "-s")
+ <<< ${opts[$1]}
+}
+
+
+usage() {
+ cat <<EOF
+Jaro Mail $VERSION - your humble and faithful electronic postman
+
+ Copyright (C) 2010-2012 Dyne.org Foundation, License GNU GPL v3+
+ This is free software: you are free to change and redistribute it
+ The latest Jaro Mail sourcecode is on <http://jaromail.dyne.org>
+
+Synopsis: jaro [options] [command] [command-options]
+
+Main commands:
+
+ fetch download unread emails from [account]
+ send send all mails queued in the outbox
+ peek look into the [account] mailbox without downloading
+
+Options:
+
+ -a use a particular account instead of default (keyword)
+ -l whitelist or blacklist to use with learn/query/forget
+ -h print this help
+ -v version information for this tool
+ -q run quietly without printing informations
+ -n dry run, show operations without executing them
+ -D print debugging information at runtime
+
+Maintenance commands:
+
+ passwd reset password for the account in use
+
+ update refresh configurations
+ queue add a mail into outbox
+
+ addr look for a matching address in list
+ query read mail from stdin, return 0 if known to list
+ learn learn addresses from mails piped in stdin
+ forget remove addresses found in mails piped in stdin
+
+ backup move all mails older than N days from a maildir to another
+ rmdupes remove all duplicate mails into a maildir
+ merge merge a maildir into another, removing all duplicates
+
+Please report bugs on <http://bugs.dyne.org>.
+EOF
+}
# TODO: For more informations on Jaro Mail read the manual: man jaro
diff --git a/src/zlibs/cmdline b/src/zlibs/cmdline
@@ -1,111 +0,0 @@
-#!/usr/bin/env zsh
-#
-# Jaro Mail, your humble and faithful electronic postman
-#
-# a tool to easily and privately handle your e-mail communication
-#
-# Copyleft (C) 2010-2012 Denis Roio <jaromil@dyne.org>
-#
-# This source code is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This source code 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.
-# Please refer to the GNU Public License for more details.
-#
-# You should have received a copy of the GNU Public License along with
-# this source code; if not, write to:
-# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-check_bin() {
- # check for required programs
- for req in pinentry fetchmail procmail mutt; do
- which $req >/dev/null
- { test $? != 0 } && {
- error "Cannot find $req. Please install it."
- return 1
- }
- done
-
- # which wipe command to use
- which wipe > /dev/null
- { test $? = 0 } && {
- rm="wipe -f -s -q -R /dev/urandom"; return 0 }
- which srm > /dev/null
- { test $? = 0 } && {
- rm="srm -m"; return 0 }
- rm="rm -f"
- return 0
-}
-
-
-option_is_set() {
- #First argument, the option (something like "-s")
- #Second (optional) argument: if it's "out", command will print it out 'set'/'unset'
- # This is useful for if conditions
- #Return 0 if is set, 1 otherwise
- [[ -n ${(k)opts[$1]} ]];
- r=$?
- if [[ $2 == out ]]; then
- if [[ $r == 0 ]]; then
- echo 'set'
- else
- echo 'unset'
- fi
- fi
- return $r;
-}
-option_value() {
- #First argument, the option (something like "-s")
- <<< ${opts[$1]}
-}
-
-
-usage() {
- cat <<EOF
-Jaro Mail $VERSION - your humble and faithful electronic postman
-
- Copyright (C) 2010-2012 Dyne.org Foundation, License GNU GPL v3+
- This is free software: you are free to change and redistribute it
- The latest Jaro Mail sourcecode is on <http://jaromail.dyne.org>
-
-Synopsis: jaro [options] [command] [command-options]
-
-Main commands:
-
- fetch download unread emails from [account]
- send send all mails queued in the outbox
- peek look into the [account] mailbox without downloading
-
-Options:
-
- -a use a particular account instead of default (keyword)
- -l whitelist or blacklist to use with learn/query/forget
- -h print this help
- -v version information for this tool
- -q run quietly without printing informations
- -n dry run, show operations without executing them
- -D print debugging information at runtime
-
-Maintenance commands:
-
- passwd reset password for the account in use
-
- update refresh configurations
- queue add a mail into outbox
-
- addr look for a matching address in list
- query read mail from stdin, return 0 if known to list
- learn learn addresses from mails piped in stdin
- forget remove addresses found in mails piped in stdin
-
- backup move all mails older than N days from a maildir to another
- rmdupes remove all duplicate mails into a maildir
- merge merge a maildir into another, removing all duplicates
-
-Please report bugs on <http://bugs.dyne.org>.
-EOF
-}