From e1ae1a59b53ec391cc1b9442afd4b9f1f0f31730 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Jun 2001 21:40:55 +0000 Subject: [PATCH 1/1] add deb packaging foo (doesn't work yet) --- debian/README.Debian | 6 ++ debian/changelog | 9 +++ debian/conffiles.ex | 7 +++ debian/control | 82 ++++++++++++++++++++++++++ debian/copyright | 10 ++++ debian/cron.d.ex | 4 ++ debian/dirs | 2 + debian/docs | 3 + debian/ex.doc-base.package | 22 +++++++ debian/freeside-doc.docs | 2 + debian/freeside-doc.files | 2 + debian/init.d.ex | 70 ++++++++++++++++++++++ debian/manpage.1.ex | 60 +++++++++++++++++++ debian/manpage.sgml.ex | 143 +++++++++++++++++++++++++++++++++++++++++++++ debian/menu.ex | 2 + debian/postinst.ex | 47 +++++++++++++++ debian/postrm.ex | 36 ++++++++++++ debian/preinst.ex | 42 +++++++++++++ debian/prerm.ex | 37 ++++++++++++ debian/rules | 113 +++++++++++++++++++++++++++++++++++ debian/watch.ex | 5 ++ 21 files changed, 704 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/conffiles.ex create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/cron.d.ex create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/ex.doc-base.package create mode 100644 debian/freeside-doc.docs create mode 100644 debian/freeside-doc.files create mode 100644 debian/init.d.ex create mode 100644 debian/manpage.1.ex create mode 100644 debian/manpage.sgml.ex create mode 100644 debian/menu.ex create mode 100644 debian/postinst.ex create mode 100644 debian/postrm.ex create mode 100644 debian/preinst.ex create mode 100644 debian/prerm.ex create mode 100755 debian/rules create mode 100644 debian/watch.ex diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 000000000..b51eee8d5 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +freeside for Debian +------------------- + + + + -- Ivan Kohler , Thu, 12 Apr 2001 15:49:17 -0700 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..5734b1fc8 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,9 @@ +freeside (1.3.1-1) unstable; urgency=low + + * Initial Release. + + -- Ivan Kohler Thu, 12 Apr 2001 15:49:17 -0700 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/conffiles.ex b/debian/conffiles.ex new file mode 100644 index 000000000..8686d2af8 --- /dev/null +++ b/debian/conffiles.ex @@ -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 section 9.1 of the packaging manual. +# +# for example: +# /etc/freeside/freeside.conf diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..2f66fd395 --- /dev/null +++ b/debian/control @@ -0,0 +1,82 @@ +Source: freeside +Section: admin +Priority: optional +Maintainer: Ivan Kohler +Build-Depends: debhelper (>> 3.0.0) +Standards-Version: 3.5.2 + +Package: freeside +Architecture: any +Depends: freeside-lib +Recommends: freeside-doc, freeside-ui-webui, libterm-query-perl +Suggests: freeside-passwd-server, freeside-signup-server, freeside-session-server +Description: Billing and administration package for ISPs. + Freeside is a billing and account administration package for ISPs. It stores + customer information in an SQL database, and will update UNIX passwd and + shadow files, and configuration for sendmail, qmail, BIND and/or Apache. + It is also useful as a central database of accounts/domains/web-space + for a large number of machines. + +Package: freeside-doc +Architecture: all +Description: Documentation for freeside + This package provides the HTML documentation for Freeside, a billing and + account administration package for ISPs. + +Package: freeside-lib +Architecture: all +Depends: libdigest-md5-perl, liburi-perl, libhtml-parser-perl, libnet-perl, liblocale-codes-perl, libnet-whois-perl, libwww-perl, libbusiness-creditcard-perl, mailtools, libtimedate-perl, libdate-manip-perl, libfile-counterfile-perl, libfreezethaw-perl, libtext-template-perl, libdbd-pg-perl +Description: Freeside libraries and extension API + This package contains the libraries which implement the business logic and + backend functions of Freeside, a billing and account administration package + for ISPs. This package also contains the manual pages for the library API. + +Package: freeside-ui-web +Architecture: all +Depends: libstring-approx-perl, freeside-lib, libapache-mod-perl|apache-perl +Suggests: libapache-mod-ssl|apache-ssl +Description: Easy-to-use web interface for Freeside + This package contains the web interface for Freeside, a billing and account + administration package for ISPs. This is what sales or support folks will + typically use to add new accounts, edit exiting accounts and so on. + +Package: freeside-passwd-server +Architecture: all +Depends: freeside-lib +Description: Freeside password server + This component of Freeside, a billing and account administration package for + ISPs, + +Package: freeside-passwd-client +Architecture: all +Depends: +Description: + + +Package: freeside-signup-server +Architecture: all +Depends: freeside-lib +Description: + + +Package: freeside-signup-client +Architecture: all +Depends: +Description: + + +Package: freeside-signup-client-webui +Architecture: all +Depends: freeside-signup-client-lib, httpd +Description: + + +Package: freeside-session-server +Architecture: all +Depends: freeside-lib +Description: + + +Package: freeside-session-client +Architecture: all +Depends: ssh diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..e148fcec5 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Ivan Kohler on +Thu, 12 Apr 2001 15:49:17 -0700. + +It was downloaded from + +Upstream Author(s): + +Copyright: + + diff --git a/debian/cron.d.ex b/debian/cron.d.ex new file mode 100644 index 000000000..61c074da3 --- /dev/null +++ b/debian/cron.d.ex @@ -0,0 +1,4 @@ +# +# Regular cron jobs for the freeside package +# +0 4 * * * root freeside_maintenance diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 000000000..ca882bbb7 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100644 index 000000000..16636bd92 --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +INSTALL +README +TODO diff --git a/debian/ex.doc-base.package b/debian/ex.doc-base.package new file mode 100644 index 000000000..2a055d199 --- /dev/null +++ b/debian/ex.doc-base.package @@ -0,0 +1,22 @@ +Document: freeside +Title: Debian freeside Manual +Author: +Abstract: This manual describes what freeside is + and how it can be used to + manage online manuals on Debian systems. +Section: unknown + +Format: debiandoc-sgml +Files: /usr/share/doc/freeside/freeside.sgml.gz + +Format: postscript +Files: /usr/share/doc/freeside/freeside.ps.gz + +Format: text +Files: /usr/share/doc/freeside/freeside.text.gz + +Format: HTML +Index: /usr/share/doc/freeside/html/index.html +Files: /usr/share/doc/freeside/html/*.html + + diff --git a/debian/freeside-doc.docs b/debian/freeside-doc.docs new file mode 100644 index 000000000..299950c58 --- /dev/null +++ b/debian/freeside-doc.docs @@ -0,0 +1,2 @@ +#DOCS# + diff --git a/debian/freeside-doc.files b/debian/freeside-doc.files new file mode 100644 index 000000000..299950c58 --- /dev/null +++ b/debian/freeside-doc.files @@ -0,0 +1,2 @@ +#DOCS# + diff --git a/debian/init.d.ex b/debian/init.d.ex new file mode 100644 index 000000000..57910493a --- /dev/null +++ b/debian/init.d.ex @@ -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 . +# Modified for Debian GNU/Linux +# by Ian Murdock . +# +# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl +# +# This file was automatically customized by dh-make on Thu, 12 Apr 2001 15:49:17 -0700 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/freeside +NAME=freeside +DESC=freeside + +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 --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 diff --git a/debian/manpage.1.ex b/debian/manpage.1.ex new file mode 100644 index 000000000..ec542bb05 --- /dev/null +++ b/debian/manpage.1.ex @@ -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 FREESIDE SECTION "April 12, 2001" +.\" 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 insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +freeside \- program to do something +.SH SYNOPSIS +.B freeside +.RI [ options ] " files" ... +.br +.B bar +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B freeside +and +.B bar +commands. +This manual page was written for the Debian GNU/Linux 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\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBfreeside\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 Ivan Kohler , +for the Debian GNU/Linux system (but may be used by others). diff --git a/debian/manpage.sgml.ex b/debian/manpage.sgml.ex new file mode 100644 index 000000000..9bc3a8663 --- /dev/null +++ b/debian/manpage.sgml.ex @@ -0,0 +1,143 @@ + 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 $< > $@ + --> + + + FIRSTNAME"> + SURNAME"> + + April 12, 2001"> + + SECTION"> + ivan-debian@420.am"> + + FREESIDE"> + + + Debian GNU/Linux"> + GNU"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2001 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to do something + + + + &dhpackage; + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; and 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. + + &dhpackage; is a program that... + + + + 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. + + + + + + + + Show summary of options. + + + + + + + + Show version of program. + + + + + + SEE ALSO + + bar (1), baz (1). + + The programs are documented fully by The Rise and + Fall of a Fooish Bar available via the + Info system. + + + AUTHOR + + 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 GNU 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. + + +
+ + diff --git a/debian/menu.ex b/debian/menu.ex new file mode 100644 index 000000000..ddc947e9c --- /dev/null +++ b/debian/menu.ex @@ -0,0 +1,2 @@ +?package(freeside):needs=X11|text|vc|wm section=Apps/see-menu-manual\ + title="freeside" command="/usr/bin/freeside" diff --git a/debian/postinst.ex b/debian/postinst.ex new file mode 100644 index 000000000..c4d4bfba8 --- /dev/null +++ b/debian/postinst.ex @@ -0,0 +1,47 @@ +#! /bin/sh +# postinst script for freeside +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ +# +# 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 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/postrm.ex b/debian/postrm.ex new file mode 100644 index 000000000..bed8abd3d --- /dev/null +++ b/debian/postrm.ex @@ -0,0 +1,36 @@ +#! /bin/sh +# postrm script for freeside +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + + + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + + diff --git a/debian/preinst.ex b/debian/preinst.ex new file mode 100644 index 000000000..0b42bb28f --- /dev/null +++ b/debian/preinst.ex @@ -0,0 +1,42 @@ +#! /bin/sh +# preinst script for freeside +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# +# For details see /usr/share/doc/packaging-manual/ + +case "$1" in + install|upgrade) +# if [ "$1" = "upgrade" ] +# then +# start-stop-daemon --stop --quiet --oknodo \ +# --pidfile /var/run/freeside.pid \ +# --exec /usr/sbin/freeside 2>/dev/null || true +# fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/prerm.ex b/debian/prerm.ex new file mode 100644 index 000000000..ebb87c540 --- /dev/null +++ b/debian/prerm.ex @@ -0,0 +1,37 @@ +#! /bin/sh +# prerm script for freeside +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + remove|upgrade|deconfigure) +# install-info --quiet --remove /usr/info/freeside.info.gz + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..71016c406 --- /dev/null +++ b/debian/rules @@ -0,0 +1,113 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 by Joey Hess. +# +# This version is for a hypothetical package that builds an +# architecture-dependant package, as well as an architecture-independent +# package. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + 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: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/freeside. + $(MAKE) install DESTDIR=$(CURDIR)/debian/freeside + + dh_movefiles + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: build install + dh_testdir -i + dh_testroot -i +# dh_installdebconf -i + dh_installdocs -i + dh_installexamples -i + dh_installmenu -i +# dh_installlogrotate -i +# dh_installemacsen -i +# dh_installpam -i +# dh_installmime -i +# dh_installinit -i + dh_installcron -i +# dh_installman -i + dh_installinfo -i +# dh_undocumented -i + dh_installchangelogs -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i +# dh_perl -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -a + dh_testroot -a +# dh_installdebconf -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a +# dh_installlogrotate -a +# dh_installemacsen -a +# dh_installpam -a +# dh_installmime -a +# dh_installinit -a + dh_installcron -a +# dh_installman -a + dh_installinfo -a +# dh_undocumented -a + dh_installchangelogs -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a +# dh_makeshlibs -a + dh_installdeb -a +# dh_perl -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/debian/watch.ex b/debian/watch.ex new file mode 100644 index 000000000..3f57ae020 --- /dev/null +++ b/debian/watch.ex @@ -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 freeside-(.*)\.tar\.gz debian uupdate -- 2.11.0