[lfs-fr] r6628 - branches/LFS_7.6_Systemd/tools

jmengual at linuxfromscratch.org jmengual at linuxfromscratch.org
Ven 31 Oct 00:52:52 PDT 2014


Author: jmengual
Date: 2014-10-31 08:52:51 +0100 (Fri, 31 Oct 2014)
New Revision: 6628

Added:
   branches/LFS_7.6_Systemd/tools/Makefile
Log:
Mise a jour du makefile



Added: branches/LFS_7.6_Systemd/tools/Makefile
===================================================================
--- branches/LFS_7.6_Systemd/tools/Makefile	                        (rev 0)
+++ branches/LFS_7.6_Systemd/tools/Makefile	2014-10-31 07:52:51 UTC (rev 6628)
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+source_LANG1 =  "svn://svn.linuxfromscratch.org/LFS/tags/7.6-systemd/"
+PO_rep = "svn://svn.traduc.org/lfs/branches/LFS_7.6_Systemd/"
+LANG1 = lfs-en
+PO_dir = lfs-po_en_fr
+sourcegen = lfsgen-fr
+version = 7.6-systemd
+diff_dir = diff
+
+filetocopy = images INSTALL obfuscate.sh pdf-fixups.sh README tidy.conf general.ent packages.ent patches.ent stylesheets Makefile
+
+XML1 = $(wildcard $(LANG1)/*.xml) $(wildcard $(LANG1)/**/*.xml)
+XMLGEN = $(patsubst $(LANG1)/%.xml,$(sourcegen)/%.xml, $(XML1))
+date1 = $(shell sed -n 3p $(LANG1)/general.ent | sed 's/.*"\([^"]\+\)".*/\1/')
+date2 = $(shell date -d "$(date1)" "+%d %B %Y")
+
+
+default: help
+
+help:
+	@echo "/!\ vous devez vérifier que la version anglaise est bien la même version que celle des po (pas de problème si la version est stable) version: $(version) "
+	@echo "make genhtml: génère l'html depuis les derniers po sur le dépôt $(PO_rep)"
+	@echo "make gensource: génère l'xml/docbook depuis les derniers po sur le dépôt $(PO_rep)"
+	@echo "make diff: crée un diff compressé en xz des po (dans le dossier diff)"
+
+$(LANG1):
+	svn co $(source_LANG1) $(LANG1)/
+
+getpo:
+	svn co $(PO_rep) $(PO_dir)/
+
+init: getpo
+
+updpo:
+	svn update $(PO_dir)/
+
+
+
+
+
+
+sourcegenclean:
+	if [ -e $(sourcegen) ]; then rm -r $(sourcegen); fi
+
+genxml: $(XMLGEN)
+
+$(sourcegen)/%.xml: $(PO_dir)/%.po $(LANG1)/%.xml
+	po4a-translate -k 0 -f docbook -m $(LANG1)/$*.xml -l $(sourcegen)/$*.xml -p $(PO_dir)/$*.po
+
+
+addfiles: $(LANG1)
+	for a in $(filetocopy); do cp -r "$(LANG1)/$$a"  $(sourcegen)/ ;done
+
+appsed:  addfiles
+
+
+	sed -e "s/$(date1)/$(date2)/g"\
+	    -e "s/Approximate build time/Temps de construction approximatif/g"\
+	    -e "s/Required disk space/Espace disque requis/g"\
+	    -e "s/Installation depends on/L'installation dépend de/g"\
+	    -e "s/Test suite depends on/La suite de tests dépend de/g"\
+	    -e "s/Must be installed before/Doit être installé avant/g"\
+	    -e "s/Optional dependencies/Dépendances facultatives/g"\
+	    -e "s/&lfs-root;blfs\//http:\/\/lfs.traduc.org\/view\/blfs-$(version)/g"\
+	    -e "s/&lfs-root;hints\/downloads\/files\//http:\/\/lfs.traduc.org\/view\/astuces\//g"\
+	    -i $(sourcegen)/general.ent
+
+	sed -e "s/KB/Ko/g" -e "s/MB/Mo/g" -e "s/GB/Go/g"\
+	    -e "s/less than/moins de/g"\
+	    -e "s/typically about/en général environ/g"\
+	    -e "s/about/environ/g"\
+	    -e "s/with tests/avec les tests/g"\
+	    -i $(sourcegen)/packages.ent
+	
+	sed -e "s/KB/Ko/g"  -i $(sourcegen)/patches.ent
+	sed -e "s/<book>/<book lang=\"fr\">/g"  -i $(sourcegen)/index.xml
+
+
+validatexml:
+	cd $(sourcegen) ; make validate
+
+gensource: updpo sourcegenclean genxml appsed validatexml
+
+genhtml: gensource
+	if [ -e ./html ]; then rm -r ./html; fi
+	cd $(sourcegen) ; make BASEDIR=../html
+
+gendiff:
+	mkdir -p $(diff_dir)
+	svn diff $(PO_dir) | xz  -zec9 > $(diff_dir)/lfs-$(version)-`date "+%d%m%y%H%M%S"`.diff.xz
+



More information about the lfs-traducfr mailing list