From 71aad3f90226d3a65014c6fff4f2fc7ea37c3b58 Mon Sep 17 00:00:00 2001 From: Roland Rosenfeld Date: Fri, 29 Mar 2002 22:03:19 +0000 Subject: [PATCH] Debian directory added. --- debian/changelog | 6 ++ debian/control | 21 +++++++ debian/copyright | 49 ++++++++++++++++ debian/dirs | 4 ++ debian/doc-base.developer | 12 ++++ debian/doc-base.faq | 11 ++++ debian/doc-base.user | 10 ++++ debian/docs | 6 ++ debian/init.d | 59 +++++++++++++++++++ debian/logrotate | 21 +++++++ debian/manpages | 1 + debian/postinst | 54 +++++++++++++++++ debian/postrm | 44 ++++++++++++++ debian/rules | 119 ++++++++++++++++++++++++++++++++++++++ 14 files changed, 417 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/doc-base.developer create mode 100644 debian/doc-base.faq create mode 100644 debian/doc-base.user create mode 100644 debian/docs create mode 100644 debian/init.d create mode 100644 debian/logrotate create mode 100644 debian/manpages create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100755 debian/rules diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..a29c0aa0 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +privoxy (2.9.13-beta-1) unstable; urgency=low + + * Initial Release. + + -- Roland Rosenfeld Fri, 29 Mar 2002 11:52:03 +0100 + diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..a7e6304d --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: privoxy +Section: web +Priority: optional +Maintainer: Roland Rosenfeld +Build-Depends: debhelper (>> 3.0.0), autoconf, libpcre3-dev +Standards-Version: 3.5.6 + +Package: privoxy +Architecture: any +Depends: ${shlibs:Depends}, logrotate, adduser +Description: Privacy enhancing HTTP Proxy + Privoxy is an instrumentable HTTP proxy that filters the HTTP data + stream between web servers and browsers. Privoxy can be used to + protect privacy, manage cookies, filter web page content, manage + access restrictions, and to discard such annoying Internet junk as + ads, banners, and pop-ups. Or whatever other annoyances strike your + fancy. + . + Privoxy is a derivate of junkbuster, but it uses a different name + space and a different port (8118), so junkbuster and privoxy can + coexist on one system. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..2ae2775c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,49 @@ +This package was debianized by Roland Rosenfeld on +Fri, 29 Mar 2002 11:52:03 +0100. + +It was downloaded from http://privoxy.org/ and +http://sourceforge.net/project/showfiles.php?group_id=11118 + +Upstream Authors: ijbswa-developers@lists.sourceforge.net + +Current Project developers: + + Stefan Waldherr + Andreas Oesterhelt + Jon Foster + + Markus Breitenbach + Thomas Steudten + +Originally developed by: + + Junkbusters Corp. + Anonymous Coders + +Copyright: Written by and Copyright (C) 2001 the SourceForge + Privoxy team. http://ijbswa.sourceforge.net + + Based on the Internet Junkbuster originally written + by and Copyright (C) 1997 Anonymous Coders and + Junkbusters Corporation. http://www.junkbusters.com + + 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 2 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. + + The GNU General Public License should be included with + this file. If not, you can view it at + http://www.gnu.org/copyleft/gpl.html + or write to the Free Software Foundation, Inc., 59 + Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +The complete GNU General Public License can be found at +/usr/share/common-licenses/GPL diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 00000000..3414d3bc --- /dev/null +++ b/debian/dirs @@ -0,0 +1,4 @@ +etc/privoxy +usr/sbin +usr/share/doc/privoxy +var/log/privoxy diff --git a/debian/doc-base.developer b/debian/doc-base.developer new file mode 100644 index 00000000..6a606b90 --- /dev/null +++ b/debian/doc-base.developer @@ -0,0 +1,12 @@ +Document: privoxy-developer +Title: Privoxy Developer Manual +Author: Privoxy Developers +Abstract: The provoxy developer manual gives the users information on + how to help the developer team. It provides guidance on coding, + testing, documentation and other issues. Privoxy is a filtering web + proxy. +Section: Apps/Net + +Format: HTML +Index: /usr/share/doc/privoxy/developer-manual/index.html +Files: /usr/share/doc/privoxy/developer-manual/*.html diff --git a/debian/doc-base.faq b/debian/doc-base.faq new file mode 100644 index 00000000..117c2a3b --- /dev/null +++ b/debian/doc-base.faq @@ -0,0 +1,11 @@ +Document: privoxy-faq +Title: Privoxy Frequently Asked Questions +Author: Privoxy Developers +Abstract: The FAQ document gives users and developers alike answers to + frequently asked questions about Privoxy. Privoxy is a filtering web + proxy. +Section: Apps/Net + +Format: HTML +Index: /usr/share/doc/privoxy/faq/index.html +Files: /usr/share/doc/privoxy/faq/*.html diff --git a/debian/doc-base.user b/debian/doc-base.user new file mode 100644 index 00000000..2a7f5e69 --- /dev/null +++ b/debian/doc-base.user @@ -0,0 +1,10 @@ +Document: privoxy-user +Title: Privoxy User Manual +Author: Privoxy Developers +Abstract: The user manual gives users information on how to install, + configure and use Privoxy. Privoxy is a filtering web proxy. +Section: Apps/Net + +Format: HTML +Index: /usr/share/doc/privoxy/user-manual/index.html +Files: /usr/share/doc/privoxy/user-manual/*.html diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..4e98cf44 --- /dev/null +++ b/debian/docs @@ -0,0 +1,6 @@ +README +AUTHORS +doc/text/faq.txt +doc/text/user-manual.txt +doc/text/developer-manual.txt + diff --git a/debian/init.d b/debian/init.d new file mode 100644 index 00000000..cca3a8be --- /dev/null +++ b/debian/init.d @@ -0,0 +1,59 @@ +#! /bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/privoxy +NAME=privoxy +DESC="filtering proxy server" +OWNER=privoxy +CONFIGFILE=/etc/privoxy/config +PIDFILE=/var/run/$NAME.pid + +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + $DAEMON --pidfile $PIDFILE --user $OWNER $CONFIGFILE 2>/dev/null + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \ + --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 "Restarting $DESC: " + start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON + sleep 1 + $DAEMON --pidfile $PIDFILE --user $OWNER $CONFIGFILE + ;; + *) + 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/logrotate b/debian/logrotate new file mode 100644 index 00000000..d230a8b0 --- /dev/null +++ b/debian/logrotate @@ -0,0 +1,21 @@ +/var/log/privoxy/logfile { + create 0640 privoxy adm + missingok + weekly + rotate 7 + compress + postrotate + touch /etc/privoxy/config + endscript +} + +/var/log/privoxy/jarfile { + create 0640 privoxy adm + missingok + weekly + rotate 7 + compress + postrotate + touch /etc/privoxy/config + endscript +} diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 00000000..66709657 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +privoxy.1 diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 00000000..7820372c --- /dev/null +++ b/debian/postinst @@ -0,0 +1,54 @@ +#! /bin/sh +# postinst script for privoxy +# +# 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 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) + if ! grep -q '^privoxy:' /etc/passwd + then + adduser --system --home /etc/privoxy --ingroup nogroup \ + --disabled-password privoxy >/dev/null + fi + chown -R privoxy.adm /var/log/privoxy + chmod 750 /var/log/privoxy + ;; + + 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 + + diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 00000000..2c9e371a --- /dev/null +++ b/debian/postrm @@ -0,0 +1,44 @@ +#! /bin/sh +# postrm script for privoxy +# +# 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 http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + echo "Removing user privoxy" + userdel privoxy || echo "WARNING: Problem removing user privoxy." + + echo "Deleting privoxy log files" + rm -rf /var/log/privoxy + ;; + + 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 diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..6fecafde --- /dev/null +++ b/debian/rules @@ -0,0 +1,119 @@ +#!/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 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +DEBDIR=`pwd`/debian/privoxy + +CFLAGS="-O2" +WITHDEBUG="" +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g + WITHDEBUG="--with-debug" +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + + autoheader + autoconf + env CFLAGS=$(CFLAGS) \ + ./configure --prefix=/usr --sysconfdir=/etc \ + --mandir=/usr/share/man --with-docbook=no \ + $(WITHDEBUG) + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + -$(MAKE) clean + rm -f privoxy + rm -f configure config.h config.h.in config.log config.cache \ + config.status GNUmakefile + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy + + sed -e 's/^\(\(trust\|proxy\)-info-url\|admin-address\)/#\1/' \ + -e 's#^confdir \.#confdir /etc/privoxy#' \ + -e 's#^logdir \.#logdir /var/log/privoxy#' \ + < config > $(DEBDIR)/etc/privoxy/config + install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action + install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter + install -m 0644 trust $(DEBDIR)/etc/privoxy/trust + + cp -r templates $(DEBDIR)/etc/privoxy/ + rm -f $(DEBDIR)/etc/privoxy/templates/*~ + rm -rf $(DEBDIR)/etc/privoxy/templates/CVS + + cp -r doc/webserver/user-manual $(DEBDIR)/usr/share/doc/privoxy/ + cp -r doc/webserver/faq $(DEBDIR)/usr/share/doc/privoxy/ + cp -r doc/webserver/developer-manual $(DEBDIR)/usr/share/doc/privoxy/ + + +# 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 ChangeLog + 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 -- 2.39.2