1 #WWW_UPLOAD_URI = neuro.debian.net:/home/www/neuro.debian.net/www
2 WWW_UPLOAD_URI = ../www
5 WWW_UPLOAD_URI_STATIC=$(WWW_UPLOAD_URI)/_static
7 # Lentghy one due to updatedb
8 all: updatedb upload-website mirmon
9 # Quick one -- just rebuilds html if new changes and adjusts the status of the mirrors
10 refresh: upload-website-stamp mirmon
18 rsync -rvlhpt sphinx/ build/src
19 cd artwork; cp button_w200.png logo_tuned/fmri_w200.png ../build/src/_static; cd ..
20 cp 3rd/jquery.livetwitter/jquery.livetwitter.min.js build/src/_static
21 cd build/src && $(MAKE) html BUILDDIR=$(CURDIR)/build 2>&1
22 mv $(WWW_DIR)/_static/robots.txt $(WWW_DIR)/
23 cp -r build/src/lists $(WWW_DIR)/
24 cp -r sphinx/survey/2011/figures/* $(WWW_DIR)/_images/
25 @echo "I: extracting header/trailer to be reused in non-sphinx pages"
26 sed -ne '1,/<!-- HEADNOTES -->/p' $(WWW_DIR)/index.html >| $(WWW_DIR)/_static/index-header.ihtml
27 sed -ne '/<h2>Comments<\/h2>/,$$p' $(WWW_DIR)/index.html >| $(WWW_DIR)/_static/index-trailer.ihtml
30 -rm html-stamp source-stamp upload-website-stamp
31 $(MAKE) -C artwork clean
40 mkdir -p build/src/pkgs/
41 mkdir -p build/src/lists/
42 PYTHONPATH=.:../bigmess:$(PYTHONPATH) ../bigmess/bin/bigmess genpkgs -d build/src/pkgs/
43 PYTHONPATH=.:../bigmess:$(PYTHONPATH) ../bigmess/bin/bigmess genaptlists -d build/src/lists/
44 PYTHONPATH=.:../bigmess:$(PYTHONPATH) ../bigmess/bin/bigmess genmirrorselect > build/src/sources_lists
45 # PYTHONPATH=.:$(PYTHONPATH) python neurodebian/dde.py \
46 # --cfg neurodebian.cfg \
48 # --outdir build/src \
50 # --extracts /home/www/neuro.debian.net/www/debian/extracts \
63 updatedb: removedb removecache build/db.db
68 PYTHONPATH=.:$(PYTHONPATH) python neurodebian/dde.py \
69 --cfg neurodebian.cfg \
76 rsync -rvzlhp --delete \
77 --exclude=debian --exclude=debian-local --exclude=_files \
78 --chmod=Dg+s,g+rw $(WWW_DIR) $(WWW_UPLOAD_URI)
79 : # Touch stamp here so we get it updated on every upload
82 # call upload iff .git/index was modified, i.e. new changes got pulled in
83 upload-website-stamp: .git/index
84 $(MAKE) upload-website
87 # update and generate mirrors report
88 [ -x /usr/bin/mirmon ] && mirmon -q -get update -c mirmon-neurodebian.conf 2>&1 \
89 | grep -v 'date: invalid date.*DOCTYPE' || :
90 # [ -x $(WWW_UPLOAD_URI_STATIC)/mirrors-check.ihtml ] &&
91 # everything must be in place!
92 cat $(WWW_UPLOAD_URI_STATIC)/{index-header,mirrors-status,index-trailer}.ihtml \
93 >| $(WWW_UPLOAD_URI)/mirrors-status.html
95 .PHONY: removedb removecache updatedb upload-website clean distclean pics html mirmon