From ed271591979c97d7ba9e2542f414c42a573676b3 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 1 May 2001 13:54:12 +0000 Subject: [PATCH] debian cvs git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@256 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- Makefile | 3 +- debian/changelog | 2 +- debian/control | 19 ++++++----- debian/rules | 75 +++++++++++++++++++++++++------------------- linkcheck/Logging.py | 25 ++++++++------- linkcheckerrc | 28 ++++++++--------- 6 files changed, 83 insertions(+), 69 deletions(-) diff --git a/Makefile b/Makefile index d6ad8f24..a44f9600 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ deb: # (linkchecker.1 -> undocumented.1) $(MAKE) cleandeb fakeroot debian/rules binary - fakeroot dpkg-buildpackage -sgpg -pgpg -k959C340F + fakeroot cvs-buildpackage -sgpg -pgpg -k959C340F .PHONY: packages packages: @@ -76,6 +76,7 @@ upload: distclean dist files VERSION scp linkchecker-out.* $(HTMLDIR) scp VERSION $(HTMLDIR)/raw/ scp dist/* $(FTPDIR)/ + scp dist/* $(HTMLDIR)/ ssh -C -t shell1.sourceforge.net "cd $(PACKAGEDIR) && make" .PHONY: test diff --git a/debian/changelog b/debian/changelog index 79634c8b..6827318d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linkchecker (1.3.0) unstable; urgency=low +linkchecker-ssl (1.3.0) unstable; urgency=low * require and use Python >= 2.0 * fix ignored configfile settings for loggers diff --git a/debian/control b/debian/control index 32947330..bb602183 100644 --- a/debian/control +++ b/debian/control @@ -1,17 +1,20 @@ -Source: linkchecker -Section: web +Source: linkchecker-ssl +Section: non-US/main Priority: optional Maintainer: Bastian Kleineidam -Build-Depends: python2-base, python2-dev, debhelper (>= 3.0.0) +Build-Depends: python2-base, python2-dev, debhelper (>= 3.0.0), libssl-dev Build-Depends-Indep: gettext Standards-Version: 3.5.4 -Package: linkchecker -Architecture: all +Package: linkchecker-ssl +Architecture: any Depends: python2-base -Suggests: linkchecker-ssl (>= ${Source-Version}) -Description: check HTML documents for broken links - Features: +Recommends: linkchecker (>= ${Source-Version}) +Description: HTTPS module for linkchecker + Includes the Python module 'linkcheckerssl' to support https:// + links for LinkChecker. + . + Linkchecker features: o recursive checking o multithreaded o output can be colored or normal text, HTML, SQL, CSV or a sitemap diff --git a/debian/rules b/debian/rules index c0f3ae52..2c00382b 100755 --- a/debian/rules +++ b/debian/rules @@ -1,8 +1,7 @@ #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. -PACKAGE=linkchecker -DOCDIR = debian/$(PACKAGE)/usr/share/doc/$(PACKAGE) +PACKAGE=linkchecker-ssl # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -14,23 +13,40 @@ export DH_COMPAT=3 export DH_OPTIONS nossl: - @echo already nossl version environments - - -ssl: - @echo change to ssl version... - @cat debian/changelog | sed '1 s/linkchecker/linkchecker-ssl/' >debian/changelog-ssl - @cd debian && for i in *-ssl; do \ - f=`echo $$i | sed -e 's/-ssl//'`; \ - mv $$f $$f-nossl; \ + @echo change to nossl version... + @cat debian/changelog | sed '1 s/linkchecker-ssl/linkchecker/' >debian/changelog-nossl + @cd debian && for i in *-nossl; do \ + f=`echo $$i | sed -e 's/-nossl//'`; \ + mv $$f $$f-ssl; \ mv $$i $$f; \ echo -n "$$f "; \ done @chmod +x debian/rules @echo done +ssl: + @echo already ssl version environments -include debian/rules.mk + +configure: configure-stamp +configure-stamp: + dh_testdir + ./setup.py config -lcrypto + touch configure-stamp + + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + rm -rf debian/$(PACKAGE) debian/$(PACKAGE)-ssl + ./setup.py build + touch build-stamp + +clean: + dh_testdir + rm -f build-stamp configure-stamp + $(MAKE) clean + dh_clean install: build dh_testdir @@ -38,38 +54,34 @@ install: build dh_installdirs $(MAKE) locale ./setup.py install --root=`pwd`/debian/$(PACKAGE) --no-compile - # remove man pages, we install them with dh_installman - rm -r debian/$(PACKAGE)/usr/man - # remove example files, we install them with dh_installexamples - rm -r debian/$(PACKAGE)/usr/share/linkchecker/examples/ - # remove any SSL related files - rm -r debian/$(PACKAGE)/usr/lib/python2.0/site-packages/linkcheckssl - # install additional doc files - install -c -m 644 DNS/README $(DOCDIR)/README_DNS.txt - install -c -m 644 test/*.py $(DOCDIR)/test - install -c -m 644 test/html/*.html $(DOCDIR)/test/html - install -c -m 644 test/output/test_* $(DOCDIR)/test/output - # install system wide configuration file in etc - mv debian/$(PACKAGE)/usr/share/linkchecker/linkcheckerrc debian/$(PACKAGE)/etc + # remove everything but the ssl modules + rm -rf debian/$(PACKAGE)/usr/man + rm -rf debian/$(PACKAGE)/usr/bin + rm -rf debian/$(PACKAGE)/usr/share + rm -rf debian/$(PACKAGE)/usr/lib/python2.0/site-packages/{linkcheck,DNS} + rm -rf debian/$(PACKAGE)/usr/lib/python2.0/site-packages/*.py # Build architecture-independent files here. binary-indep: build install + +# Build architecture-dependent files here. +binary-arch: build install dh_testdir dh_testroot # dh_installdebconf - dh_installdocs - dh_installexamples lc.* lconline/*.html +# dh_installdocs +# dh_installexamples lc.* lconline/*.html # dh_installmenu # dh_installemacsen # dh_installpam # dh_installinit # dh_installcron - dh_installman linkchecker.1 +# dh_installman linkchecker.1 # dh_installinfo # dh_undocumented linkchecker.1 - dh_installchangelogs - dh_link + dh_installchangelogs +# dh_link dh_strip dh_compress dh_fixperms @@ -81,8 +93,5 @@ binary-indep: build install dh_md5sums dh_builddeb -# Build architecture-dependent files here. -binary-arch: build install - binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure diff --git a/linkcheck/Logging.py b/linkcheck/Logging.py index da3f7a3b..6bb97fba 100644 --- a/linkcheck/Logging.py +++ b/linkcheck/Logging.py @@ -211,7 +211,7 @@ __init__(self, **args) if duration > 60: duration = duration / 60 name = _("hours") - self.fd.write(" (%.3f %s)\n" % (duration, name)) + self.fd.write(" (%.3f %s)\n" % (duration, name)) self.fd.flush() self.fd = None @@ -358,18 +358,19 @@ class ColoredLogger(StandardLogger): """ANSI colorized output""" def __init__(self, **args): + esc="\033[%sm" apply(StandardLogger.__init__, (self,), args) - self.colorparent = args['colorparent'] - self.colorurl = args['colorurl'] - self.colorname = args['colorname'] - self.colorreal = args['colorreal'] - self.colorbase = args['colorbase'] - self.colorvalid = args['colorvalid'] - self.colorinvalid = args['colorinvalid'] - self.colorinfo = args['colorinfo'] - self.colorwarning = args['colorwarning'] - self.colordltime = args['colordltime'] - self.colorreset = args['colorreset'] + self.colorparent = esc % args['colorparent'] + self.colorurl = esc % args['colorurl'] + self.colorname = esc % args['colorname'] + self.colorreal = esc % args['colorreal'] + self.colorbase = esc % args['colorbase'] + self.colorvalid = esc % args['colorvalid'] + self.colorinvalid = esc % args['colorinvalid'] + self.colorinfo = esc % args['colorinfo'] + self.colorwarning = esc % args['colorwarning'] + self.colordltime = esc % args['colordltime'] + self.colorreset = esc % args['colorreset'] self.currentPage = None self.prefix = 0 diff --git a/linkcheckerrc b/linkcheckerrc index 7e4518d4..a5a1b152 100644 --- a/linkcheckerrc +++ b/linkcheckerrc @@ -37,7 +37,7 @@ fileoutput= # standard text logger [text] filename=linkchecker-out.txt -fields=url,result +fields=all # GML logger [gml] @@ -72,19 +72,19 @@ fields=all # ANSI color logger [colored] -filename=linkchecker-out.ansi -# colors for the various parts (\x1b = ESC) -colorparent="\x1b[37m" -colorurl="\x1b[0m" -colorname="\x1b[0m" -colorreal="\x1b[36m" -colorbase="\x1b[35m" -colorvalid="\x1b[1;32m" -colorinvalid="\x1b[1;31m" -colorinfo="\x1b[0m" -colorwarning="\x1b[1;33m" -colordltime="\x1b[0m" -colorreset="\x1b[0m" +filename=linkchecker-out.colored +# colors for the various parts +colorparent=37 +colorurl=0 +colorname=0 +colorreal=36 +colorbase=35 +colorvalid=1;32 +colorinvalid=1;31 +colorinfo=0 +colorwarning=1;33 +colordltime=0 +colorreset=0 fields=all # blacklist logger