1 | DESTDIR= |
---|
2 | |
---|
3 | CGIDIR=/usr/lib/cgi-bin/nagios3 |
---|
4 | ETCDIR=/etc/nagios3 |
---|
5 | MANDIR=/usr/share/man/man1 |
---|
6 | SHAREDOCDIR=/usr/share/doc/nagios-velvice |
---|
7 | STYLEDIR=/etc/nagios3/stylesheets |
---|
8 | |
---|
9 | .PHONY: all ignore install update sync upload stat help pkg |
---|
10 | |
---|
11 | all: |
---|
12 | pod2man velvice.cgi | gzip > velvice.1.gz |
---|
13 | pod2html velvice.cgi > velvice.html |
---|
14 | |
---|
15 | install: update |
---|
16 | |
---|
17 | update: |
---|
18 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(CGIDIR) |
---|
19 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(ETCDIR) |
---|
20 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(MANDIR) |
---|
21 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(SHAREDOCDIR) |
---|
22 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(STYLEDIR) |
---|
23 | |
---|
24 | install -m 0755 -o root -g root velvice.cgi $(DESTDIR)/$(CGIDIR) |
---|
25 | install -m 0644 -o root -g root velvice.sample.yml $(DESTDIR)/$(ETCDIR) |
---|
26 | install -m 0644 -o root -g root velvice.1.gz $(DESTDIR)/$(MANDIR) |
---|
27 | install -m 0644 -o root -g root LICENSE.txt $(DESTDIR)/$(SHAREDOCDIR) |
---|
28 | install -m 0644 -o root -g root velvice.html $(DESTDIR)/$(SHAREDOCDIR) |
---|
29 | install -m 0644 -o root -g root velvice.sample.yml $(DESTDIR)/$(SHAREDOCDIR) |
---|
30 | install -m 0644 -o root -g root velvice.css $(DESTDIR)/$(STYLEDIR) |
---|
31 | |
---|
32 | sync: |
---|
33 | svn update |
---|
34 | |
---|
35 | upload: |
---|
36 | cadaver --rcfile=cadaverrc |
---|
37 | |
---|
38 | pkg: all |
---|
39 | ./make-package-debian |
---|
40 | |
---|
41 | stat: |
---|
42 | svn log|egrep '^r[[:digit:]]'|egrep -v '^r1[[:space:]]'|awk '{print $$3}'|sort|uniq -c |gnuplot -p -e 'set style fill solid 1.00 border 0; set style histogram; set style data histogram; set xtics rotate by 0; set style line 7 linetype 0 linecolor rgb "#222222"; set grid ytics linestyle 7; set xlabel "User contributor" font "bold"; set ylabel "Number of commit" font "bold"; plot "/dev/stdin" using 1:xticlabels(2) title "commit" linecolor rgb "#666666"' |
---|
43 | (echo '0 2015'; svn log|egrep '^r[[:digit:]]'|awk '{print $$5}'|cut -f 1 -d '-'|sort|uniq -c)|sort -k 2|gnuplot -p -e 'set style fill solid 1.00 border 0; set style histogram; set style data histogram; set xtics rotate by 0; set style line 7 linetype 0 linecolor rgb "#222222"; set grid ytics linestyle 7; set xlabel "Year" font "bold"; set ylabel "Number of commit" font "bold"; plot "/dev/stdin" using 1:xticlabels(2) title "commit" linecolor rgb "#666666"' |
---|
44 | |
---|
45 | help: |
---|
46 | @echo "Possibles targets:" |
---|
47 | @echo " * all : make manual" |
---|
48 | @echo " * install : complete install" |
---|
49 | @echo " * update : update install (do not update cron file)" |
---|
50 | @echo " * sync : sync with official repository" |
---|
51 | @echo " * upload : upload on public dav forge space" |
---|
52 | @echo " * stat : svn stat with gnuplot graph" |
---|
53 | @echo " * pkg : build Debian package" |
---|
54 | @echo " * ignore : svn rules to ignore some files" |
---|
55 | |
---|
56 | ignore: svnignore.txt |
---|
57 | svn propset svn:ignore -F svnignore.txt . |
---|
58 | svn propset svn:keywords "Id" velvice.cgi |
---|