]> git.donarmstrong.com Git - neurodebian.git/blob - Makefile
Don't kill survery/ on website update
[neurodebian.git] / Makefile
1 #WWW_UPLOAD_URI = neuro.debian.net:/home/www/neuro.debian.net/www
2 WWW_UPLOAD_URI = ../www
3 WWW_DIR = build/html/
4
5 all: updatedb upload-website
6
7
8 pics:
9         $(MAKE) -C artwork
10
11
12 html: pics source
13         rsync -rvlhp sphinx/ build/src
14         cd artwork;     cp button_w200.png logo_tuned/fmri_w200.png ../build/src/_static; cd ..
15         cp 3rd/jquery.livetwitter/jquery.livetwitter.min.js build/src/_static
16         cd build/src && $(MAKE) html BUILDDIR=$(CURDIR)/build 2>&1
17         mv $(WWW_DIR)/_static/robots.txt $(WWW_DIR)/
18         cp -r build/src/lists $(WWW_DIR)/
19
20
21 clean:
22         -rm html-stamp source-stamp
23         $(MAKE) -C artwork clean
24
25
26 distclean: clean
27         -rm -rf build
28
29
30 source: source-stamp
31 source-stamp: build/db.db
32         PYTHONPATH=. python neurodebian/dde.py \
33                 --cfg neurodebian.cfg \
34                 --db build/db.db \
35                 --outdir build/src \
36                 --pkgaddenum pkgs \
37                 --extracts /home/www/neuro.debian.net/www/debian/extracts \
38                 commandisirrelevant
39         rm -f html-stamp
40         touch $@
41
42
43 removecache:
44         -rm -rf build/cache
45
46 removedb:
47         -rm -f build/db.db
48
49
50 updatedb: removedb removecache build/db.db
51
52
53 build/db.db:
54         mkdir -p build
55         PYTHONPATH=. python neurodebian/dde.py \
56                 --cfg neurodebian.cfg \
57                 --db build/db.db \
58                 updatedb
59         -rm -f source-stamp
60
61
62 upload-website: html
63         rsync -rvzlhp --delete \
64         --exclude=debian --exclude=debian-local --exclude=_files --exclude=survey \
65         --chmod=Dg+s,g+rw $(WWW_DIR) $(WWW_UPLOAD_URI)
66
67 .PHONY: removedb removecache updatedb upload-website clean distclean pics html
68