diff options
author | Andy Bailey <GooseYArd@gmail.com> | 2010-05-13 00:59:27 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-13 00:59:27 +0200 |
commit | 42a80fd2c15f9afe6c66bdcf04c8c665718a6218 (patch) | |
tree | d3c4e8fc6550dcd89580e9b6417b5e942843aff3 | |
parent | b237120bce2dd395533d61412094a952db06d82f (diff) |
misc/lbdb: Added to 13.0 repository
-rw-r--r-- | misc/lbdb/README | 6 | ||||
-rw-r--r-- | misc/lbdb/README.Slackware | 209 | ||||
-rw-r--r-- | misc/lbdb/doinst.sh | 15 | ||||
-rw-r--r-- | misc/lbdb/lbdb.SlackBuild | 98 | ||||
-rw-r--r-- | misc/lbdb/lbdb.info | 10 | ||||
-rw-r--r-- | misc/lbdb/slack-desc | 19 |
6 files changed, 357 insertions, 0 deletions
diff --git a/misc/lbdb/README b/misc/lbdb/README new file mode 100644 index 000000000000..2e698c7c7882 --- /dev/null +++ b/misc/lbdb/README @@ -0,0 +1,6 @@ +The Little Brother's Database + +This package was inspired by the Big Brother Database package +available for various Emacs mailers, and by Brandon Long's "external +query" patch for the mutt mail user agent (Note that this patch has +been incorporated into the main-line mutt versions as of mutt 0.93.) diff --git a/misc/lbdb/README.Slackware b/misc/lbdb/README.Slackware new file mode 100644 index 000000000000..a5138863b830 --- /dev/null +++ b/misc/lbdb/README.Slackware @@ -0,0 +1,209 @@ + The Little Brother's Database + + Roland Rosenfeld <roland@spinnaker.de> (current maintainer) + Thomas Roessler <roessler@guug.de> (initial author) + +This package was inspired by the Big Brother Database package +available for various Emacs mailers, and by Brandon Long's "external +query" patch for the mutt mail user agent (Note that this patch has +been incorporated into the main-line mutt versions as of mutt 0.93.) + +The package doesn't use any formal database libraries or languages, +although it should be quite easy to extend it to use, e.g., an +installed PostgreSQL server as it's backend. + +For querying the Little Brother, just type "lbdbq <something>". lbdbq +will now attempt to invoke various modules to gather information about +persons matching "<something>". E.g., it may look at a list of +addresses from which you have received mail, it may look at YP maps, +or it may try to finger <something>@<various hosts>. + +The behavior is configurable: Upon startup, lbdbq will source the +shell scripts + + /usr/local/etc/lbdb.rc (or where your @sysconfdir@ points to) + $HOME/.lbdbrc + $HOME/.lbdb/lbdbrc + $HOME/.lbdb/rc + +if they exist. + +They can be used to set the following global variables: + +- MODULES_PATH: Where lbdbq should look for modules + +- METHODS: What modules to use. + +- SORT_OUTPUT: Set this to "false" or "no" and lbdbq won't sort the + addresses but returns them in reverse order (which means that the + most recent address in m_inmail database is first). If you set this + to "name", lbdbq sorts the output by real name. If you set this to + "comment", it sort the output by the comment (for example the date + in m_inmail). If you set this to "address", lbdbq sorts the output + by addresses (that's the default). + + +Note that there _are_ defaults, so you should most probably modify +these variables using constructs like this: + + MODULES_PATH="MODULES_PATH $HOME/lbdb_modules" + +Additionally, modules may have configuration variables of their own. + +Currently the following modules are supplied with lbdb: + +m_finger + This module will use finger to find out something more about a + person. The list of hosts do be asked is configurable; use the + M_FINGER_HOSTS variable. Note that "localhost" will mean an + invocation of your local finger(1) binary, and should thus work + even if you don't provide the finger service to the network. + m_finger tries to find out the machines mail domain name in + /etc/mailname, by parsing a sendmail.cf file (if it finds one) + and by reading /etc/hostname and /etc/HOSTNAME. + +m_inmail + This module will look up user name fragments in a list of mail + addresses created by lbdb-fetchaddr(1). + +m_passwd + This module searches for matching entries in your local + /etc/passwd file. It evaluates the local machine mail domain in + the same way m_finger does. If you set PASSWD_IGNORESYS=true, + this module ignores all system accounts and only finds UIDs + between 1000 and 29999 (all other UIDs are reserved on a Debian + system). + +m_yppasswd + This module searches for matching entries in your NIS password + file using the command "ypcat passwd". + +m_nispasswd + This module searches for matching entries in the NIS+ password + database using the command ``niscat passwd.org_dir''. + +m_getent + This module searches for matching entries in whatever password + database is configured using the command ``getent passwd''. + +m_pgp2, m_pgp5, m_gpg + These modules scan your PGP 2.*, PGP 5.* or GnuPG public key + ring for data. They use the programs pgp(1), pgpk(1), or gpg(1) + to get the data. + +m_fido + This module searches your Fido nodelist, stored in + $HOME/.lbdb/nodelist created by nodelist2lbdb(1). + +m_abook + This module uses the program abook + (http://www.linuxstart.com/~jheinonen/abook/), a text based + address book application to search for addresses. You can + define multiple abook address books by setting the variable + ABOOK_FILES to a space separated list. + +m_addr_email + This module uses addr-email from the addressbook + (http://red.roses.de/~clemens/addressbook/) Tk program to + search for addresses. + +m_muttalias + This module searches the variable MUTTALIAS_FILES (a space + separated list) of files in MUTT_DIRECTORY that contain mutt + aliases. File names without leading slash will have + MUTT_DIRECTORY (defaults to $HOME/.mutt or $HOME, if + $HOME/.mutt does not exist) prepended before the file name. + Absolute file names (beginning with /) will be taken direct. + +m_pine + This module searches pine(1) addressbook files for + aliases. To realize this it first inspects the variable PINERC. + If it isn't set, the default `/etc/pine.conf + /etc/pine.conf.fixed .pinerc' is used. To suppress inspecting + the PINERC variable, set it to "no". It than takes all + address-book and global-address-book entries from these pinerc + files and adds the contents of the variable PINE_ADDRESSBOOKS + to the list, which defaults to `/etc/addressbook .addressbook'. + Then these addressbooks are searched for aliases. All filenames + without leading slash are searched in $HOME. + +m_palm + This module searches the Palm address database using the + Palm::PDB and Palm::Address Perl modules from CPAN. It + searches in the variable PALM_ADDRESS_DATABASE or if this isn't + set in $HOME/.jpilot/AddressDB.pdb. + +m_gnomecard + This module searches for addresses in your GnomeCard database + files. The variable GNOMECARD_FILES is a whitespace separated + list of GnomeCard data files. If this variable isn't defined, + the module searches in $HOME/.gnome/GnomeCard for the GnomeCard + database or at least falls back to $HOME/.gnome/GnomeCard.gcrd. + If a filename does not start with a slash, it is prefixed with + $HOME/. + +m_bbdb + This module searches for addresses in your (X)Emacs BBDB (big + brother database). It doesn't access ~/.bbdb directly (yet) + but calls (x)emacs with a special mode to get the information + (so don't expect too much performance in this module). You can + configure the EMACS variable to tell this module which emacsen + to use. Otherwise it will fall back to emacs or xemacs. + +m_ldap + This module queries an LDAP server using the Net::LDAP Perl + modules from CPAN. It can be configured using an external + resource file (for more details please refer to the + mutt_ldap_query(1) manual page). + +m_wanderlust + This module searches for addresses stored in your + $WANDERLUST_ADDRESSES (or by default in $HOME/.addresses) file, + an addressbook of WanderLust. + +m_osx_addressbook + This module queries the OS X AddressBook. It is only available + on OS X systems. + +m_evolution + This module queries the Ximian Evolution address book using the + evolution-addressbook-export application. + +m_vcf + This module uses libvformat to search for addresses from the + space-separated set of vCard files defined in $VCF_FILES. + + +Feel free to create your own modules to query other kinds of +databases. m_finger should be a good example of how to do it. + +If you create your own modules or have other changes and feel that +they could be helpful for others, don't hesitate to submit them to me +for inclusion in later releases. + +Finally, to use lbdbq from mutt, add the following line to your +~/.muttrc: + + set query_command="lbdbq %s" + + +CREDITS +------- + +Most of the really interesting code of this program (namely, the RFC +822 address parser used by lbdb-fetchaddr) was stolen from Michael +Elkins' mutt mail user agent. Additional credits go to Brandon Long +for putting the query functionality into mutt. + +Many thanks to the authors of the several modules and extensions: +- Ross Campbell <rcampbel@us.oracle.com> (m_abook, m_yppasswd) +- Marc de Courville <marc@courville.org> (m_ldap, mutt_ldap_query) +- Brendan Cully <brendan@kublai.com> (m_osx_addressbook, m_vcf) +- Gabor Fleischer <flocsy@mtesz.hu> (m_pine) +- Rick Frankel <rick@rickster.com> (m_gnomecard) +- Guido Guenther <agx@sigxcpu.org> (m_evolution) +- Utz-Uwe Haus <haus@uuhaus.de> (m_bbdb, m_nispasswd) +- Torsten Jerzembeck <toje@nightingale.ms.sub.org> (m_addr_email) +- Gergely Nagy <algernon@debian.org> (m_wanderlust) +- Dave Pearson <davep@davep.org> (m_palm, lbdb.el) +- Brian Salter-Duke <b_duke@bigpond.net.au> (m_muttalias) diff --git a/misc/lbdb/doinst.sh b/misc/lbdb/doinst.sh new file mode 100644 index 000000000000..d2f0159dbd95 --- /dev/null +++ b/misc/lbdb/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/lbdb.rc.new +config etc/lbdb_ldap.rc.new diff --git a/misc/lbdb/lbdb.SlackBuild b/misc/lbdb/lbdb.SlackBuild new file mode 100644 index 000000000000..4b8ed85a4bc2 --- /dev/null +++ b/misc/lbdb/lbdb.SlackBuild @@ -0,0 +1,98 @@ +#!/bin/sh + +# Slackware build script for coolkey + +# Copyright 2009 Raymond Bailey <bailey@akamai.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=lbdb +VERSION=${VERSION:-0.36} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM\_$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib${LIBDIRSUFFIX}/lbdb \ + --enable-confdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install_prefix=$PKG install + +mv $PKG/etc/lbdb_ldap.rc $PKG/etc/lbdb_ldap.rc.new +mv $PKG/etc/lbdb.rc $PKG/etc/lbdb.rc.new + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ +cp -a README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.Slackware > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/lbdb/lbdb.info b/misc/lbdb/lbdb.info new file mode 100644 index 000000000000..b5c55b75c1a5 --- /dev/null +++ b/misc/lbdb/lbdb.info @@ -0,0 +1,10 @@ +PRGNAM="lbdb" +VERSION="0.36" +HOMEPAGE="http://www.spinnaker.de/lbdb/" +DOWNLOAD="http://www.spinnaker.de/debian/lbdb_0.36.tar.gz" +MD5SUM="12d9bf7ef3ef526f0d82604a8f9add9c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Andy Bailey" +EMAIL="GooseYArd@gmail.com" +APPROVED="dsomero" diff --git a/misc/lbdb/slack-desc b/misc/lbdb/slack-desc new file mode 100644 index 000000000000..ffe28ba726dc --- /dev/null +++ b/misc/lbdb/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------------| +lbdb: lbdb (The Little Brother's Database) +lbdb: +lbdb: This package consists of a set of small tools, which collect mail +lbdb: addresses from several sources and offer these addresses to the +lbdb: mutt external query feature. +lbdb: +lbdb: +lbdb: +lbdb: +lbdb: +lbdb: |