view Makefile @ 0:a84c32f131df 1.1.29

Import vendor version
author Peter Gervai <grin@grin.hu>
date Wed, 15 Oct 2008 23:28:56 +0200
parents
children
line wrap: on
line source


# version of the package
VERSION=1.1.29
# name of the tarball
TARBALL = bins-$(VERSION).tar
# files to put in the tarball
DIST =  bins bins_edit bins-edit-gui bins-edit-gui.glade \
	install.sh binsrc tools/*_prefix tools/bins_cleanupgallery \
	tools/anti_bins tools/bins_txt2xml tools/bins_addtext \
	LICENSE README README.gui RELEASE.gui TODO ChangeLog CREDITS \
	doc/*.html doc/*.sgml doc/album.xml \
	doc/bins.1 doc/bins_edit.1 doc/bins-edit-gui.1 \
	doc/bins_man.html doc/bins_edit_man.html doc/bins-edit-gui_man.html \
	templates*/*.html templates*/*.js templates*/*.txt \
	templates*/static/*.* \
	bash_completion \
        intl/*.po \
	intl/generate_mo.sh \
	intl/fr.mo intl/pl.mo intl/de.mo intl/it.mo intl/ru.mo intl/es.mo \
	intl/zh_TW.mo intl/nl.mo intl/ja.mo intl/eo.mo intl/fi.mo intl/hu.mo \
	intl/ca.mo intl/gui-fr.mo 

# name of the dir in the tarball
DIR-DIST = bins-$(VERSION)

# files to publish on the website
PUBLISHWWW = $(wildcard doc/*.html)
#PUBLISH = $(TARBALL).gz $(TARBALL).bz2 ChangeLog doc/index_fr.html doc/index.html

# Files to put on donwload area
PUBLISHFILE = $(TARBALL).gz $(TARBALL).gz.sig $(TARBALL).bz2 $(TARBALL).bz2.sig ChangeLog

# where to publish webfiles for plain website
PUBLISH-DEST = $(HOME)/public_html/perso/BINS

# where to publish webfiles for plain gna
PUBLISHGNA-DEST = $(HOME)/src/gna/web/bins

# where to publish download files
PUBLISHFILE-DEST = $(HOME)/src/gna/bins-download


PROC=SGML_CATALOG_FILES=/etc/sgml/catalog xsltproc --catalogs
STYLEDIR=www/xsl

# End of configuration
########################################################################

# File to publish on plain web site (not gna)
PUBLISH = $(PUBLISHFILE) $(PUBLISHWWW)

PUBLISH-TMP = $(PUBLISH:doc/%=%)
PUBLISH-TARGET = $(PUBLISH-TMP:%=$(PUBLISH-DEST)/%)

PUBLISHGNA-TMP = $(PUBLISHWWW:doc/%=%)
PUBLISHGNA-TARGET = $(PUBLISHGNA:%=$(PUBLISHGNA-DEST)/%)

PUBLISHFILE-TARGET = $(PUBLISHFILE:%=$(PUBLISHFILE-DEST)/%)

.PHONY: all install tar publish filepublish wwwpublish upload test album demo famille clean cvs arch website

all:
	@echo "see README file to install bins"
	@echo "publish upload clean"

install: .install

.install: $(TARBALL).gz
	rm -Rf /tmp/bins*
	tar -C /tmp -xzvf $(TARBALL).gz
	sudo mount -o rw,remount /usr
	yes|sudo sh /tmp/$(DIR-DIST)/install.sh
	sudo mount -o ro,remount /usr || true
	touch .install

tar: $(TARBALL).gz

#sudo cp /tmp/$(DIR-DIST)/intl/fr.mo /usr/local/share/locale/fr/LC_MESSAGES/bins.mo

publish: filepublish wwwpublish gnapublish

filepublish: $(PUBLISHFILE-TARGET)

gnapublish: $(PUBLISHGNA-TARGET) www/xml/depends.tabular
	cd www/xml && make publishgna

wwwpublish: $(PUBLISH-TARGET) www/xml/depends.tabular
	cd www/xml && make publish

website: www/xml/depends.tabular
	cd www/xml && make all

www/xml/depends.tabular:
	touch www/xml/depends.tabular	

release: upload repo fileupload gnaupload

upload: publish 
	@if [ `hostname` != "ketama" ]; then\
		cp -afuv ~/public_html/perso/BINS/* ~/kashmir/public_html/perso/BINS ;\
		ssh kashmir 'PATH=$$PATH:~/bin update_www free' ;\
		ssh kashmir 'PATH=$$PATH:~/bin update_www libertysurf' ;\
	else\
		update_www tiscali ;\
	fi
#		update_www free ;\

gnaupload: gnapublish
	cd $(PUBLISHGNA-DEST) && cvs commit

fileupload: filepublish
	cd $(PUBLISHFILE-DEST) && rsync --delete -avr --rsh="ssh" . zubro@download.gna.org:/upload/bins || true

test: install
	time bins -p ~/share/pics/test ~/public_html/test

album: install
	time nice -14 bins -p ~/share/pics/album ~/public_html/album

demo:
	rsync --stats --progress -vac -e ssh ~/public_html/album/ kashmir:public_html/album/
#	time cp -afuv ~/public_html/album/.??* ~/public_html/album/* ~/kashmir/public_html/album
#	time rsync -avu ~/public_html/album/ ~/kashmir/public_html/album

dormans: .install
	time nice -14 bins -p ~/share/pics/Dormans ~/kashmir/public_html/photos/Dormans

famille: .install
	time nice -14 bins -p ~/share/pics/famille ~/kashmir/public_html/photos/famille

repo: cvs arch

cvs:
	rsync --stats --progress -vac -e ssh /home/jerome/share/cvs/ kashmir:/var/lib/cvs

arch:
	baz archive-mirror

backup_album:
	rsync --stats --progress -vac -e ssh /home/jerome/share/pics/album/ kashmir:share/pics/album

clean: 
	rm -f *~ *.old *.tar */*~ .install *.sign *.tar *.tar.bz2 *.tar.gz

