*~
.*.swp
*.elc
+releases
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 \
# 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
# 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 $@) ; \
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 \
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
--- /dev/null
+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].
--- /dev/null
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <sys/types.h>
+
+int main()
+{
+ ssize_t count = 0;
+ size_t n = 0;
+ char **lineptr = NULL;
+ FILE *stream = NULL;
+
+ count = getline(lineptr, &n, stream);
+}
--- /dev/null
+# See Makfefile.local for the list of files to be compiled in this
+# directory.
+all:
+ $(MAKE) -C .. all
+
+.DEFAULT:
+ $(MAKE) -C .. $@
--- /dev/null
+# -*- 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
--- /dev/null
+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
--- /dev/null
+# 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 <cworth@cworth.org>
+#
+# Based on "notmuch help" as follows:
+#
+# Usage: notmuch <command> [args...]
+#
+# Where <command> and [args...] are as follows:
+#
+# setup
+#
+# new
+#
+# search [options] <search-term> [...]
+#
+# show <search-terms>
+#
+# reply <search-terms>
+#
+# tag +<tag>|-<tag> [...] [--] <search-terms> [...]
+#
+# dump [<filename>]
+#
+# restore <filename>
+#
+# help [<command>]
+
+_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
--- /dev/null
+set NOTMUCH_CMD=`notmuch help | awk '/\t/' | cut -f2 |grep -v '^$'`
+complete notmuch 'p/1/$NOTMUCH_CMD/'
--- /dev/null
+#compdef notmuch
+
+# ZSH completion for `notmuch`
+# Copyright © 2009 Ingmar Vanhassel <ingmar@exherbo.org>
+
+_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 :
+++ /dev/null
-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.).
+++ /dev/null
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <sys/types.h>
-
-int main()
-{
- ssize_t count = 0;
- size_t n = 0;
- char **lineptr = NULL;
- FILE *stream = NULL;
-
- count = getline(lineptr, &n, stream);
-}
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=<cpu>-<vendor>-<os> 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
}
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: <cpu>-<vendor>-<os>"
+ 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 ""
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
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
printf "No (will use our own instead).\n"
have_getline=0
fi
-rm -f config/have_getline
+rm -f compat/have_getline
cat <<EOF
# Command to execute emacs from Makefiles
EMACS = emacs --quick
-# Command to execute gzip from Makefiles
-gzip = gzip
-
-# Command to create a directory
-MKDIR = install -d
-
-# Command to install an executable
-INSTALL-BIN = install
-
-# Command to install a non-executable file (documentation, etc.)
-INSTALL-DATA = install -m0644
-
-# Command to create a symbolic link
-SYMLINK = ln -sf
-
# Default FLAGS for C compiler (can be overridden by user such as "make CFLAGS=-g")
CFLAGS = ${CFLAGS}
# The prefix to which notmuch should be installed
prefix = ${PREFIX}
-# The directory to which notmuch libraries should be installed
+# The directory to which libraries should be installed
libdir = ${LIBDIR:=\$(prefix)/lib}
+# The directory to which header files should be installed
+includedir = ${INCLUDEDIR:=\$(prefix)/lib}
+
+# The directory to which man pages should be installed
+mandir = ${MANDIR:=\$(prefix)/share/man}
+
+# The directory to which read-only (configuration) filesshould be installed
+sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc}
+
# The directory to which emacs lisp files should be installed
-emacs_lispdir=${emacs_lispdir}
+emacslispdir=${EMACSLISPDIR}
+
+# Whether there's an emacs binary available for byte-compiling
+HAVE_EMACS = ${have_emacs}
# The directory to which desktop files should be installed
desktop_dir = \$(prefix)/share/applications
# The directory to which bash completions files should be installed
-bash_completion_dir = /etc/bash_completion.d
+bash_completion_dir = \$(sysconfdir)/bash_completion.d
# The directory to which zsh completions files should be installed
zsh_completion_dir = \$(prefix)/share/zsh/functions/Completion/Unix
+++ /dev/null
-# 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 <cworth@cworth.org>
-#
-# Based on "notmuch help" as follows:
-#
-# Usage: notmuch <command> [args...]
-#
-# Where <command> and [args...] are as follows:
-#
-# setup
-#
-# new
-#
-# search [options] <search-term> [...]
-#
-# show <search-terms>
-#
-# reply <search-terms>
-#
-# tag +<tag>|-<tag> [...] [--] <search-terms> [...]
-#
-# dump [<filename>]
-#
-# restore <filename>
-#
-# help [<command>]
-
-_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
+++ /dev/null
-set NOTMUCH_CMD=`notmuch help | awk '/\t/' | cut -f2 |grep -v '^$'`
-complete notmuch 'p/1/$NOTMUCH_CMD/'
+++ /dev/null
-#compdef notmuch
-
-# ZSH completion for `notmuch`
-# Copyright © 2009 Ingmar Vanhassel <ingmar@exherbo.org>
-
-_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 :
--- /dev/null
+notmuch for Debian
+==================
+
+To use the vim plugin, please install it using vim-addons(1)
+
+ -- martin f. krafft <madduck@debian.org> Thu, 21 Jan 2010 14:50:19 +1300
--- /dev/null
+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 <cworth@debian.org> 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 <madduck@debian.org> Thu, 21 Jan 2010 14:00:54 +1300
+
+notmuch (0.0-1) unstable; urgency=low
+
+ * New Debian package.
+
+ -- Jameson Graef Rollins <jrollins@finestructure.net> Fri, 27 Nov 2009 13:39:09 -0500
--- /dev/null
+Source: notmuch
+Section: mail
+Priority: extra
+Maintainer: Carl Worth <cworth@debian.org>
+Uploaders: Jameson Graef Rollins <jrollins@finestructure.net>, martin f. krafft <madduck@debian.org>
+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.
--- /dev/null
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
+Debianized-By: Jameson Graef Rollins <jrollins@finestructure.net>
+Debianized-Date: Fri Nov 28 18:00:00 EDT 2009
+Original-Source: git://notmuchmail.org/git/notmuch
+
+Files: *
+Copyright: Copyright 2009 Carl Worth <cworth@cworth.org>
+ Bart Trojanowski <bart@jukie.net>
+ Keith Packard <keithp@keithp.com>
+ Alexander Botero-Lowry <alex.boterolowry@gmail.com>
+ Ingmar Vanhassel <ingmar@exherbo.org>
+ Jed Brown <jed@59A2.org>
+ Jan Janak <jan@ryngle.com>
+ Chris Wilson <chris@chris-wilson.co.uk>
+ Keith Amidon <keith@nicira.com>
+ Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
+ Mikhail Gusarov <dottedmag@dottedmag.net>
+ Jeffrey C. Ollie <jeff@ocjtech.us>
+ Jameson Graef Rollins <jrollins@finestructure.net>
+ Stewart Smith <stewart@flamingspork.com>
+ Adrian Perez <aperez@igalia.com>
+ Kan-Ru Chen <kanru@kanru.info>
+ James Rowe <jnrowe@gmail.com>
+ Eric Anholt <eric@anholt.net>
+ Alec Berryman <alec@thened.net>
+ Tassilo Horn <tassilo@member.fsf.org>
+ Stefan Schmidt <stefan@datenfreihafen.org>
+ Rolland Santimano <rollandsantimano@yahoo.com>
+ Peter Wang <novalazy@gmail.com>
+ Lars Kellogg-Stedman <lars@seas.harvard.edu>
+ Holger Freyther <zecke@selfish.org>
+ David Bremner <bremner@unb.ca>
+ Alexander Botero-Lowry <alexbl@fortitudo.(none)>
+
+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 <jrollins@finestructure.net>
+ martin f. krafft <madduck@debian.org>
+
+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".
--- /dev/null
+usr/include
+usr/lib/libnotmuch.so
--- /dev/null
+usr/lib/libnotmuch.so.*
--- /dev/null
+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
--- /dev/null
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/notmuch
+
+# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+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
--- /dev/null
+#!/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
--- /dev/null
+;; -*-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"))
+ ))
--- /dev/null
+usr/bin
+usr/share/emacs/site-lisp/notmuch/*.el
+usr/share/man/man1
+etc/bash_completion.d
+usr/share/zsh
--- /dev/null
+#!/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
--- /dev/null
+version=3
+
+# Notmuch releases appear here
+http://www.notmuchmail.org/releases/notmuch-(.*)\.tar\.gz
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)
$(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
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
.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
.RS 4
.TP 4
-.BR tag " +<tag>|-<tag> [...] [--] <search-term>..."
+.BR tag " +<tag>|\-<tag> [...] [\-\-] <search-term>..."
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 <search-terms> 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
.RS 4
.TP 4
-.BR part " --part=<part-number> <search-term>..."
+.BR part " \-\-part=<part-number> <search-term>..."
Output a single MIME part of a message.
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.
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
<intial-timestamp>..<final-timestamp>
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
--- /dev/null
+The debian packaging exists in the top-level "debian" directory within
+this source-code respository.
--- /dev/null
+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