From: Rhonda D'Vine Date: Thu, 13 Aug 2015 15:08:37 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' into upstream X-Git-Tag: upstream/0.6.1~2 X-Git-Url: https://git.deb.at/w?p=pkg%2Fabook.git;a=commitdiff_plain;h=69a912c0db0ac135fff332db4f0b05ad9ed2eec6;hp=6b6a47393127efedca5a75d2adbc70947d37dfa1 Merge remote-tracking branch 'upstream/master' into upstream --- diff --git a/abook.spec b/abook.spec new file mode 100644 index 0000000..2b8023b --- /dev/null +++ b/abook.spec @@ -0,0 +1,47 @@ +Summary: Text-based addressbook program +Name: abook +Version: 0.6.0pre2 +Release: 1 +License: GPL +Group: Utilities +Source: http://prdownloads.sourceforge.net/abook/%{name}-%{version}.tar.gz +URL: http://abook.sourceforge.net/ +BuildPreReq: ncurses-devel readline-devel gettext +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description +Abook is a text-based addressbook program designed to +use with mutt mail client. + + +%prep +%setup -q + + +%build +%configure +make %{_smp_mflags} + + +%install +%makeinstall + +%find_lang %{name} + + +%clean +rm -rf -- "%{buildroot}" + + +%files -f %{name}.lang +%defattr(-,root,root) +%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README THANKS TODO sample.abookrc +%{_bindir}/abook +%{_mandir}/man1/abook.* +%{_mandir}/man5/abookrc.* + + +%changelog +* Mon Mar 11 2002 Jaakko Heinonen +- rewrote the spec file originally written by + Gustavo Niemeyer diff --git a/config.guess b/config.guess old mode 100755 new mode 100644 diff --git a/config.sub b/config.sub old mode 100755 new mode 100644 diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..105cf55 --- /dev/null +++ b/configure.in @@ -0,0 +1,154 @@ +dnl abook configure.in + +AC_INIT(abook.c) +AM_INIT_AUTOMAKE(abook, 0.6.0pre2) +AM_CONFIG_HEADER(config.h) + +dnl --------------- +dnl gettext support +dnl --------------- + +AM_GNU_GETTEXT +AM_GNU_GETTEXT_VERSION(0.14.1) + +AC_DEFUN([ABOOK_EXPAND_PREFIX], [ + $1=$2 + dnl expanding twice, since from autoconf 2.60 on, $datadir refers to + dnl $datarootdir which in turn refers to $prefix + $1=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" + eval tmp_abook_prefix=\""[$]$1"\" + eval echo $tmp_abook_prefix + )` +]) + +ABOOK_EXPAND_PREFIX(abook_localedir, "$datadir/locale") +localedir="\$(datadir)/locale" + +AC_ARG_WITH(localedir, + [ --with-localedir=PATH Where the locale files are installed ]) +if test "x$with_localedir" != "x"; then + abook_localedir="$with_localedir" + localedir="$with_localedir" +fi + +AC_DEFINE_UNQUOTED(LOCALEDIR, "$abook_localedir", [locale directory]) +AC_SUBST(localedir) + +AM_CONDITIONAL(USE_INCLUDED_INTL_H, test x$USE_INCLUDED_LIBINTL = xyes) + +dnl ---------------------- +dnl end of gettext support +dnl ---------------------- + +AC_PROG_CC +AC_ISC_POSIX +AM_C_PROTOTYPES +if test "x$U" != "x"; then + AC_MSG_ERROR(Compiler not ANSI compliant) +fi +AC_C_INLINE +AC_PROG_INSTALL +AC_HEADER_STDC +AC_CHECK_HEADERS(unistd.h locale.h sys/ioctl.h iconv.h) +AC_CHECK_HEADER(stdarg.h,AC_DEFINE(HAVE_STDARG_H, 1, [Define if you have the header file.]),AC_MSG_ERROR([*** stdarg.h is missing on your system ***])) +AC_FUNC_STRCOLL +AC_CHECK_FUNCS(setlocale) + +ac_widec_funcs=yes +AC_CHECK_HEADER(wchar.h,[ + ac_have_wchar_h=yes + AC_DEFINE(HAVE_WCHAR_H, 1, [Define if you have the header file.])], + [ac_have_wchar_h=no]) +AC_CHECK_FUNCS(mbtowc wcwidth mbrtowc mbsinit,,ac_widec_funcs=no) +AC_CHECK_DECLS(wcwidth) +AC_CHECK_TYPE(wchar_t,,ac_widec_funcs=no) + +if test x$ac_widec_funcs = xyes -a x$ac_have_wchar_h = xyes; then + ac_widec_possible=yes +else + ac_widec_possible=no +fi + +dnl ------------------- +dnl (n)curses detection +dnl ------------------- + +abook_cv_curses=/usr +AC_ARG_WITH(curses, [ --with-curses=DIR Where ncurses is installed ], + [if test $withval != yes; then + abook_cv_curses=$withval + fi + if test x$abook_cv_curses != x/usr; then + LDFLAGS="-L${abook_cv_curses}/lib $LDFLAGS" + CPPFLAGS="$CPPFLAGS -I${abook_cv_curses}/include" + fi]) + +AC_CHECK_LIB(ncursesw, initscr, + [LIBS="$LIBS -lncursesw" + if test x$abook_cv_curses = x/usr -a -d /usr/include/ncursesw; then + CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" + fi + AC_CHECK_HEADERS(ncurses.h)],[ + ac_widec_possible=no + AC_CHECK_LIB(ncurses, initscr, + [LIBS="$LIBS -lncurses" + if test x$abook_cv_curses = x/usr -a -d /usr/include/ncurses; then + CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" + fi + AC_CHECK_HEADERS(ncurses.h)], + [CF_CURSES_LIBS]) + ]) + +dnl -------------------------- +dnl end of (n)curses detection +dnl -------------------------- + +dnl ------------------ +dnl readline detection +dnl ------------------ + +abook_cv_readline=/usr +AC_ARG_WITH(readline, [ --with-readline=DIR Where readline is installed ], + [if test $withval != yes; then + abook_cv_readline=$withval + fi + if test x$abook_cv_readline != x/usr; then + LDFLAGS="-L${abook_cv_readline}/lib $LDFLAGS" + CPPFLAGS="$CPPFLAGS -I${abook_cv_readline}/include" + fi]) + +AC_LIB_READLINE + +if test x$ac_cv_lib_readline = xno -o x$ac_cv_lib_readline_history = xno; then + AC_MSG_ERROR([*** readline library not found or it doesn't support history ***]) +fi + +dnl ------------------------- +dnl end of readline detection +dnl ------------------------- + +if test x$ac_widec_possible = xyes; then + AC_DEFINE(HANDLE_MULTIBYTE, 1, [Handle multibyte characters]) +fi + +AC_CHECK_FUNCS(resizeterm) + +AC_CHECK_FUNCS(snprintf vsnprintf) + +AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging support ], [case "${enableval}" in + yes) debug=true ;; + no) debug=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; + esac], [debug=false]) + +if test x$debug = xtrue; then + CPPFLAGS="-DDEBUG=1 $CPPFLAGS" + CFLAGS="-g $CFLAGS" +fi + +if test x$GCC = xyes; then + CFLAGS="-Wall $CFLAGS" +fi + +AC_OUTPUT(Makefile abook.spec intl/Makefile po/Makefile.in) + diff --git a/contrib/CVS/Entries b/contrib/CVS/Entries new file mode 100644 index 0000000..1784810 --- /dev/null +++ b/contrib/CVS/Entries @@ -0,0 +1 @@ +D diff --git a/contrib/CVS/Repository b/contrib/CVS/Repository new file mode 100644 index 0000000..cb97fad --- /dev/null +++ b/contrib/CVS/Repository @@ -0,0 +1 @@ +abook/contrib diff --git a/contrib/CVS/Root b/contrib/CVS/Root new file mode 100644 index 0000000..2f2a68d --- /dev/null +++ b/contrib/CVS/Root @@ -0,0 +1 @@ +:ext:jheinonen@abook.cvs.sourceforge.net:/cvsroot/abook diff --git a/contrib/abook+vim/README b/contrib/abook+vim/README new file mode 100644 index 0000000..ad81c3a --- /dev/null +++ b/contrib/abook+vim/README @@ -0,0 +1,57 @@ +NOTE: There's no need to patch abook version 0.4.14 or later. +NOTE2: The command in abook is 'Q' not 'P'. + +--- Original message from Brian Medley --- +Hi, + +I am trying to make abook work better (for me) within vim. I am doing +this because I have 'autoedit' and 'edit_headers' set in mutt. This +means I would like to have easy access to my abook addressbook (from +within the editor). + +To accomplish this I have written a vim plugin (it will need vim 6.0) +and have patched abook. Both are included. The patch is against abook +0.4.13. + +Amongst other things, they allow me to obtain an address listing from +abook and perform a mutt query using abook. Below is an example. + +Suppose I have the following line (the cursor is at the caret): + To: + ^ +I can now hit '\al' to lauch abook. Once inside, I can highlight the +people I want to email. Then I hit 'P'. Their email addresses now +appear. Next, suppose I have: + To: john + ^ +My plugin allows the command '\aq' to perform an alias mutt query using +abook. It uses the word under the cursor, so "john" will be looked up +inside of abook. Next, his email address will appear. + +Summary: + \aq => alias query + \al => alias list + +Note: + - \ is actually LocalLeader + - I am aware that abook can do these things from within *mutt*, but + I want to do them from within vim. + - This plugin does other stuff, as well (like deleting signatures, + and positioning the cursor when you start) because I stole code + from Cedric Duval's mail vimrc. + - Improvements / comments are welcome. + +Todo: + - Documentation :) + - I tried to write this so that another alias query program could be + used (e.g. ldap), but I have not implemented this. + +Bugs: + - I had trouble getting this to work in gvim. I used vim in a + console. + +Basic Installation: + - patch and install abook + - place the mail.vim plugin in ~/.vim/after/ftplugin + +--- --- diff --git a/contrib/abook+vim/mail.vim b/contrib/abook+vim/mail.vim new file mode 100644 index 0000000..bdc3134 --- /dev/null +++ b/contrib/abook+vim/mail.vim @@ -0,0 +1,530 @@ +" mail FTplugin +" +" Requires vim 6.x. +" To install place in ~/.vim/after/ftplugin/mail.vim +" +" Author: Brian Medley +" Email: freesoftware@4321.tv +" +" This file was modified from Cedric Duval's version. +" http://cedricduval.free.fr/download/vimrc/mail + +" Only do this when not done yet for this buffer +if exists("b:did_mail_after_ftplugin") + finish +endif +let b:did_mail_after_ftplugin = 1 + +if !exists ("mail_alias_program") + let mail_alias_program="Abook" +endif + +" ==================================================================== +" Globals +" ==================================================================== + +if !exists ("mail_quote_chars") + let s:quote_chars = ':!|>' +else + let s:quote_chars = mail_quote_chars +endif + +" This re defines a 'quote' +let s:quote_re = '\(\s\?\w*[' . s:quote_chars . ']\)' +" \s\? => 0 or one whitespace char +" (b/c some ppl put +" spaces in the quote, +" and others don't) +" +" \w* => maybe word chars (b/c +" some ppl put initals in +" the quotes) +" the rest => actual quote chars +" \( \) => this is a quote "level" + +" This re defines the quoting level at the *beginning* of a line +let s:quote_start = '^' . s:quote_re . s:quote_re . '*' +" ^s:quote_re => quote at beginning of +" line +" s:quote_re* => perhaps followed by +" more quotes + +" For debugging: +" let b:quote_chars = s:quote_chars +" let b:quote_re = s:quote_re +" let b:quote_start = s:quote_start + +" ==================================================================== +" Mappings +" ==================================================================== + +if !exists("no_plugin_maps") && !exists("no_mail_maps") + + " + " get alias list mappings + " + if !hasmapto('MailAliasList', 'n') + nmap al MailAliasList + endif + if !hasmapto('MailAliasList', 'i') + imap al MailAliasList + endif + + nnoremap