From 90d1e66e5f190309a8402e57decad6b9997306dc Mon Sep 17 00:00:00 2001 From: Charles Plessy Date: Sat, 5 Mar 2011 10:20:12 +0900 Subject: [PATCH] Import DEP-5 as a document called copyright-format. Closes: #609160 --- README.org | 1 + copyright-format.desc | 14 + copyright-format/Makefile | 17 + copyright-format/copyright-format.xml | 1197 +++++++++++++++++++++++++ copyright-format/html.dsl | 29 + debian/rules | 13 +- 6 files changed, 1269 insertions(+), 2 deletions(-) create mode 100644 copyright-format.desc create mode 100644 copyright-format/Makefile create mode 100644 copyright-format/copyright-format.xml create mode 100644 copyright-format/html.dsl diff --git a/README.org b/README.org index 4a7458c..b2c4b6f 100644 --- a/README.org +++ b/README.org @@ -138,6 +138,7 @@ published at [[http://www.debian.org/doc/]]. In addition to the main technical manual, the team currently also maintains: ++ [[http://www.debian.org/doc/packaging-manuals/copyright-format/1.0][Machine-readable debian/copyright format]] + [[http://www.debian.org/doc/packaging-manuals/menu-policy/][Debian Menu sub-policy]] + [[http://www.debian.org/doc/packaging-manuals/perl-policy/][Debian Perl Policy]] + [[http://www.debian.org/doc/packaging-manuals/mime-policy/][Debian MIME support sub-policy]] diff --git a/copyright-format.desc b/copyright-format.desc new file mode 100644 index 0000000..724bc7b --- /dev/null +++ b/copyright-format.desc @@ -0,0 +1,14 @@ +Document: copyright-format +Title: Machine-readable debian/copyright file +Author: The Debian Project +Abstract: Standard, machine-readable format for debian/copyright files within + packages, to facilitate automated checking and reporting of licenses for + packages and sets of packages. +Section: Debian + +Format: text +Files: /usr/share/doc/debian-policy/copyright-format.txt.gz + +Format: HTML +Index: /usr/share/doc/debian-policy/copyright-format.html +Files: /usr/share/doc/debian-policy/copyright-format.html diff --git a/copyright-format/Makefile b/copyright-format/Makefile new file mode 100644 index 0000000..27d8f5b --- /dev/null +++ b/copyright-format/Makefile @@ -0,0 +1,17 @@ +all: copyright-format.txt.gz copyright-format.html + +%.html: %.xml html.dsl + jade -V nochunks -t sgml -d html.dsl \ + /usr/share/xml/declaration/xml.dcl $< > $@ + -tidy -q -i -m -f /dev/null $@ + +%.txt: %.html + links -dump $< | perl -pe 's/[\r\0]//g' > $@ + +%.txt.gz: %.txt + gzip -cf9 $< > $@ + +clean: + rm -f *.css *.html *.txt *.txt.gz + +.DELETE_ON_ERROR: diff --git a/copyright-format/copyright-format.xml b/copyright-format/copyright-format.xml new file mode 100644 index 0000000..a62da99 --- /dev/null +++ b/copyright-format/copyright-format.xml @@ -0,0 +1,1197 @@ + + + + + + + + + diff --git a/copyright-format/html.dsl b/copyright-format/html.dsl new file mode 100644 index 0000000..2774825 --- /dev/null +++ b/copyright-format/html.dsl @@ -0,0 +1,29 @@ + +]> + + + + + +(define %generate-article-toc% #t) +(define %generate-article-titlepage% #t) +(define %generate-legalnotice-link% #t) +(define (article-titlepage-recto-elements) + (list (normalize "title") + (normalize "subtitle") + (normalize "authorgroup") + (normalize "author") + (normalize "releaseinfo") + (normalize "copyright") + (normalize "pubdate") + (normalize "revhistory") + (normalize "legalnotice") + (normalize "abstract"))) + + + + + + + diff --git a/debian/rules b/debian/rules index 7b87290..96565f0 100755 --- a/debian/rules +++ b/debian/rules @@ -33,7 +33,7 @@ LIBDIR := $(TMPTOP)/usr/share/doc-base sanitycheck := debian/rules policy.sgml SGML_FILES := policy menu-policy mime-policy perl-policy upgrading-checklist -DESC_FILES := debian-policy debian-menu-policy debian-perl-policy \ +DESC_FILES := copyright-format debian-policy debian-menu-policy debian-perl-policy \ debian-mime-policy debconf-spec fhs # While we have two versions of the FHS installed in the source package, @@ -49,6 +49,8 @@ FHS_NEW_FILES := POLICY_FILES = $(SGML_FILES:=.sgml) $(SGML_FILES:=.txt.gz) \ virtual-package-names-list.txt \ libc6-migration.txt version.ent \ + copyright-format/copyright-format.html \ + copyright-format/copyright-format.txt.gz \ debconf_spec/debconf_specification.html \ debconf_spec/debconf_specification.txt.gz \ policy.ps.gz policy.pdf.gz README.txt README.html \ @@ -57,7 +59,8 @@ POLICY_FILES = $(SGML_FILES:=.sgml) $(SGML_FILES:=.txt.gz) \ FILES_FROM_ORG := Process.html Process.txt README.txt README.html # policy.{pdf,ps,tpt,txt} are generated files -FILES_TO_CLEAN = debian/files debian/buildinfo debian/substvars \ +FILES_TO_CLEAN = copyright-format.xml.tar.gz \ + debian/files debian/buildinfo debian/substvars \ debian/postinst debian/prerm \ version.ent \ $(SGML_FILES:=.txt.gz) $(SGML_FILES:=.html.tar.gz) \ @@ -85,6 +88,7 @@ stamp-build: version.ent $(sanitycheck) $(SGML_FILES:=.txt.gz) \ policy.ps.gz policy.pdf.gz $(MAKE) $(FILES_FROM_ORG) + $(MAKE) -C copyright-format all $(MAKE) -C debconf_spec all touch stamp-build @@ -96,6 +100,7 @@ version.ent: debian/changelog clean: $(sanitycheck) # Undoes the effect of `make -f debian/rules build'. + $(MAKE) -C copyright-format clean $(MAKE) -C debconf_spec clean rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN) rm -rf $(DIRS_TO_CLEAN) @@ -136,6 +141,10 @@ stamp-policy: build $(sanitycheck) #$(install_file) $(FHS_NEW_FILES) $(DOCDIR)/fhs/ $(install_file) $(FHS_FILES) $(DOCDIR)/fhs/ $(install_file) debian/copyright $(DOCDIR)/ + GZIP=-9 cd copyright-format && \ + tar -zcf ../copyright-format.xml.tar.gz * + $(install_file) copyright-format.xml.tar.gz $(DOCDIR)/ + @set -ex; \ GZIP=-9 cd debconf_spec && \ tar -zcf ../debconf_specification.xml.tar.gz * $(install_file) debconf_specification.xml.tar.gz $(DOCDIR)/ -- 2.39.2