Merge lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking into lp:ubuntu-packaging-guide

Proposed by Dmitry Shachnev
Status: Merged
Merged at revision: 190
Proposed branch: lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking
Merge into: lp:ubuntu-packaging-guide
Diff against target: 121 lines (+35/-17)
5 files modified
debian/changelog (+5/-2)
debian/control (+14/-2)
debian/rules (+11/-12)
debian/scripts/add-languages (+3/-1)
debian/ubuntu-packaging-guide-common.install (+2/-0)
To merge this branch: bzr merge lp:~mitya57/ubuntu-packaging-guide/lp1067338-and-better-linking
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+130408@code.launchpad.net

Description of the change

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).

To post a comment you must log in.
189. By Dmitry Shachnev

Remove unused variable

Revision history for this message
Daniel Holbach (dholbach) wrote :

Good work.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-17 08:14:26 +0000
3+++ debian/changelog 2012-10-18 18:33:18 +0000
4@@ -11,11 +11,14 @@
5
6 [ Dmitry Shachnev ]
7 * Fix search not working (LP: #814679).
8+ * Introduce -common package (LP: #1067338).
9+ * Better resources linking.
10+ * Remove build-dependency on fdupes.
11 * Add CSS styling for code blocks and search results page.
12 * Link JS files with the libjs-sphinxdoc package.
13- * Do not install websupport.js
14- * Fixed a typo in fixing-a-bug-example.rst.
15+ * Do not install websupport.js.
16 * Simplified the syntax in python-packaging.rst.
17+ * Miscellaneous fixes.
18
19 -- Daniel Holbach <daniel.holbach@ubuntu.com> Fri, 12 Oct 2012 16:52:11 +0200
20
21
22=== modified file 'debian/control'
23--- debian/control 2012-10-16 15:40:12 +0000
24+++ debian/control 2012-10-18 18:33:18 +0000
25@@ -7,7 +7,6 @@
26 Vcs-Browser: https://code.launchpad.net/~ubuntu-packaging-guide-team/ubuntu-packaging-guide/trunk
27 Build-Depends: debhelper (>= 7.0.50~),
28 doc-base,
29- fdupes,
30 python-sphinx (>= 1.1~),
31 texlive-fonts-recommended,
32 texlive-latex-base,
33@@ -30,8 +29,21 @@
34 This is a metapackage, depending only on
35 ubuntu-packaging-guide-html.
36
37+Package: ubuntu-packaging-guide-common
38+Depends: libjs-sphinxdoc, ${misc:Depends}
39+Architecture: all
40+Description: Ubuntu Packaging Guide - common files
41+ The Ubuntu Packaging Guide is a set of articles that should help you to get
42+ involved with packaging and development of Ubuntu. It's not meant to replace
43+ other great documentation like the Debian New Maintainer's Guide or the
44+ Debian policy, but serve as a starting point with easy and simple to
45+ understand articles.
46+ .
47+ This package contains some common files that are needed by HTML versions of
48+ the guide.
49+
50 Package: ubuntu-packaging-guide-html
51-Depends: libjs-sphinxdoc, ${misc:Depends}
52+Depends: ubuntu-packaging-guide-common, ${misc:Depends}
53 Architecture: all
54 Description: Ubuntu Packaging Guide - HTML guide
55 The Ubuntu Packaging Guide is a set of articles that should help you to get
56
57=== modified file 'debian/rules'
58--- debian/rules 2012-10-16 17:57:51 +0000
59+++ debian/rules 2012-10-18 18:33:18 +0000
60@@ -1,6 +1,7 @@
61 #!/usr/bin/make -f
62
63-VERSION:= $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
64+VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
65+COMMON := /usr/share/ubuntu-packaging-guide
66
67 %:
68 dh $@ --builddirectory=_build
69@@ -12,21 +13,19 @@
70 make epub
71
72 override_dh_compress:
73- dh_compress -X usr/share/doc/ubuntu-packaging-guide-html/_sources
74+ dh_compress -X_sources
75
76 override_dh_link:
77 # symlink identical resources. Only needed for the html packages.
78- for lang in `find debian/ -maxdepth 1 -iname *html* -type d | cut -c 30-`; do \
79- cd debian/ubuntu-packaging-guide$$lang && LC_ALL=C fdupes -r1nq \
80- usr/share/doc/ubuntu-packaging-guide$$lang | while read s; do \
81- set -- $$(echo $$s | tr ' ' '\n' | sort); \
82- f=$$1; shift; \
83- for d; do \
84- echo "symlinking identical file $$f to $$d"; \
85- rm $$f; ln -s /$$d $$f; \
86- done; \
87+ for dirname in _static _images; do \
88+ for directory in `find debian/ -wholename */$$dirname -not -wholename *-common* -type d`; do \
89+ cd $$directory; \
90+ for filename in `find -type f -not -name translations.js`; do \
91+ rm $$filename; \
92+ ln -s $(COMMON)/$$dirname/$$filename $$filename; \
93 done; \
94- cd -; \
95+ cd -; \
96+ done; \
97 done
98 # use system copies of javascript libraries instead
99 for jsname in jquery underscore doctools searchtools; do \
100
101=== modified file 'debian/scripts/add-languages'
102--- debian/scripts/add-languages 2012-10-16 20:08:31 +0000
103+++ debian/scripts/add-languages 2012-10-18 18:33:18 +0000
104@@ -79,7 +79,9 @@
105 self.semi_complete_pofiles)
106
107 def get_available_binary_packages(self):
108- BLACKLIST = [u'ubuntu-packaging-guide'] # metapackages and stuff
109+ # metapackages and stuff
110+ BLACKLIST = [u'ubuntu-packaging-guide',
111+ u'ubuntu-packaging-guide-common']
112 self.stanzas = deb822.Packages.iter_paragraphs(open(self.control_file))
113 return filter(lambda a: "Package" in a.keys() and
114 a.get("Package") not in BLACKLIST, self.stanzas)
115
116=== added file 'debian/ubuntu-packaging-guide-common.install'
117--- debian/ubuntu-packaging-guide-common.install 1970-01-01 00:00:00 +0000
118+++ debian/ubuntu-packaging-guide-common.install 2012-10-18 18:33:18 +0000
119@@ -0,0 +1,2 @@
120+_build/html/_images usr/share/ubuntu-packaging-guide/
121+_build/html/_static usr/share/ubuntu-packaging-guide/

Subscribers

People subscribed via source and target branches