Public :)
authorheiko
Thu, 18 Aug 2005 00:08:49 +0000
changeset 0 e05dded1b622
child 1 a918a61afe98
Public :)
Makefile
config.pm
debian/README.Debian
debian/changelog
debian/conffiles
debian/conffiles.ex
debian/control
debian/copyright
debian/cron.d.ex
debian/dirs
debian/docs
debian/ex.package.doc-base
debian/init.d.ex
debian/manpage.1.ex
debian/manpage.sgml.ex
debian/menu.ex
debian/postinst.ex
debian/postrm.ex
debian/preinst.ex
debian/prerm.ex
debian/rules
debian/watch.ex
log.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,24 @@
+prefix = /usr/local
+bindir = $(prefix)/bin
+sysconfdir = /etc/logbuch
+
+bin_SCRIPTS = log
+
+
+all:	$(bin_SCRIPTS)
+
+install:	all
+	install -d $(DESTDIR)/$(sysconfdir)
+	test -f $(DESTDIR)/$(sysconfdir)/config.pm \
+		|| install -m644 config.pm $(DESTDIR)/$(sysconfdir)/config.pm
+	install -d $(bindir)
+	install -m755 $(bin_SCRIPTS) $(DESTDIR)/$(bindir)/
+	cd $(DESTDIR)/$(bindir) && ln -sf log logbuch
+
+clean:
+	-rm -f $(bin_SCRIPTS)
+
+%:	%.pl
+	perl -c $<
+	cp -f $< $@
+	chmod -w+x $@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config.pm	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,2 @@
+package config;
+@mailto = qw(root@localhost);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/README.Debian	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,6 @@
+logbuch for Debian
+------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>, Fri,  4 Apr 2003 10:03:49 +0200
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/changelog	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,86 @@
+logbuch (0.15-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Wed, 01 Jun 2005 16:50:31 +0200
+
+logbuch (0.14-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Wed, 01 Jun 2005 16:50:31 +0200
+
+logbuch (0.13-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Wed, 01 Jun 2005 16:50:31 +0200
+
+logbuch (0.12-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Wed, 14 Jan 2004 10:08:15 +0100
+
+logbuch (0.10-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Wed, 16 Apr 2003 09:32:10 +0200
+logbuch (0.9-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Tue,  8 Apr 2003 15:43:11 +0200
+
+logbuch (0.8-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Tue,  8 Apr 2003 12:41:27 +0200
+logbuch (0.7-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Tue,  8 Apr 2003 12:41:27 +0200
+
+logbuch (0.6-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Tue,  8 Apr 2003 12:40:27 +0200
+
+logbuch (0.5-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Tue,  8 Apr 2003 09:49:27 +0200
+
+logbuch (0.4-2) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Tue,  8 Apr 2003 00:31:27 +0200
+
+logbuch (0.3-2) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Fri,  4 Apr 2003 17:58:52 +0200
+logbuch (0.2-2) unstable; urgency=low
+
+  * depends on dbi, dbd
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Fri,  4 Apr 2003 17:26:53 +0200
+
+logbuch (0.2-1) unstable; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Fri,  4 Apr 2003 11:39:43 +0200
+logbuch (0.1-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Heiko Schlittermann <heiko@schlittermann.de>  Fri,  4 Apr 2003 10:03:49 +0200
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/conffiles	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,1 @@
+/etc/logbuch/config.pm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/conffiles.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,7 @@
+#
+# If you want to use this conffile, remove all comments and put files that
+# you want dpkg to process here using their absolute pathnames.
+# See the policy manual
+#
+# for example:
+# /etc/logbuch/logbuch.conf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/control	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,13 @@
+Source: logbuch
+Section: unknown
+Priority: optional
+Maintainer: Heiko Schlittermann <heiko@schlittermann.de>
+Build-Depends: debhelper (>> 3.0.0)
+Standards-Version: 3.5.2
+
+Package: logbuch
+Architecture: any
+Depends: ${perl:Depends}, libdbi-perl, libdbd-mysql-perl,
+    libmailtools-perl
+Description: Logbuch for server maintainance
+ A simple script for tracking server changes in a logfile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/copyright	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,10 @@
+This package was debianized by Heiko Schlittermann <heiko@schlittermann.de> on
+Fri,  4 Apr 2003 10:03:49 +0200.
+
+It was downloaded from <fill in ftp site>
+
+Upstream Author(s): <put author(s) name and email here>
+
+Copyright:
+
+<Must follow here>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/cron.d.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,4 @@
+#
+# Regular cron jobs for the logbuch package
+#
+0 4	* * *	root	logbuch_maintenance
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/dirs	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/ex.package.doc-base	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,22 @@
+Document: logbuch
+Title: Debian logbuch Manual
+Author: <insert document author here>
+Abstract: This manual describes what logbuch is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/logbuch/logbuch.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/logbuch/logbuch.ps.gz
+
+Format: text
+Files: /usr/share/doc/logbuch/logbuch.text.gz
+
+Format: HTML
+Index: /usr/share/doc/logbuch/html/index.html
+Files: /usr/share/doc/logbuch/html/*.html
+
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/init.d.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,70 @@
+#! /bin/sh
+#
+# skeleton	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#		Modified for Debian GNU/Linux
+#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
+#
+# This file was automatically customized by dh-make on Fri,  4 Apr 2003 10:03:49 +0200
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/logbuch
+NAME=logbuch
+DESC=logbuch
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  #reload)
+	#
+	#	If the daemon can reload its config files on the fly
+	#	for example by sending it SIGHUP, do it here.
+	#
+	#	If the daemon responds to changes in its config file
+	#	directly anyway, make this a do-nothing entry.
+	#
+	# echo "Reloading $DESC configuration files."
+	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
+	#	/var/run/$NAME.pid --exec $DAEMON
+  #;;
+  restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	echo -n "Restarting $DESC: "
+	start-stop-daemon --stop --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/manpage.1.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,60 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH LOGBUCH SECTION "April  4, 2003"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+logbuch \- program to do something
+.SH SYNOPSIS
+.B logbuch
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B logbuch
+and
+.B bar
+commands.
+This manual page was written for the Debian distribution
+because the original program does not have a manual page.
+Instead, it has documentation in the GNU Info format; see below.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBlogbuch\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+This manual page was written by Heiko Schlittermann <heiko@schlittermann.de>,
+for the Debian GNU/Linux system (but may be used by others).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/manpage.sgml.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,152 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+     less'.  A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+	docbook-to-man $< > $@
+
+    
+	The docbook-to-man binary is found in the docbook-to-man package.
+	Please remember that if you create the nroff version in one of the
+	debian/rules file targets (such as build), you will need to include
+	docbook-to-man in your Build-Depends control field.
+
+  -->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
+  <!ENTITY dhsurname   "<surname>SURNAME</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>April  4, 2003</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>SECTION</manvolnum>">
+  <!ENTITY dhemail     "<email>heiko@schlittermann.de</email>">
+  <!ENTITY dhusername  "Heiko Schlittermann">
+  <!ENTITY dhucpackage "<refentrytitle>LOGBUCH</refentrytitle>">
+  <!ENTITY dhpackage   "logbuch">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2001</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>program to do something</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option>-e <replaceable>this</replaceable></option></arg>
+
+      <arg><option>--example <replaceable>that</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> and <command>bar</command>
+      commands.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in the &gnu;
+      <application>Info</application> format; see below.</para>
+
+    <para><command>&dhpackage;</command> is a program that...</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual GNU command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below.  For a complete description, see the
+      <application>Info</application> files.</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-v</option>
+          <option>--version</option>
+        </term>
+        <listitem>
+          <para>Show version of program.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>bar (1), baz (1).</para>
+
+    <para>The programs are documented fully by <citetitle>The Rise and
+      Fall of a Fooish Bar</citetitle> available via the
+      <application>Info</application> system.</para>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the <acronym>GNU</acronym> Free Documentation
+      License, Version 1.1 or any later version published by the Free
+      Software Foundation; with no Invariant Sections, no Front-Cover
+      Texts and no Back-Cover Texts.</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/menu.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,2 @@
+?package(logbuch):needs=X11|text|vc|wm section=Apps/see-menu-manual\
+  title="logbuch" command="/usr/bin/logbuch"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/postinst.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,48 @@
+#! /bin/sh
+# postinst script for logbuch
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/postrm.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,38 @@
+#! /bin/sh
+# postrm script for logbuch
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/preinst.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,44 @@
+#! /bin/sh
+# preinst script for logbuch
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/logbuch.pid  \
+#                --exec /usr/sbin/logbuch 2>/dev/null || true
+#        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/prerm.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for logbuch
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/logbuch.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/rules	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,94 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=3
+
+
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE) prefix=/usr
+	#/usr/bin/docbook-to-man debian/logbuch.sgml > logbuch.1
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/logbuch.
+	$(MAKE) install DESTDIR=debian/logbuch prefix=/usr
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf	
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installman
+#	dh_installinfo
+#	dh_undocumented
+	dh_installchangelogs 
+#	dh_link
+#	dh_strip
+#	dh_compress
+#	dh_fixperms
+#	dh_makeshlibs
+	dh_installdeb
+	dh_perl
+#	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/watch.ex	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,5 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site		Directory		Pattern			Version	Script
+sunsite.unc.edu	/pub/Linux/Incoming	logbuch-(.*)\.tar\.gz	debian	uupdate
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/log.pl	Thu Aug 18 00:08:49 2005 +0000
@@ -0,0 +1,198 @@
+#! /usr/bin/perl 
+# $Id$
+# $URL$
+my $USAGE = <<'#';
+$ME [options]
+    --[no]db  insert into log database [$opt_db]
+    --[no]mail send mails to @config::mailto [$opt_mail]
+    --message=s message
+#
+
+use strict;
+use warnings;
+use File::Basename;
+use File::Temp qw(tempfile);
+use File::stat;
+use Getopt::Long;
+use Mail::Mailer;
+use DBI;
+
+use lib "/etc/logbuch";
+use config;
+
+# print @config::mailto, "\n";
+
+#+-------+---------------+------+-----+---------+----------------+
+#| Field | Type          | Null | Key | Default | Extra          |
+#+-------+---------------+------+-----+---------+----------------+
+#| id    | int(11)       |      | MUL | NULL    | auto_increment |
+#| host  | varchar(255)  | YES  |     | NULL    |                |
+#| date  | datetime      | YES  |     | NULL    |                |
+#| user  | varchar(255)  | YES  |     | NULL    |                |
+#| mailto| varchar(255)  | YES  |     | NULL    |                |
+#| text  | text          | YES  | MUL | NULL    |                |
+#| stamp | timestamp(14) | YES  |     | NULL    |                |
+#+-------+---------------+------+-----+---------+----------------+
+
+my $ME = basename $0;
+
+my $DSN = "DBI:mysql:logbuch:pu.schlittermann.de";
+my $USER = "logbuch";
+my $PW = "HIDDEN";
+
+my $LOG = "$ENV{HOME}/LOG";
+my $EDITOR = $ENV{VISUAL} || $ENV{EDITOR} || "vim";
+my $MAGIC = "#--- all changes below are ignored ---#\n";
+
+my $opt_db = 1;
+my $opt_mail = 1;
+my $opt_message = "";
+
+
+
+my $Dbh;
+
+sub identity();
+sub hostname();
+sub mailto();
+
+MAIN: {
+
+    GetOptions("db!" => \$opt_db, 
+	"mail!" => \$opt_mail,
+	"message=s" => \$opt_message)
+	or die eval "\"$USAGE\"";
+
+    if ($opt_message =~ /^\.?\// and -f $opt_message) {
+	@ARGV = ($opt_message);
+	$opt_message = join "", <>;
+    } elsif ($opt_message eq "-") {
+	$opt_message = join "", <STDIN>;
+    }
+
+    if ($opt_message =~ /\n/) {
+	$opt_message =~ s/\n/\n    /g;
+    }
+
+    if ($opt_db) {
+	$Dbh = DBI->connect($DSN, $USER, $PW, {RaiseError => 1})
+	    or die $DBI::errstr;
+	END { $Dbh->disconnect() if $Dbh; }
+    }
+
+    # Temporärfile öffnen
+    my ($fh, $file);
+    END { unlink $file if $file; }
+    ($fh, $file) = tempfile(DIR => "/tmp");
+
+    # Kopftext eintragen
+    print $fh 
+	    "Date: ", scalar(localtime()), "\n",
+	    "User: ", identity(), "\n",
+	    "MailTo: ", mailto(), "\n",
+	    "\n",
+	    "  * $opt_message",
+	    "\n",
+	    "\n", $MAGIC, "\n";
+
+    if (!-e $LOG) {
+	open(X, $_ = ">>$LOG") or die "Can't open $_: $!\n";
+	close X;
+    };
+
+    open(IN, $_ = $LOG) or die "Can't open $_: $!\n";
+    print $fh <IN>;
+    close IN;
+
+    if (!$opt_message) {
+	my $stamp = stat($file)->mtime();
+	system($EDITOR, "+5", $file);
+    
+	if ($stamp == stat($file)->mtime()) {
+	    print STDERR "Nothing changed.  Discarding the note.\n";
+	    unlink $file;
+	    exit 0;
+	}
+    }
+
+    # Jetzt wie versprochen den (eventuell geänderten Rest) aus der
+    # Temp-Datei wegschneiden
+    {
+	my ($date, $user, $head, $text, $mailto);
+	my $pos;
+
+	seek $fh, 0, 0;
+	for($pos = tell $fh; defined($_ = <$fh>); $pos = tell $fh) {
+
+	    $head .= "$_" if not $text and /^\S+:/;
+
+	    /^Date:\s+(.*)/ and $date = $1, next;
+	    /^User:\s+(.*)/ and $user = $1, next;
+	    /^MailTo:\s(.*)/ and $mailto = $1, next;
+	    last if $_ eq $MAGIC;
+
+	    $text .= $_ if /\S/ || $text;   # somit werden die ersten Leerzeilen übersprungen
+	}
+
+	$text  =~ s/\s*$//s; # Leerzeichen am Ende weg
+
+	truncate $fh, $pos;
+	seek $fh, 0, 2;
+
+	if ($opt_db) {
+	    my $sth = $Dbh->prepare("
+		    INSERT INTO log (host, date, user, mailto, text)
+		    VALUES(?, now(), ?, ?, ?)");
+	    $sth->execute(hostname(), $user, $mailto, $text);
+	    print STDERR "Database entry inserted\n";
+	}
+
+	if ($opt_mail and $mailto) {
+	    my $mailer = new Mail::Mailer "sendmail"
+		or die "Can't create Mailer: $!\n";
+
+	    my $subject = (split /\n/, $text)[0];
+	    $subject =~ s/^\s*\S\s//;
+	    $subject = "Service [". hostname(). "]: $subject";
+
+	    $mailer->open({
+		"To" => $mailto,
+		"Subject" => $subject});
+	    print $mailer $head, "\n", $text;
+	    close $mailer;
+	    print STDERR "Mail sent (to $mailto).\n";
+	}
+    }
+
+    # Und jetzt das aus der alten Datei dort anhängen
+    open(IN, $_ = $LOG) or die "Can't open $_: $!\n";
+    print $fh <IN>;
+    close $fh;
+    close IN;
+
+    rename $file, $LOG;
+
+}
+
+sub identity()
+{
+    my $user = `who am i`;
+    chomp $user;
+    $user .= " [" . ($ENV{REMOTE_USER} || "-") . "]";
+    return $user;
+}
+
+sub hostname()
+{
+    my $r = `hostname -f`;
+    chomp($r);
+    return $r;
+}
+
+sub mailto()
+{
+    return join(", ", @config::mailto);
+}
+
+# vim:sts=4 sw=4 aw ai sm:
+