VER=0.88 DESTDIR=/www/htdocs/linux/HP-Howto BULLDIR=/home/httpd/html/linux/HP-Howto CIBLE=HP-HOWTO LANG=FR CIBLE-L=$(CIBLE)-$(LANG) SRC=$(CIBLE-L).sgml $(CIBLE).sgml $(CIBLE-L).dsl $(CIBLE).dsl $(CIBLE).dtd Makefile Makefile-$(LANG) Makefile.src RH=/usr/src/redhat SPECS=$(RH)/SPECS SOURCES=$(RH)/SOURCES all: all-$(LANG) $(CIBLE-L).dsl : $(CIBLE).dsl /usr/local/lib/wml/exec/wml_p9_slice -o $(LANG)uUNDEF:$(CIBLE-L).dsl $(CIBLE).dsl $(SPECS)/$(CIBLE-L).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 $(LANG)uUNDEF:$(CIBLE-L).spec $(CIBLE).spec) $(CIBLE-L).sgml : $(CIBLE).sgml /usr/local/lib/wml/exec/wml_p9_slice -o $(LANG)uUNDEF:$(CIBLE-L).sgml $(CIBLE).sgml # /etc/sgml/catalog contient # CATALOG "/bruno/HP-Howto/mirror/catalog" all-$(LANG): $(CIBLE-L).ps $(CIBLE-L).pdf $(CIBLE-L).txt $(CIBLE-L).rtf $(CIBLE-L)/index.html $(CIBLE-L).ps: $(SRC) sgmltools -b ps -v -s $(CIBLE-L).dsl'#print' $(CIBLE-L).sgml $(CIBLE-L)/index.html: $(SRC) rm -rf $(CIBLE-L) sgmltools -b html -v -s $(CIBLE-L).dsl'#html' $(CIBLE-L).sgml (cd $(CIBLE-L) ; ln -sf ../../images images) $(CIBLE-L).rtf: $(SRC) sgmltools -b rtf $(CIBLE-L).sgml $(CIBLE-L).txt: $(SRC) sgmltools -b txt $(CIBLE-L).sgml $(CIBLE-L).pdf: $(SRC) ps2pdf $(CIBLE-L).ps $(CIBLE-L).pdf bull: all-$(LANG) rm -f $(BULLDIR)/$(CIBLE-L)/images cp -a $(SRC) $(CIBLE).spec $(CIBLE-L) $(CIBLE-L).pdf ../mirror ../images $(BULLDIR) (cd $(BULLDIR)/$(CIBLE-L) ; 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-L)" | mutt bco -s "$(CIBLE) Version $(VER) Langue $(LANG) (Mise à jour)" web: rpm rm -rf $(DESTDIR) mkdir $(DESTDIR) tar cf - * ../mirror ../images | rsh www2 "(cd $(DESTDIR) ; tar xvf -)" rm -f $(DESTDIR)/$(CIBLE-L)-$(VER)-1.noarch.rpm $(DESTDIR)/$(CIBLE-L)-$(VER)-1.src.rpm cp /usr/src/redhat/RPMS/noarch/$(CIBLE-L)-$(VER)-1.noarch.rpm $(DESTDIR) cp /usr/src/redhat/SRPMS/$(CIBLE-L)-$(VER)-1.src.rpm $(DESTDIR) find $(DESTDIR) -type f -exec chmod 644 {} \; find $(DESTDIR) -type d -exec chmod 755 {} \; install-$(LANG): all-$(LANG) rm -rf $(INSTALL_DIR)/usr/doc/$(CIBLE-L)-$(VER) mkdir -p $(INSTALL_DIR)/usr/doc/$(CIBLE-L)-$(VER) cp -a * $(INSTALL_DIR)/usr/doc/$(CIBLE-L)-$(VER) rpm: $(SRC) $(SPECS)/$(CIBLE-L).spec all-$(LANG) rm -rf ../$(CIBLE-L)-$(VER) mkdir -p ../$(CIBLE-L)-$(VER) cp -a $(SRC) ../$(CIBLE-L)-$(VER) cp -a ../images ../$(CIBLE-L)-$(VER) (cd .. ; tar cfz $(SOURCES)/$(CIBLE-L)-$(VER).tar.gz $(CIBLE-L)-$(VER) images/*.eps images/*.gif) (cd $(SPECS) ; rpm -ba $(CIBLE-L).spec) ln -sf $(RH)/RPMS/noarch/$(CIBLE-L)-$(VER)-*.noarch.rpm .