[debian-edu-commits] debian-edu/ 01/01: Makefile.common: Store images in manual specific directories instead of a common one to avoid linking to wrong images for the jessie and wheezy HTML manuals.

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Fri Nov 28 17:43:16 UTC 2014


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch master
in repository debian-edu-doc.

commit f5397bc9790b70c5ed703e8f6233689fee697e18
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Fri Nov 28 18:42:28 2014 +0100

    Makefile.common: Store images in manual specific directories instead of a common one to avoid linking to wrong images for the jessie and wheezy HTML manuals.
---
 debian/changelog                     |  3 +++
 documentation/common/Makefile.common | 16 +++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6104de7..10a47b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ debian-edu-doc (1.6~20141117~8.0+edu0~alpha1) UNRELEASED; urgency=medium
   * (en, de, fr) Update jessie network architecture images.
   * Makefile.common: Enable EPUB generation for default language en.
     (Closes: #771174).
+  * Makefile.common: Store images in manual specific directories instead of
+    a common one to avoid linking to wrong images for the jessie and wheezy
+    HTML manuals.
 
   [ Jessie Manual translation updates ]
   * German (Wolfgang Schweer)
diff --git a/documentation/common/Makefile.common b/documentation/common/Makefile.common
index 807d2c2..369f1e2 100644
--- a/documentation/common/Makefile.common
+++ b/documentation/common/Makefile.common
@@ -99,16 +99,17 @@ install: build
 		if [ -e $(name).$$f.html ] ; then \
 			cp $(name).$$f.html $$LANGPATH/$(name).html ; \
 			sed -i "s/href=\"$(name).$$f.html/href=\"$(name).html/g" $$LANGPATH/$(name).html ; \
+			sed -i "s#./images#./$(name)-images#g" $$LANGPATH/$(name).html ; \
 			if [ "$$f" = "en" ] ; then \
 			  for i in images/*.png ; \
 				do convert -units PixelsPerCentimeter -density 42x42 $$i $${i%.png}.pdf ; \
 			  done ; \
-			  mkdir -p $$LANGPATH/images/ ; \
-			  find images -maxdepth 1 -type f -exec cp \{\} $$LANGPATH/images/ \; ; \
+		          mkdir -p $$LANGPATH/$(name)-images/ ; \
+			  find images -maxdepth 1 -type f -exec cp \{\} $$LANGPATH/$(name)-images/ \; ; \
 			  sed s/\.png"/.pdf"/g $(name).xml > $(name).$$f.xml ; \
 			  $(DBLATEX) -o $$LANGPATH/$(name).pdf $(name).$$f.xml --param=lingua=$$f ; \
 			else \
-			  	mkdir -p $$LANGPATH/images ; \
+				mkdir -p $$LANGPATH/$(name)-images ; \
 			  	cd images ; \
 				if [ -d $$f ] ; then \
 					for i in $$f/*.png ; \
@@ -117,14 +118,15 @@ install: build
 				fi ; \
 			  	for i in *.* ; do \
 					if [ -e $$f/$$i ] ; then \
-						cp -v $$f/$$i $$LANGPATH/images/ ; \
+						cp -v $$f/$$i $$LANGPATH/$(name)-images/ ; \
 					else \
-						ln -sf ../../debian-edu-doc-en/images/$$i $$LANGPATH/images/$$i ; \
+						ln -sf ../../debian-edu-doc-en/$(name)-images/$$i $$LANGPATH/$(name)-images/$$i ; \
 					fi ; done ; \
 			  	cd .. ; \
 				sed -i s/\.png"/.pdf"/g $(name).$$f.xml ; \
+				sed -i "s#./images#./$(name)-images#g" $(name).$$f.xml ; \
 			  mv images images_tmp_away ; $(DBLATEX) -I $$LANGPATH/ -I $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/ -o $$LANGPATH/$(name).pdf $(name).$$f.xml --param=lingua=$$f ; mv images_tmp_away images ; \
-			  rm $$LANGPATH/images/*.pdf ; \
+			  rm $$LANGPATH/$(name)-images/*.pdf ; \
 			fi ; \
 		fi ; \
 		if [ -e $(name).epub ] ; then \
@@ -134,7 +136,7 @@ install: build
 			cp $(name).$$f.epub $$LANGPATH/$(name).epub ; \
 		fi ; \
 	done 		
-	rm $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/images/*.pdf ; \
+	rm $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/$(name)-images/*.pdf ; \
 
 clean:
 	rm -f *.pdf images/*.pdf images/*/*.pdf

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-doc.git



More information about the debian-edu-commits mailing list