From 2047e8d973fa523d4d9cd3c299ac96acde92c728 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 3 Apr 2001 19:32:11 +0000 Subject: [PATCH] clean up in debian dir git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@245 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- debian/control-ssl | 30 ++++++ debian/dirs | 2 - debian/docs | 5 - debian/linkchecker-ssl.files | 3 - debian/{postinst => linkchecker-ssl.postinst} | 14 +-- debian/linkchecker-ssl.postinst.debhelper | 7 -- debian/{prerm => linkchecker-ssl.prerm} | 4 +- debian/linkchecker-ssl.prerm.debhelper | 5 - debian/linkchecker.postinst | 8 +- debian/rules | 21 +++- debian/rules-ssl | 96 +++++++++++++++++++ 11 files changed, 158 insertions(+), 37 deletions(-) create mode 100644 debian/control-ssl delete mode 100644 debian/dirs delete mode 100644 debian/docs delete mode 100644 debian/linkchecker-ssl.files rename debian/{postinst => linkchecker-ssl.postinst} (58%) mode change 100755 => 100644 delete mode 100644 debian/linkchecker-ssl.postinst.debhelper rename debian/{prerm => linkchecker-ssl.prerm} (71%) mode change 100755 => 100644 delete mode 100644 debian/linkchecker-ssl.prerm.debhelper create mode 100644 debian/rules-ssl diff --git a/debian/control-ssl b/debian/control-ssl new file mode 100644 index 00000000..15a8866e --- /dev/null +++ b/debian/control-ssl @@ -0,0 +1,30 @@ +Source: linkchecker-ssl +Section: non-US/main +Priority: optional +Maintainer: Bastian Kleineidam +Build-Depends: python2-base, python2-dev, debhelper (>= 3.0.0), libssl-dev +Build-Depends-Indep: gettext +Standards-Version: 3.5.2 + +Package: linkchecker-ssl +Architecture: any +Depends: python2-base +Recommends: linkchecker (>= ${Source-Version}) +Description: HTTPS modules 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 + graph in GML or XML + o HTTP/1.1, FTP, mailto:, nntp:, news:, Gopher, Telnet and local + file links are supported + o restrict link checking with regular expression filters for URLs + o proxy support + o give username/password for HTTP and FTP authorization + o robots.txt exclusion protocol support + o i18n support + o command line interface + o (Fast)CGI web interface (requires HTTP server) diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 7dc8aebd..00000000 --- a/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -etc -usr/share/doc/linkchecker diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 5aa437ba..00000000 --- a/debian/docs +++ /dev/null @@ -1,5 +0,0 @@ -INSTALL -README -TODO -FAQ -draft-gilman-news-url-00.txt diff --git a/debian/linkchecker-ssl.files b/debian/linkchecker-ssl.files deleted file mode 100644 index 2f932ab1..00000000 --- a/debian/linkchecker-ssl.files +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/python2.0/site-packages/linkcheckssl/httpslib.py -usr/lib/python2.0/site-packages/linkcheckssl/ssl.so -usr/lib/python2.0/site-packages/linkcheckssl/__init__.py diff --git a/debian/postinst b/debian/linkchecker-ssl.postinst old mode 100755 new mode 100644 similarity index 58% rename from debian/postinst rename to debian/linkchecker-ssl.postinst index 1bba02db..55bb26a5 --- a/debian/postinst +++ b/debian/linkchecker-ssl.postinst @@ -3,21 +3,21 @@ # Written 1998 by Gregor Hoffleit . # used by Bastian Kleineidam for LinkChecker -DIRLIST="/usr/lib/python1.5/site-packages/linkcheck" -FILELIST="linkcheckerConf.py" -SITEPACKAGES="/usr/lib/python1.5/site-packages" +FILELIST= +SITEPACKAGES="/usr/lib/python2.0/site-packages" +DIRLIST="linkcheckssl" COMMAND="'import sys,py_compile;py_compile.compile(sys.argv[1])'" case "$1" in configure|abort-upgrade|abort-remove|abort-deconfigure) for i in $DIRLIST; do - python -O /usr/lib/python1.5/compileall.py -q $i - python /usr/lib/python1.5/compileall.py -q $i + python2 -O /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i + python2 /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i done # use /bin/sh -c, otherwise I get a SyntaxError from Python for i in $FILELIST; do - /bin/sh -c "python -O -c $COMMAND $SITEPACKAGES/$i" - /bin/sh -c "python -c $COMMAND $SITEPACKAGES/$i" + /bin/sh -c "python2 -O -c $COMMAND $SITEPACKAGES/$i" + /bin/sh -c "python2 -c $COMMAND $SITEPACKAGES/$i" done ;; *) diff --git a/debian/linkchecker-ssl.postinst.debhelper b/debian/linkchecker-ssl.postinst.debhelper deleted file mode 100644 index d8b5f419..00000000 --- a/debian/linkchecker-ssl.postinst.debhelper +++ /dev/null @@ -1,7 +0,0 @@ -# Automatically added by dh_installdocs -if [ "$1" = "configure" ]; then - if [ -d /usr/doc -a ! -e /usr/doc/linkchecker-ssl -a -d /usr/share/doc/linkchecker-ssl ]; then - ln -sf ../share/doc/linkchecker-ssl /usr/doc/linkchecker-ssl - fi -fi -# End automatically added section diff --git a/debian/prerm b/debian/linkchecker-ssl.prerm old mode 100755 new mode 100644 similarity index 71% rename from debian/prerm rename to debian/linkchecker-ssl.prerm index 39c4d266..e79d92cc --- a/debian/prerm +++ b/debian/linkchecker-ssl.prerm @@ -3,13 +3,13 @@ # Written 1998 by Gregor Hoffleit . # used by Bastian Kleineidam for LinkChecker -PACKAGE=linkchecker +PACKAGE=linkchecker-ssl dpkg --listfiles $PACKAGE | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm -f >&2 -rmdir /usr/lib/python1.5/site-packages/linkcheck 2>/dev/null || true +rmdir /usr/lib/python2.0/site-packages/linkcheckssl 2>/dev/null || true #DEBHELPER# diff --git a/debian/linkchecker-ssl.prerm.debhelper b/debian/linkchecker-ssl.prerm.debhelper deleted file mode 100644 index f6bad39f..00000000 --- a/debian/linkchecker-ssl.prerm.debhelper +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically added by dh_installdocs -if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/linkchecker-ssl ]; then - rm -f /usr/doc/linkchecker-ssl -fi -# End automatically added section diff --git a/debian/linkchecker.postinst b/debian/linkchecker.postinst index b189dfa9..5e038280 100755 --- a/debian/linkchecker.postinst +++ b/debian/linkchecker.postinst @@ -3,16 +3,16 @@ # Written 1998 by Gregor Hoffleit . # used by Bastian Kleineidam for LinkChecker -DIRLIST="/usr/lib/python2.0/site-packages/linkcheck" -FILELIST="_linkchecker_configdata.py" SITEPACKAGES="/usr/lib/python2.0/site-packages" +DIRLIST="linkcheck" +FILELIST="_linkchecker_configdata.py" COMMAND="'import sys,py_compile;py_compile.compile(sys.argv[1])'" case "$1" in configure|abort-upgrade|abort-remove|abort-deconfigure) for i in $DIRLIST; do - python2 -O /usr/lib/python2.0/compileall.py -q $i - python2 /usr/lib/python2.0/compileall.py -q $i + python2 -O /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i + python2 /usr/lib/python2.0/compileall.py -q $SITEPACKAGES/$i done # use /bin/sh -c, otherwise I get a SyntaxError from Python for i in $FILELIST; do diff --git a/debian/rules b/debian/rules index 9f894716..4607e49c 100755 --- a/debian/rules +++ b/debian/rules @@ -8,11 +8,27 @@ DOCDIR = debian/$(PACKAGE)/usr/share/doc/$(PACKAGE) #export DH_VERBOSE=1 # This is the debhelper compatability version to use. -export DH_COMPAT=2 +export DH_COMPAT=3 # This has to be exported to make some magic below work. export DH_OPTIONS +nossl: + @echo already nossl version environments + + +ssl: + @echo change to ssl version... + @cd debian && for i in *-ssl; do \ + f=`echo $$i | sed -e 's/-ssl//'`; \ + mv $$f $$f-nossl; \ + mv $$i $$f; \ + echo -n "$$f "; \ + done + @chmod +x debian/rules + @echo done + + configure: configure-stamp configure-stamp: dh_testdir @@ -43,6 +59,8 @@ install: build rm -rf debian/$(PACKAGE)/usr/man # remove example files, we install them with dh_installexamples rm -rf debian/$(PACKAGE)/usr/share/linkchecker + # remove any SSL related files + rm -rf debian/$(PACKAGE)/usr/lib/python2.0/site-lib/linkchecker-ssl # install additional doc files install -c -m 644 DNS/README $(DOCDIR)/README_DNS.txt install -c -m 644 test/*.py $(DOCDIR)/test @@ -67,7 +85,6 @@ binary-indep: build install dh_installman linkchecker.1 # dh_installinfo # dh_undocumented linkchecker.1 - dh_movefiles -p"linkchecker-ssl" --sourcedir debian/linkchecker dh_installchangelogs # dh_link dh_strip diff --git a/debian/rules-ssl b/debian/rules-ssl new file mode 100644 index 00000000..f07e8573 --- /dev/null +++ b/debian/rules-ssl @@ -0,0 +1,96 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +PACKAGE=linkchecker-ssl + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=3 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +nossl: + @echo change to nossl version... + @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 + + +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 + dh_clean -k + dh_installdirs + $(MAKE) locale + ./setup.py install --root=`pwd`/debian/$(PACKAGE) --no-compile + # 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-lib/linkchecker + rm -rf debian/$(PACKAGE)/usr/lib/python2.0/site-lib/*.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_installmenu +# dh_installemacsen +# dh_installpam +# dh_installinit +# dh_installcron +# dh_installman linkchecker.1 +# dh_installinfo +# dh_undocumented linkchecker.1 + 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