ubuntu-packaging-guide-team team mailing list archive
-
ubuntu-packaging-guide-team team
-
Mailing list archive
-
Message #01169
lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking into lp:ubuntu-packaging-guide
Dmitry Shachnev has proposed merging lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking into lp:ubuntu-packaging-guide.
Requested reviews:
Ubuntu Packaging Guide Team (ubuntu-packaging-guide-team)
Related bugs:
Bug #1067338 in Ubuntu Packaging Guide: "Introduce -common package for all HTML-based documentation"
https://bugs.launchpad.net/ubuntu-packaging-guide/+bug/1067338
For more details, see:
https://code.launchpad.net/~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking/+merge/130408
This branch fixes bug 1067338 by adding an "ubuntu-packaging-guide-common" package that contains _static and _images directories and simplifies the linking process by linking the corresponding files to this package.
It *does* work with translated package (added using the script).
--
https://code.launchpad.net/~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking/+merge/130408
Your team Ubuntu Packaging Guide Team is requested to review the proposed merge of lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking into lp:ubuntu-packaging-guide.
=== modified file 'debian/changelog'
--- debian/changelog 2012-10-17 08:14:26 +0000
+++ debian/changelog 2012-10-18 18:14:29 +0000
@@ -11,11 +11,14 @@
[ Dmitry Shachnev ]
* Fix search not working (LP: #814679).
+ * Introduce -common package (LP: #1067338).
+ * Better resources linking.
+ * Remove build-dependency on fdupes.
* Add CSS styling for code blocks and search results page.
* Link JS files with the libjs-sphinxdoc package.
- * Do not install websupport.js
- * Fixed a typo in fixing-a-bug-example.rst.
+ * Do not install websupport.js.
* Simplified the syntax in python-packaging.rst.
+ * Miscellaneous fixes.
-- Daniel Holbach <daniel.holbach@xxxxxxxxxx> Fri, 12 Oct 2012 16:52:11 +0200
=== modified file 'debian/control'
--- debian/control 2012-10-16 15:40:12 +0000
+++ debian/control 2012-10-18 18:14:29 +0000
@@ -7,7 +7,6 @@
Vcs-Browser: https://code.launchpad.net/~ubuntu-packaging-guide-team/ubuntu-packaging-guide/trunk
Build-Depends: debhelper (>= 7.0.50~),
doc-base,
- fdupes,
python-sphinx (>= 1.1~),
texlive-fonts-recommended,
texlive-latex-base,
@@ -30,8 +29,21 @@
This is a metapackage, depending only on
ubuntu-packaging-guide-html.
+Package: ubuntu-packaging-guide-common
+Depends: libjs-sphinxdoc, ${misc:Depends}
+Architecture: all
+Description: Ubuntu Packaging Guide - common files
+ The Ubuntu Packaging Guide is a set of articles that should help you to get
+ involved with packaging and development of Ubuntu. It's not meant to replace
+ other great documentation like the Debian New Maintainer's Guide or the
+ Debian policy, but serve as a starting point with easy and simple to
+ understand articles.
+ .
+ This package contains some common files that are needed by HTML versions of
+ the guide.
+
Package: ubuntu-packaging-guide-html
-Depends: libjs-sphinxdoc, ${misc:Depends}
+Depends: ubuntu-packaging-guide-common, ${misc:Depends}
Architecture: all
Description: Ubuntu Packaging Guide - HTML guide
The Ubuntu Packaging Guide is a set of articles that should help you to get
=== modified file 'debian/rules'
--- debian/rules 2012-10-16 17:57:51 +0000
+++ debian/rules 2012-10-18 18:14:29 +0000
@@ -1,6 +1,8 @@
#!/usr/bin/make -f
-VERSION:= $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+COMMON := /usr/share/ubuntu-packaging-guide
+DEBCOMMON := debian/ubuntu-packaging-guide-common$(COMMON)
%:
dh $@ --builddirectory=_build
@@ -12,21 +14,19 @@
make epub
override_dh_compress:
- dh_compress -X usr/share/doc/ubuntu-packaging-guide-html/_sources
+ dh_compress -X_sources
override_dh_link:
# symlink identical resources. Only needed for the html packages.
- for lang in `find debian/ -maxdepth 1 -iname *html* -type d | cut -c 30-`; do \
- cd debian/ubuntu-packaging-guide$$lang && LC_ALL=C fdupes -r1nq \
- usr/share/doc/ubuntu-packaging-guide$$lang | while read s; do \
- set -- $$(echo $$s | tr ' ' '\n' | sort); \
- f=$$1; shift; \
- for d; do \
- echo "symlinking identical file $$f to $$d"; \
- rm $$f; ln -s /$$d $$f; \
- done; \
+ for dirname in _static _images; do \
+ for directory in `find debian/ -wholename */$$dirname -not -wholename *-common* -type d`; do \
+ cd $$directory; \
+ for filename in `find -type f -not -name translations.js`; do \
+ rm $$filename; \
+ ln -s $(COMMON)/$$dirname/$$filename $$filename; \
done; \
- cd -; \
+ cd -; \
+ done; \
done
# use system copies of javascript libraries instead
for jsname in jquery underscore doctools searchtools; do \
=== modified file 'debian/scripts/add-languages'
--- debian/scripts/add-languages 2012-10-16 20:08:31 +0000
+++ debian/scripts/add-languages 2012-10-18 18:14:29 +0000
@@ -79,7 +79,9 @@
self.semi_complete_pofiles)
def get_available_binary_packages(self):
- BLACKLIST = [u'ubuntu-packaging-guide'] # metapackages and stuff
+ # metapackages and stuff
+ BLACKLIST = [u'ubuntu-packaging-guide',
+ u'ubuntu-packaging-guide-common']
self.stanzas = deb822.Packages.iter_paragraphs(open(self.control_file))
return filter(lambda a: "Package" in a.keys() and
a.get("Package") not in BLACKLIST, self.stanzas)
=== added file 'debian/ubuntu-packaging-guide-common.install'
--- debian/ubuntu-packaging-guide-common.install 1970-01-01 00:00:00 +0000
+++ debian/ubuntu-packaging-guide-common.install 2012-10-18 18:14:29 +0000
@@ -0,0 +1,2 @@
+_build/html/_images usr/share/ubuntu-packaging-guide/
+_build/html/_static usr/share/ubuntu-packaging-guide/
Follow ups