VER=0.88 DESTDIR=/www/htdocs/linux/HP-Howto BULLDIR=/home/httpd/html/linux/HP-Howto CIBLE=HP-HOWTO CIBLE-FR=$(CIBLE)-FR CIBLE-EN=$(CIBLE)-EN SRC=$(CIBLE-FR).sgml $(CIBLE-EN).sgml $(CIBLE).sgml $(CIBLE-FR).dsl $(CIBLE-EN).dsl $(CIBLE).dsl $(CIBLE).dtd Makefile RH=/usr/src/redhat SPECS=$(RH)/SPECS SOURCES=$(RH)/SOURCES all: all-FR all-EN install: install-FR install-EN $(CIBLE-FR).dsl : $(CIBLE).dsl /usr/local/lib/wml/exec/wml_p9_slice -o ENuUNDEF:$(CIBLE-EN).dsl -o FRuUNDEF:$(CIBLE-FR).dsl $(CIBLE).dsl $(SPECS)/$(CIBLE-FR).spec : $(CIBLE).spec echo "%define version $(VER)" > $(SPECS)/$(CIBLE).spec cat $(CIBLE).spec >> $(SPECS)/$(CIBLE).spec (cd $(SPECS)/ ; /usr/local/lib/wml/exec/wml_p9_slice -o ENuUNDEF:$(CIBLE-EN).spec -o FRuUNDEF:$(CIBLE-FR).spec $(CIBLE).spec) $(CIBLE-FR).sgml : $(CIBLE).sgml /usr/local/lib/wml/exec/wml_p9_slice -o ENuUNDEF:$(CIBLE-EN).sgml -o FRuUNDEF:$(CIBLE-FR).sgml $(CIBLE).sgml # /etc/sgml/catalog contient # CATALOG "/bruno/HP-Howto/mirror/catalog" all-FR: $(CIBLE-FR).ps $(CIBLE-FR).pdf $(CIBLE-FR).txt $(CIBLE-FR).rtf $(CIBLE-FR)/index.html all-EN: $(CIBLE-EN).ps $(CIBLE-EN).pdf $(CIBLE-EN).txt $(CIBLE-EN).rtf $(CIBLE-EN)/index.html $(CIBLE-FR).ps: $(SRC) sgmltools -b ps -v -s $(CIBLE-FR).dsl'#print' $(CIBLE-FR).sgml $(CIBLE-FR)/index.html: $(SRC) rm -rf $(CIBLE-FR) sgmltools -b html -v -s $(CIBLE-FR).dsl'#html' $(CIBLE-FR).sgml (cd $(CIBLE-FR) ; ln -sf ../../images images) $(CIBLE-FR).rtf: $(SRC) sgmltools -b rtf $(CIBLE-FR).sgml $(CIBLE-FR).txt: $(SRC) sgmltools -b txt $(CIBLE-FR).sgml $(CIBLE-FR).pdf: $(SRC) ps2pdf $(CIBLE-FR).ps $(CIBLE-FR).pdf $(CIBLE-EN)/index.html: $(SRC) rm -rf $(CIBLE-EN) sgmltools -b html -v -s $(CIBLE-EN).dsl'#html' $(CIBLE-EN).sgml $(CIBLE-EN).ps: $(SRC) sgmltools -b ps -v -s $(CIBLE-EN).dsl'#print' $(CIBLE-EN).sgml $(CIBLE-EN).rtf: $(SRC) sgmltools -b rtf $(CIBLE-EN).sgml $(CIBLE-EN).txt: $(SRC) sgmltools -b txt $(CIBLE-EN).sgml $(CIBLE-EN).pdf: $(SRC) ps2pdf $(CIBLE-EN).ps $(CIBLE-EN).pdf bull: all rm -f $(BULLDIR)/$(CIBLE)-FR/images $(BULLDIR)/$(CIBLE)-EN/images cp -a $(SRC) $(CIBLE).spec $(CIBLE)-FR $(CIBLE)-FR.pdf $(CIBLE)-EN $(CIBLE)-EN.pdf ../mirror ../images $(BULLDIR) (cd $(BULLDIR)/$(CIBLE)-FR ; ln -sf ../images images) (cd $(BULLDIR)/$(CIBLE)-EN ; ln -sf ../images images) find $(BULLDIR) -type f -exec chmod 644 {} \; find $(BULLDIR) -type d -exec chmod 755 {} \; echo "Sous http://bull/linux/HP-Howto/$(CIBLE)-FR et http://bull/linux/HP-Howto/$(CIBLE)-EN" | mutt bco -s "$(CIBLE) Version $(VER) (Mise à jour)" web: rpm rm -rf $(DESTDIR) mkdir $(DESTDIR) tar cf - * ../mirror ../images | rsh www2 "(cd $(DESTDIR) ; tar xvf -)" cp -a /usr/src/redhat/RPMS/noarch/$(CIBLE-FR)-$(VER)-1.noarch.rpm $(DESTDIR) cp -a /usr/src/redhat/RPMS/noarch/$(CIBLE-EN)-$(VER)-1.noarch.rpm $(DESTDIR) cp -a /usr/src/redhat/SRPMS/$(CIBLE-FR)-$(VER)-1.src.rpm $(DESTDIR) cp -a /usr/src/redhat/SRPMS/$(CIBLE-EN)-$(VER)-1.src.rpm $(DESTDIR) find $(DESTDIR) -type f -exec chmod 644 {} \; find $(DESTDIR) -type d -exec chmod 755 {} \; install-FR: all-FR rm -rf $(INSTALL_DIR)/usr/doc/$(CIBLE-FR)-$(VER) mkdir -p $(INSTALL_DIR)/usr/doc/$(CIBLE-FR)-$(VER) cp -a * $(INSTALL_DIR)/usr/doc/$(CIBLE-FR)-$(VER) install-EN: all rm -rf $(INSTALL_DIR)/usr/doc/$(CIBLE-FR)-$(VER) mkdir -p $(INSTALL_DIR)/usr/doc/$(CIBLE-FR)-$(VER) cp -a * $(INSTALL_DIR)/usr/doc/$(CIBLE-FR)-$(VER) rpm: $(SRC) $(SPECS)/$(CIBLE-FR).spec $(SPECS)/$(CIBLE-EN).spec rm -rf ../$(CIBLE-FR)-$(VER) ../$(CIBLE-EN)-$(VER) mkdir -p ../$(CIBLE-FR)-$(VER) ../$(CIBLE-EN)-$(VER) cp -a $(SRC) ../$(CIBLE-FR)-$(VER) cp -a $(SRC) ../$(CIBLE-EN)-$(VER) cp -a ../images ../$(CIBLE-FR)-$(VER) cp -a ../images ../$(CIBLE-EN)-$(VER) (cd .. ; tar cfz $(SOURCES)/$(CIBLE-FR)-$(VER).tar.gz $(CIBLE-FR)-$(VER) images/*.eps images/*.gif) (cd .. ; tar cfz $(SOURCES)/$(CIBLE-EN)-$(VER).tar.gz $(CIBLE-FR)-$(VER) images/*.eps images/*.gif) (cd $(SPECS) ; rpm -ba $(CIBLE-FR).spec ; rpm -ba $(CIBLE-EN).spec) bco: rpm echo "Sources du HP-HOWTO" | mutt bruno@victoria.frmug.org -c bco -a $(CIBLE).spec -a Makefile -a $(SOURCES)/$(CIBLE)-$(VER).tar.gz -s "$(CIBLE) Sources Version $(VER)" livhp: all zip -v $(CIBLE)-$(VER).zip $(CIBLE-FR).pdf $(CIBLE-FR).rtf echo "Voici la mise à jour du HP-HOWTO" | mutt marc_hia-balie@hp.com -c bruno -a $(CIBLE)-$(VER).zip -s "$(CIBLE) Version $(VER)"