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 | |
---|
8 | .PHONY: all ignore install update sync upload stat help pkg |
---|
9 | |
---|
10 | all: |
---|
11 | pod2man velvice.cgi | gzip > velvice.1.gz |
---|
12 | pod2html velvice.cgi > velvice.html |
---|
13 | |
---|
14 | install: update |
---|
15 | |
---|
16 | update: |
---|
17 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(CGIDIR) |
---|
18 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(ETCDIR) |
---|
19 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(MANDIR) |
---|
20 | @install -d -m 0755 -o root -g root $(DESTDIR)/$(SHAREDOCDIR) |
---|
21 | |
---|
22 | install -m 0755 -o root -g root velvice.cgi $(DESTDIR)/$(CGIDIR) |
---|
23 | install -m 0644 -o root -g root velvice.1.gz $(DESTDIR)/$(MANDIR) |
---|
24 | install -m 0644 -o root -g root velvice.sample.yml $(DESTDIR)/$(ETCDIR) |
---|
25 | install -m 0644 -o root -g root LICENSE.txt $(DESTDIR)/$(SHAREDOCDIR) |
---|
26 | |
---|
27 | sync: |
---|
28 | svn update |
---|
29 | |
---|
30 | upload: |
---|
31 | cadaver --rcfile=cadaverrc |
---|
32 | |
---|
33 | pkg: all |
---|
34 | ./make-package-debian |
---|
35 | |
---|
36 | stat: |
---|
37 | 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"' |
---|
38 | (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"' |
---|
39 | |
---|
40 | help: |
---|
41 | @echo "Possibles targets:" |
---|
42 | @echo " * all : make manual" |
---|
43 | @echo " * install : complete install" |
---|
44 | @echo " * update : update install (do not update cron file)" |
---|
45 | @echo " * sync : sync with official repository" |
---|
46 | @echo " * upload : upload on public dav forge space" |
---|
47 | @echo " * stat : svn stat with gnuplot graph" |
---|
48 | @echo " * pkg : build Debian package" |
---|
49 | @echo " * ignore : svn rules to ignore some files" |
---|
50 | |
---|
51 | ignore: svnignore.txt |
---|
52 | svn propset svn:ignore -F svnignore.txt . |
---|
53 | svn propset svn:keywords "Id" velvice.cgi |
---|