#cp Makefile $(DIR-DIST)
#cp bins $(DIR-DIST)/bins.src
$(TARBALL): $(DIST) Makefile
	make website
	rm -Rf bins-$(VERSION) || true
	mkdir $(DIR-DIST)
	cp --parents $^ $(DIR-DIST)
	cp www/xml/*.html www/xml/*.xml $(DIR-DIST)/doc
	$(HOME)/bin/change 1.1.29 $(VERSION) $(DIR-DIST)/*
	tar \
	    --exclude=*~ \
	    --exclude=*.old \
	    --exclude=*.bak \
	    --exclude=\#* \
	    -cvf  $(TARBALL) bins-$(VERSION)
	rm -Rf $(DIR-DIST)


$(PUBLISH-DEST)/%.html : doc/%.html
	cp $< $@

$(PUBLISH-DEST)/%: %
	cp $< $@

$(PUBLISHGNA-DEST)/%.html : doc/%.html
	cp $< $@

$(PUBLISHGNA-DEST)/%: %
	cp $< $@

$(PUBLISHFILE-DEST)/%: %
	cp $< $@

%.sig: %
	gpg --yes --use-agent --detach-sign $< 

%_man.html: %.sgml
	docbook2html -o /tmp/$(notdir $@) $<
	mv /tmp/$(notdir $@)/index.html $@
	rmdir /tmp/$(notdir $@)

%.1: %.sgml
	docbook-to-man $< >$@

%.mo: %.po bins
	./intl/generate_mo.sh $<
#	msgfmt -o $@ $<

%.gz: %
	gzip -c --best $< >$@

%.bz2: %
	bzip2 -c $< >$@