From: Carl Worth Date: Wed, 7 Apr 2010 01:44:12 +0000 (-0700) Subject: Merge branch 'debian' X-Git-Tag: 0.2~105 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=7d9851e293fad762cd959e9be819e48a26087cdc;hp=9ed5e095a81f23b286a10a4fd51c09769c8d62ee Merge branch 'debian' These are the changes made between the notmuch 0.1 release and the release of Debian version 0.1-1. It's mostly changes to the debian directory, of course, but does also include some generally useful Makefile improvements. --- diff --git a/.gitignore b/.gitignore index 95c50ec1..217440d5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ libnotmuch.so* *~ .*.swp *.elc +releases diff --git a/Makefile b/Makefile index f3697861..076efc79 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all: # List all subdirectories here. Each contains its own Makefile.local -subdirs = compat emacs lib +subdirs = compat completion emacs lib # We make all targets depend on the Makefiles themselves. global_deps = Makefile Makefile.local \ diff --git a/Makefile.local b/Makefile.local index 74f0f866..68823241 100644 --- a/Makefile.local +++ b/Makefile.local @@ -42,7 +42,8 @@ extra_cxxflags := # Smash together user's values with our extra values FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags) FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) -FINAL_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS) +FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch +FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS) .PHONY: all all: notmuch notmuch-shared notmuch.1.gz @@ -148,31 +149,20 @@ release-verify-newer: release-verify-version # user how to enable verbose compiles. ifeq ($(V),) quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n" -quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)" %12s $@\n" "$1 $2"; $($1) -quiet_args = @printf $(quiet_DOC)$(eval quiet_DOC:=)" %12s$2\n" $1; $($1) $2 +quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)"$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//')) endif # The user has explicitly enabled quiet compilation. ifeq ($(V),0) -quiet = @printf " %12s $@\n" "$1 $2"; $($1) -quiet_args = @printf " %12s$2\n" $1; $($1) $2 +quiet = @printf "$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//')) endif # Otherwise, print the full command line. -quiet ?= $($1) -quiet_args ?= $($1) $2 - -quiet_mkdir = $(call quiet_args,MKDIR,$1) -quiet_install_bin = $(call quiet_args,INSTALL-BIN,$1) -quiet_install_data = $(call quiet_args,INSTALL-DATA,$1) -quiet_symlink = $(call quiet_args,SYMLINK,$1) +quiet ?= $($(shell echo $1 | sed -e s'/ .*//')) %.o: %.cc $(global_deps) - $(call quiet,CXX,$(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ + $(call quiet,CXX $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ %.o: %.c $(global_deps) - $(call quiet,CC,$(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ - -%.elc: %.el - $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $< + $(call quiet,CC $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ .deps/%.d: %.c $(global_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ @@ -194,6 +184,11 @@ DEPS := $(DEPS:%.cc=.deps/%.d) clean: rm -f $(CLEAN); rm -rf .deps +# We don't (yet) have any distributed files not in the upstream repository. +# So distclean is currently identical to clean. +.PHONY: distclean +distclean: clean + notmuch_client_srcs = \ $(notmuch_compat_srcs) \ debugger.c \ @@ -218,49 +213,35 @@ notmuch_client_srcs = \ notmuch_client_modules = $(notmuch_client_srcs:.c=.o) notmuch: $(notmuch_client_modules) lib/libnotmuch.a - $(call quiet,CC,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -o $@ + $(call quiet,CC $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@ notmuch-shared: $(notmuch_client_modules) lib/libnotmuch.so - $(call quiet,CC,$(LDFLAGS)) -Llib -lnotmuch $(notmuch_client_modules) $(FINAL_LDFLAGS) -o $@ + $(call quiet,CC $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@ notmuch.1.gz: notmuch.1 - $(call quiet,gzip) --stdout $^ > $@ + gzip --stdout $^ > $@ .PHONY: install install: all notmuch.1.gz - $(call quiet_mkdir, $(DESTDIR)$(prefix)/bin/) - $(call quiet_mkdir, $(DESTDIR)$(libdir)/) - $(call quiet_mkdir, $(DESTDIR)$(prefix)/include/) - $(call quiet_mkdir, $(DESTDIR)$(prefix)/share/man/man1) - $(call quiet_install_bin, notmuch-shared $(DESTDIR)$(prefix)/bin/notmuch) - $(call quiet_install_data, notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/) + mkdir -p $(DESTDIR)$(mandir)/man1 + install -m0644 notmuch.1.gz $(DESTDIR)$(mandir)/man1/ + mkdir -p $(DESTDIR)$(prefix)/bin/ + install notmuch-shared $(DESTDIR)$(prefix)/bin/notmuch ifeq ($(MAKECMDGOALS), install) @echo "" - @echo "Notmuch is now installed." + @echo "Notmuch is now installed to $(DESTDIR)$(prefix)" @echo "" - @echo "You may now want to install additional components to support using notmuch" - @echo "together with other software packages:" + @echo "To run notmuch from emacs, each user should add the following line to ~/.emacs:" @echo "" - @echo " make install-emacs" - @echo " make install-bash" - @echo " make install-zsh" + @echo " (require 'notmuch)" @echo "" + @echo "And should then run \"M-x notmuch\" from within emacs or run \"emacs -f notmuch\"" endif .PHONY: install-desktop install-desktop: - $(call quiet,MKDIR) $(DESTDIR)$(desktop_dir) + mkdir -p $(DESTDIR)$(desktop_dir) desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop -.PHONY: install-bash -install-bash: - $(call quiet-mkdir, $(DESTDIR)$(bash_completion_dir)) - $(call quiet_install_data, contrib/notmuch-completion.bash $(DESTDIR)$(bash_completion_dir)/notmuch) - -.PHONY: install-zsh -install-zsh: - $(call quiet_mkdir, $(DESTDIR)$(zsh_completion_dir)) - $(call quiet_install_data, contrib/notmuch-completion.zsh $(DESTDIR)$(zsh_completion_dir)/notmuch) - SRCS := $(SRCS) $(notmuch_client_srcs) CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc notmuch.1.gz diff --git a/compat/README b/compat/README new file mode 100644 index 00000000..cd32c56f --- /dev/null +++ b/compat/README @@ -0,0 +1,16 @@ +notmuch/comapt + +This directory consists of two things: + +1. Small programs used by the notmuch configure script to test for the + availability of certain system features, (library functions, etc.). + + For example: have_getline.c + +2. Compatibility implementations of those system features for systems + that don't provide their own versions. + + For example: getline.c + + The compilation of these files is made conditional on the output of + the test programs from [1]. diff --git a/compat/have_getline.c b/compat/have_getline.c new file mode 100644 index 00000000..a8bcd17e --- /dev/null +++ b/compat/have_getline.c @@ -0,0 +1,13 @@ +#define _GNU_SOURCE +#include +#include + +int main() +{ + ssize_t count = 0; + size_t n = 0; + char **lineptr = NULL; + FILE *stream = NULL; + + count = getline(lineptr, &n, stream); +} diff --git a/completion/Makefile b/completion/Makefile new file mode 100644 index 00000000..b6859eac --- /dev/null +++ b/completion/Makefile @@ -0,0 +1,7 @@ +# See Makfefile.local for the list of files to be compiled in this +# directory. +all: + $(MAKE) -C .. all + +.DEFAULT: + $(MAKE) -C .. $@ diff --git a/completion/Makefile.local b/completion/Makefile.local new file mode 100644 index 00000000..6a6012d4 --- /dev/null +++ b/completion/Makefile.local @@ -0,0 +1,18 @@ +# -*- makefile -*- + +dir := completion + +# The dir variable will be re-assigned to later, so we can't use it +# directly in any shell commands. Instead we save its value in other, +# private variables that we can use in the commands. +bash_script := $(dir)/notmuch-completion.bash +zsh_script := $(dir)/notmuch-completion.zsh + +install: install-$(dir) + +install-$(dir): + @echo $@ + mkdir -p $(DESTDIR)$(bash_completion_dir) + install -m0644 $(bash_script) $(DESTDIR)$(bash_completion_dir)/notmuch + mkdir -p $(DESTDIR)$(zsh_completion_dir) + install -m0644 $(zsh_script) $(DESTDIR)$(zsh_completion_dir)/notmuch diff --git a/completion/README b/completion/README new file mode 100644 index 00000000..40a30e5f --- /dev/null +++ b/completion/README @@ -0,0 +1,10 @@ +notmuch completion + +This directory contains support for various shells to automatically +complete partially entered notmuch command lines. + +notmuch-completion.bash Command-line completion for the bash shell + +notmuch-completion.tcsh Command-line completion for the tcsh shell + +notmuch-completion.zsh Command-line completion for the zsh shell diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash new file mode 100644 index 00000000..8665268c --- /dev/null +++ b/completion/notmuch-completion.bash @@ -0,0 +1,71 @@ +# Bash completion for notmuch +# +# Copyright © 2009 Carl Worth +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# 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, see http://www.gnu.org/licenses/ . +# +# Author: Carl Worth +# +# Based on "notmuch help" as follows: +# +# Usage: notmuch [args...] +# +# Where and [args...] are as follows: +# +# setup +# +# new +# +# search [options] [...] +# +# show +# +# reply +# +# tag +|- [...] [--] [...] +# +# dump [] +# +# restore +# +# help [] + +_notmuch() +{ + local current previous commands help_options + + previous=${COMP_WORDS[COMP_CWORD-1]} + current="${COMP_WORDS[COMP_CWORD]}" + + commands="setup new search show reply tag dump restore help" + help_options="setup new search show reply tag dump restore search-terms" + search_options="--max-threads= --first= --sort=" + + COMPREPLY=() + + case $COMP_CWORD in + 1) + COMPREPLY=( $(compgen -W "${commands}" -- ${current}) ) ;; + 2) + case $previous in + help) + COMPREPLY=( $(compgen -W "${help_options}" -- ${current}) ) ;; + search) + COMPREPLY=( $(compgen -W "${search_options}" -- ${current}) ) ;; + esac + ;; + esac +} + +complete -o default -o bashdefault -F _notmuch notmuch diff --git a/completion/notmuch-completion.tcsh b/completion/notmuch-completion.tcsh new file mode 100644 index 00000000..c0d3a446 --- /dev/null +++ b/completion/notmuch-completion.tcsh @@ -0,0 +1,2 @@ +set NOTMUCH_CMD=`notmuch help | awk '/\t/' | cut -f2 |grep -v '^$'` +complete notmuch 'p/1/$NOTMUCH_CMD/' diff --git a/completion/notmuch-completion.zsh b/completion/notmuch-completion.zsh new file mode 100644 index 00000000..67a9aba8 --- /dev/null +++ b/completion/notmuch-completion.zsh @@ -0,0 +1,74 @@ +#compdef notmuch + +# ZSH completion for `notmuch` +# Copyright © 2009 Ingmar Vanhassel + +_notmuch_commands() +{ + local -a notmuch_commands + notmuch_commands=( + 'setup:interactively set up notmuch for first use' + 'new:find and import any new message to the database' + 'search:search for messages matching the search terms, display matching threads as results' + 'reply:constructs a reply template for a set of messages' + 'show:show all messages matching the search terms' + 'tag:add or remove tags for all messages matching the search terms' + 'dump:creates a plain-text dump of the tags of each message' + 'restore:restores the tags from the given file' + 'help:show details on a command' + ) + + _describe -t command 'command' notmuch_commands +} + +_notmuch_dump() +{ + _files +} + +_notmuch_help_topics() +{ + local -a notmuch_help_topics + notmuch_help_topics=( + 'search-terms:show common search-terms syntax' + ) + _describe -t notmuch-help-topics 'topic' notmuch_help_topics +} + +_notmuch_help() +{ + _alternative \ + _notmuch_commands \ + _notmuch_help_topics +} + +_notmuch_restore() +{ + _files +} + +_notmuch_search() +{ + _arguments -s : \ + '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \ + '--first=[omit the first x threads from the search results]:number of threads to omit: ' \ + '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' +} + +_notmuch() +{ + if (( CURRENT > 2 )) ; then + local cmd=${words[2]} + curcontext="${curcontext%:*:*}:notmuch-$cmd" + (( CURRENT-- )) + shift words + _call_function ret _notmuch_$cmd + return ret + else + _notmuch_commands + fi +} + +_notmuch "$@" + +# vim: set sw=2 sts=2 ts=2 et ft=zsh : diff --git a/config/README b/config/README deleted file mode 100644 index eabfe285..00000000 --- a/config/README +++ /dev/null @@ -1,5 +0,0 @@ -notmuch/config - -This directory consists of small programs used by the notmuch -configure script to test for the availability of certain system -features, (library functions, etc.). diff --git a/config/have_getline.c b/config/have_getline.c deleted file mode 100644 index a8bcd17e..00000000 --- a/config/have_getline.c +++ /dev/null @@ -1,13 +0,0 @@ -#define _GNU_SOURCE -#include -#include - -int main() -{ - ssize_t count = 0; - size_t n = 0; - char **lineptr = NULL; - FILE *stream = NULL; - - count = getline(lineptr, &n, stream); -} diff --git a/configure b/configure index df1636d2..21780a61 100755 --- a/configure +++ b/configure @@ -67,7 +67,21 @@ specify an installation prefix other than $PREFIX using Fine tuning of some installation directories is available: - --libdir=DIR Install libraries in LIBDIR [PREFIX/lib] + --libdir=DIR Install libraries to DIR [PREFIX/lib] + --includedir=DIR Install header files to DIR [PREFIX/include] + --mandir=DIR Install man pages to DIR [PREFIX/share/man] + --sysconfdir=DIR Read-only single-machine data [PREFIX/etc] + --emacslispdir=DIR Elisp [PREFIX/share/emacs/site-lisp/notmuch] + +Additional options are accepted for compatibility with other +configure-script calling conventions, but don't do anything yet: + + --build=-- Currently ignored + --infodir=DIR Currently ignored + --localstatedir=DIR Currently ignored + --libexecdir=DIR Currently ignored + --disable-maintainer-mode Currently ignored + --disable-dependency-tracking Currently ignored EOF } @@ -81,8 +95,42 @@ for option; do PREFIX="${option#*=}" elif [ "${option%%=*}" = '--libdir' ] ; then LIBDIR="${option#*=}" + elif [ "${option%%=*}" = '--includedir' ] ; then + INCLUDEDIR="${option#*=}" + elif [ "${option%%=*}" = '--mandir' ] ; then + MANDIR="${option#*=}" + elif [ "${option%%=*}" = '--sysconfdir' ] ; then + SYSCONFDIR="${option#*=}" + elif [ "${option%%=*}" = '--emacslispdir' ] ; then + EMACSLISPDIR="${option#*=}" + elif [ "${option%%=*}" = '--build' ] ; then + build_option="${option#*=}" + case ${build_option} in + *-*-*) ;; + *) + echo "Unrecognized value for --build option: ${build_option}" + echo "Should be: --" + echo "See:" + echo " $0 --help" + echo "" + exit 1 + esac + build_cpu=${build_option%%-*} + build_option=${build_option#*-} + build_vendor=${build_option%%-*} + build_os=${build_option#*-} + elif [ "${option%%=*}" = '--infodir' ] ; then + true + elif [ "${option%%=*}" = '--localstatedir' ] ; then + true + elif [ "${option%%=*}" = '--libexecdir' ] ; then + true + elif [ "${option}" = '--disable-maintainer-mode' ] ; then + true + elif [ "${option}" = '--disable-dependency-tracking' ] ; then + true else - echo "Unrecognized option: ${option}." + echo "Unrecognized option: ${option}" echo "See:" echo " $0 --help" echo "" @@ -169,10 +217,21 @@ else have_valgrind=0 fi -if pkg-config --modversion emacs > /dev/null 2>&1; then - emacs_lispdir=$(pkg-config emacs --variable sitepkglispdir) +if [ -z "${EMACSLISPDIR}" ]; then + if pkg-config --modversion emacs > /dev/null 2>&1; then + EMACSLISPDIR=$(pkg-config emacs --variable sitepkglispdir)/notmuch + else + EMACSLISPDIR='$(prefix)/share/emacs/site-lisp/notmuch' + fi +fi + +printf "Checking if emacs is available... " +if emacs --quick --batch > /dev/null 2>&1; then + printf "Yes.\n" + have_emacs=1 else - emacs_lispdir='$(prefix)/share/emacs/site-lisp' + printf "No (so will not byte-compile emacs code)\n" + have_emacs=0 fi if [ $errors -gt 0 ]; then @@ -241,7 +300,7 @@ EOF fi printf "Checking for getline... " -if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1 +if ${CC} -o compat/have_getline compat/have_getline.c > /dev/null 2>&1 then printf "Yes.\n" have_getline=1 @@ -249,7 +308,7 @@ else printf "No (will use our own instead).\n" have_getline=0 fi -rm -f config/have_getline +rm -f compat/have_getline cat < -# -# Based on "notmuch help" as follows: -# -# Usage: notmuch [args...] -# -# Where and [args...] are as follows: -# -# setup -# -# new -# -# search [options] [...] -# -# show -# -# reply -# -# tag +|- [...] [--] [...] -# -# dump [] -# -# restore -# -# help [] - -_notmuch() -{ - local current previous commands help_options - - previous=${COMP_WORDS[COMP_CWORD-1]} - current="${COMP_WORDS[COMP_CWORD]}" - - commands="setup new search show reply tag dump restore help" - help_options="setup new search show reply tag dump restore search-terms" - search_options="--max-threads= --first= --sort=" - - COMPREPLY=() - - case $COMP_CWORD in - 1) - COMPREPLY=( $(compgen -W "${commands}" -- ${current}) ) ;; - 2) - case $previous in - help) - COMPREPLY=( $(compgen -W "${help_options}" -- ${current}) ) ;; - search) - COMPREPLY=( $(compgen -W "${search_options}" -- ${current}) ) ;; - esac - ;; - esac -} - -complete -o default -o bashdefault -F _notmuch notmuch diff --git a/contrib/notmuch-completion.tcsh b/contrib/notmuch-completion.tcsh deleted file mode 100644 index c0d3a446..00000000 --- a/contrib/notmuch-completion.tcsh +++ /dev/null @@ -1,2 +0,0 @@ -set NOTMUCH_CMD=`notmuch help | awk '/\t/' | cut -f2 |grep -v '^$'` -complete notmuch 'p/1/$NOTMUCH_CMD/' diff --git a/contrib/notmuch-completion.zsh b/contrib/notmuch-completion.zsh deleted file mode 100644 index 67a9aba8..00000000 --- a/contrib/notmuch-completion.zsh +++ /dev/null @@ -1,74 +0,0 @@ -#compdef notmuch - -# ZSH completion for `notmuch` -# Copyright © 2009 Ingmar Vanhassel - -_notmuch_commands() -{ - local -a notmuch_commands - notmuch_commands=( - 'setup:interactively set up notmuch for first use' - 'new:find and import any new message to the database' - 'search:search for messages matching the search terms, display matching threads as results' - 'reply:constructs a reply template for a set of messages' - 'show:show all messages matching the search terms' - 'tag:add or remove tags for all messages matching the search terms' - 'dump:creates a plain-text dump of the tags of each message' - 'restore:restores the tags from the given file' - 'help:show details on a command' - ) - - _describe -t command 'command' notmuch_commands -} - -_notmuch_dump() -{ - _files -} - -_notmuch_help_topics() -{ - local -a notmuch_help_topics - notmuch_help_topics=( - 'search-terms:show common search-terms syntax' - ) - _describe -t notmuch-help-topics 'topic' notmuch_help_topics -} - -_notmuch_help() -{ - _alternative \ - _notmuch_commands \ - _notmuch_help_topics -} - -_notmuch_restore() -{ - _files -} - -_notmuch_search() -{ - _arguments -s : \ - '--max-threads=[display only the first x threads from the search results]:number of threads to show: ' \ - '--first=[omit the first x threads from the search results]:number of threads to omit: ' \ - '--sort=[sort results]:sorting:((newest-first\:"reverse chronological order" oldest-first\:"chronological order"))' -} - -_notmuch() -{ - if (( CURRENT > 2 )) ; then - local cmd=${words[2]} - curcontext="${curcontext%:*:*}:notmuch-$cmd" - (( CURRENT-- )) - shift words - _call_function ret _notmuch_$cmd - return ret - else - _notmuch_commands - fi -} - -_notmuch "$@" - -# vim: set sw=2 sts=2 ts=2 et ft=zsh : diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..f07b4991 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +notmuch for Debian +================== + +To use the vim plugin, please install it using vim-addons(1) + + -- martin f. krafft Thu, 21 Jan 2010 14:50:19 +1300 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..2f0a17e4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,35 @@ +notmuch (0.1-1) unstable; urgency=low + + [ martin f. krafft ] + * Add suggestion to vim-addon-manager. + + [ Carl Worth ] + * Improve package description (closes: #566282). + * New upstream version (0.1) (closes: #576647). + * New versioning to track upstream version scheme. + * Split packaging into notmuch, libnotmuch1, and libnotmuch-dev. + * Update to advertise conformance with policy 3.8.4 (no changes). + * Add a debian/watch file to notice upstream tar files. + + -- Carl Worth Tue, 06 Apr 2010 18:27:49 -0700 + +notmuch (0.0+201001211401) unstable; urgency=low + + * Upload to Debian (closes: #557354). + * New versioning scheme. + * Added emacs build dependency. + * Added Vcs-Browser field to debian/control. + * Downgrade recommendation for emacs to suggestion. + * Add vim to suggestions and enhancements. + * Put debian/* under separate copyright. + * Make Carl the maintainer. + * Add myself to uploaders. + * Install the vim plugin (using vim-addons). + + -- martin f. krafft Thu, 21 Jan 2010 14:00:54 +1300 + +notmuch (0.0-1) unstable; urgency=low + + * New Debian package. + + -- Jameson Graef Rollins Fri, 27 Nov 2009 13:39:09 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..e4c61ab3 --- /dev/null +++ b/debian/control @@ -0,0 +1,51 @@ +Source: notmuch +Section: mail +Priority: extra +Maintainer: Carl Worth +Uploaders: Jameson Graef Rollins , martin f. krafft +Build-Depends: debhelper (>= 7.0.50~), pkg-config, libxapian-dev, libgmime-2.4-dev, libtalloc-dev, libz-dev, emacs (>= 23~) +Standards-Version: 3.8.4 +Homepage: http://notmuchmail.org/ +Vcs-Git: git://notmuchmail.org/git/notmuch +Vcs-Browser: http://git.notmuchmail.org/git/notmuch +Dm-Upload-Allowed: yes + +Package: notmuch +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Enhances: emacs, vim +Suggests: emacs, vim, vim-addon-manager +Description: thread-based email index, search and tagging + Notmuch is a system for indexing, searching, reading, and tagging + large collections of email messages in maildir or mh format. It uses + the Xapian library to provide fast, full-text search with a very + convenient search syntax. + . + This package contains the notmuch command-line interface as well as + emacs and vim interfaces for notmuch. + +Package: libnotmuch1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: thread-based email index, search and tagging (runtime) + Notmuch is a system for indexing, searching, reading, and tagging + large collections of email messages in maildir or mh format. It uses + the Xapian library to provide fast, full-text search with a very + convenient search syntax. + . + This package contains the runtime library, necessary to run + applications using libnotmuch. + +Package: libnotmuch-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends}, libnotmuch1 (= ${binary:Version}) +Description: thread-based email index, search and tagging (development) + Notmuch is a system for indexing, searching, reading, and tagging + large collections of email messages in maildir or mh format. It uses + the Xapian library to provide fast, full-text search with a very + convenient search syntax. + . + This package provides the necessary development libraries and header + files to allow you to develop new software using libnotmuch. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..1cc7a155 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,55 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59 +Debianized-By: Jameson Graef Rollins +Debianized-Date: Fri Nov 28 18:00:00 EDT 2009 +Original-Source: git://notmuchmail.org/git/notmuch + +Files: * +Copyright: Copyright 2009 Carl Worth + Bart Trojanowski + Keith Packard + Alexander Botero-Lowry + Ingmar Vanhassel + Jed Brown + Jan Janak + Chris Wilson + Keith Amidon + Aneesh Kumar K.V + Mikhail Gusarov + Jeffrey C. Ollie + Jameson Graef Rollins + Stewart Smith + Adrian Perez + Kan-Ru Chen + James Rowe + Eric Anholt + Alec Berryman + Tassilo Horn + Stefan Schmidt + Rolland Santimano + Peter Wang + Lars Kellogg-Stedman + Holger Freyther + David Bremner + Alexander Botero-Lowry + +License: GPL-3+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in file "/usr/share/common-licenses/GPL-3". + +Files: debian/* +Copyright: Copyright 2010 Jameson Graef Rollins + martin f. krafft + +License: GPL-3+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in file "/usr/share/common-licenses/GPL-3". diff --git a/debian/libnotmuch-dev.install b/debian/libnotmuch-dev.install new file mode 100644 index 00000000..185dba4e --- /dev/null +++ b/debian/libnotmuch-dev.install @@ -0,0 +1,2 @@ +usr/include +usr/lib/libnotmuch.so diff --git a/debian/libnotmuch1.install b/debian/libnotmuch1.install new file mode 100644 index 00000000..da4fc25b --- /dev/null +++ b/debian/libnotmuch1.install @@ -0,0 +1 @@ +usr/lib/libnotmuch.so.* diff --git a/debian/notmuch.dirs b/debian/notmuch.dirs new file mode 100644 index 00000000..ce7f2393 --- /dev/null +++ b/debian/notmuch.dirs @@ -0,0 +1,6 @@ +usr/bin +usr/share/emacs/site-lisp/notmuch +usr/share/vim/registry +usr/share/vim/addons/plugin +usr/share/vim/addons/syntax +etc/bash_completion.d diff --git a/debian/notmuch.emacsen-install b/debian/notmuch.emacsen-install new file mode 100755 index 00000000..98ec1282 --- /dev/null +++ b/debian/notmuch.emacsen-install @@ -0,0 +1,47 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/notmuch + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=notmuch + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +# We know that the notmuch emacs code doesn't work with emacs before emacs23 +if [ ${FLAVOR} = emacs21 ]; then exit 0; fi +if [ ${FLAVOR} = emacs22 ]; then exit 0; fi +if [ ${FLAVOR} = xemacs21 ]; then exit 0; fi +if [ ${FLAVOR} = xemacs22 ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} + +#FLAVORTEST=`echo $FLAVOR | cut -c-6` +#if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +#else +# SITEFLAG="--no-site-file" +#fi +#FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" +FLAGS="--no-site-file -q -batch -l path.el -f batch-byte-compile" + +ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cd ${ELCDIR} +for file in ${FILES}; do + ln -sf ${ELDIR}/${file} . +done + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el + +exit 0 diff --git a/debian/notmuch.emacsen-remove b/debian/notmuch.emacsen-remove new file mode 100755 index 00000000..c35e8a42 --- /dev/null +++ b/debian/notmuch.emacsen-remove @@ -0,0 +1,10 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/notmuch + +FLAVOR=$1 +PACKAGE=notmuch + +if [ ${FLAVOR} != emacs ]; then + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/debian/notmuch.emacsen-startup b/debian/notmuch.emacsen-startup new file mode 100644 index 00000000..25a527f5 --- /dev/null +++ b/debian/notmuch.emacsen-startup @@ -0,0 +1,23 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file, e.g. /etc/emacs/site-start.d/50notmuch.el +;; for the Debian notmuch package + +;; The notmuch package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; xemacs19, emacs20, xemacs20...). The compiled code is then +;; installed in a subdirectory of the respective site-lisp directory. + +(cond + ((not (file-exists-p "/usr/share/emacs/site-lisp/notmuch")) + (message "Package notmuch removed but not purged. Skipping setup.")) + ((not (file-exists-p (concat "/usr/share/" + (symbol-name debian-emacs-flavor) + "/site-lisp/notmuch"))) + (message "Package notmuch not fully installed. Skipping setup.")) + (t + (debian-pkg-add-load-path-item + (concat "/usr/share/" + (symbol-name debian-emacs-flavor) + "/site-lisp/notmuch")) + )) diff --git a/debian/notmuch.install b/debian/notmuch.install new file mode 100644 index 00000000..dd310fad --- /dev/null +++ b/debian/notmuch.install @@ -0,0 +1,5 @@ +usr/bin +usr/share/emacs/site-lisp/notmuch/*.el +usr/share/man/man1 +etc/bash_completion.d +usr/share/zsh diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..1f6c4bbc --- /dev/null +++ b/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_installdocs: + dh_installdocs + install -m644 vim/README debian/notmuch/usr/share/doc/notmuch/README.vim + +override_dh_install: + dh_install + install -m644 vim/plugin/notmuch.vim debian/notmuch/usr/share/vim/addons/plugin + install -m644 vim/syntax/notmuch-*.vim debian/notmuch/usr/share/vim/addons/syntax + install -m644 vim/notmuch.yaml debian/notmuch/usr/share/vim/registry diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..06a1d973 --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=3 + +# Notmuch releases appear here +http://www.notmuchmail.org/releases/notmuch-(.*)\.tar\.gz diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 76cc64f9..e34da0be 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -9,21 +9,21 @@ emacs_sources := \ emacs_bytecode := $(subst .el,.elc,$(emacs_sources)) -.PHONY: emacs -emacs: $(emacs_bytecode) +%.elc: %.el + $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $< + +ifeq ($(HAVE_EMACS),1) +all: $(emacs_bytecode) +endif + +install: install-emacs .PHONY: install-emacs -install-emacs: install emacs - $(call quiet_mkdir, $(DESTDIR)/$(emacs_lispdir)) - $(call quiet_install_data, $(emacs_sources) $(emacs_bytecode) $(DESTDIR)$(emacs_lispdir)) - @echo "" - @echo "The notmuch emacs client is now installed." - @echo "" - @echo "To run this, each user should add the following line to the ~/.emacs file:" - @echo "" - @echo " (require 'notmuch)" - @echo "" - @echo "And should then run \"M-x notmuch\" from within emacs or run \"emacs -f notmuch\"" - @echo "" +install-emacs: + mkdir -p $(DESTDIR)$(emacslispdir) + install -m0644 $(emacs_sources) $(DESTDIR)$(emacslispdir) +ifeq ($(HAVE_EMACS),1) + install -m0644 $(emacs_bytecode) $(DESTDIR)$(emacslispdir) +endif CLEAN := $(CLEAN) $(emacs_bytecode) diff --git a/lib/Makefile.local b/lib/Makefile.local index c98fb673..0e3a4d15 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -51,23 +51,23 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules) $(call quiet,AR) rcs $@ $^ $(dir)/$(LIBNAME): $(libnotmuch_modules) - $(call quiet,CXX,$(LDFLAGS)) $^ $(FINAL_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@ + $(call quiet,CXX $(CXXFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -shared -Wl,-soname=$(SONAME) -o $@ $(dir)/$(SONAME): $(dir)/$(LIBNAME) - $(call quiet_symlink, $(LIBNAME) $@) + ln -sf $(LIBNAME) $@ $(dir)/$(LINKER_NAME): $(dir)/$(SONAME) - $(call quiet_symlink, $(LIBNAME) $@) + ln -sf $(LIBNAME) $@ install: install-$(dir) install-$(dir): - $(call quiet_mkdir, $(DESTDIR)$(libdir)/) - $(call quiet_install_data, $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/) - $(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME)) - $(call quiet_symlink, $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME)) - $(call quiet_mkdir, $(DESTDIR)$(prefix)/include/) - $(call quiet_install_data, $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/) + mkdir -p $(DESTDIR)$(libdir)/ + install -m0644 $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/ + ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME) + ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME) + mkdir -p $(DESTDIR)$(includedir) + install -m0644 $(dir)/notmuch.h $(DESTDIR)$(includedir)/ SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a diff --git a/notmuch.1 b/notmuch.1 index 9d0473d5..0e6a2edc 100644 --- a/notmuch.1 +++ b/notmuch.1 @@ -256,12 +256,12 @@ takes an existing set of messages and constructs a suitable mail template. The Reply-to header (if any, otherwise From:) is used for the To: address. Vales from the To: and Cc: headers are copied, but not including any of the current user's email addresses (as configured -in primary_mail or other_email in the .notmuch-config file) in the +in primary_mail or other_email in the .notmuch\-config file) in the recipient list It also builds a suitable new subject, including Re: at the front (if not already present), and adding the message IDs of the messages being -replied to to the References list and setting the In-Reply-To: field +replied to to the References list and setting the In\-Reply\-To: field correctly. Finally, the original contents of the emails are quoted by prefixing @@ -280,8 +280,8 @@ include .BR default Includes subject and quoted message body. .TP -.BR headers-only -Only produces In-Reply-To, References, To, Cc, and Bcc headers. +.BR headers\-only +Only produces In\-Reply\-To, References, To, Cc, and Bcc headers. .RE See the @@ -305,18 +305,18 @@ contents. .RS 4 .TP 4 -.BR tag " +|- [...] [--] ..." +.BR tag " +|\- [...] [\-\-] ..." Add/remove tags for all messages matching the search terms. -Tags prefixed by '+' are added while those prefixed by '-' are +Tags prefixed by '+' are added while those prefixed by '\-' are removed. For each message, tag removal is performed before tag addition. The beginning of is recognized by the first -argument that begins with neither '+' nor '-'. Support for -an initial search term beginning with '+' or '-' is provided -by allowing the user to specify a "--" argument to separate +argument that begins with neither '+' nor '\-'. Support for +an initial search term beginning with '+' or '\-' is provided +by allowing the user to specify a "\-\-" argument to separate the tags from the search terms. See the @@ -361,7 +361,7 @@ command can used to output a single part of a multi-part MIME message. .RS 4 .TP 4 -.BR part " --part= ..." +.BR part " \-\-part= ..." Output a single MIME part of a message. @@ -370,7 +370,7 @@ stdout. The search terms must match only a single message, otherwise this command will fail. The part number should match the part "id" field output by the -"--format=json" option of "notmuch show". If the message specified by +"\-\-format=json" option of "notmuch show". If the message specified by the search terms does not include a part with the specified "id" there will be no output. @@ -438,7 +438,7 @@ as well as any other tag values added manually with For .BR id: , -message ID values are the literal contents of the Message-ID: header +message ID values are the literal contents of the Message\-ID: header of email messages, but without the '<', '>' delimiters. The @@ -467,21 +467,21 @@ particular time range, (based on the Date: header) with a syntax of: .. Each timestamp is a number representing the number of seconds since -1970-01-01 00:00:00 UTC. This is not the most convenient means of +1970\-01\-01 00:00:00 UTC. This is not the most convenient means of expressing date ranges, but until notmuch is fixed to accept a more convenient form, one can use the date program to construct timestamps. For example, with the bash shell the folowing syntax would -specify a date range to return messages from 2009-10-01 until the +specify a date range to return messages from 2009\-10\-01 until the current time: - $(date +%s -d 2009-10-01)..$(date +%s) + $(date +%s \-d 2009\-10\-01)..$(date +%s) .SH ENVIRONMENT The following environment variables can be used to control the behavior of notmuch. .TP .B NOTMUCH_CONFIG Specifies the location of the notmuch configuration file. Notmuch will -use ${HOME}/.notmuch-config if this variable is not set. +use ${HOME}/.notmuch\-config if this variable is not set. .SH SEE ALSO The emacs-based interface to notmuch (available as .B notmuch.el diff --git a/packaging/debian b/packaging/debian new file mode 100644 index 00000000..a5866601 --- /dev/null +++ b/packaging/debian @@ -0,0 +1,2 @@ +The debian packaging exists in the top-level "debian" directory within +this source-code respository. diff --git a/vim/notmuch.yaml b/vim/notmuch.yaml new file mode 100644 index 00000000..3d8422c8 --- /dev/null +++ b/vim/notmuch.yaml @@ -0,0 +1,8 @@ +addon: notmuch +description: "notmuch mail user interface" +files: + - plugin/notmuch.vim + - syntax/notmuch-compose.vim + - syntax/notmuch-folders.vim + - syntax/notmuch-search.vim + - syntax/notmuch-show.vim