a4f661fc |
1 | PACKAGE=prometheus |
208112af |
2 | VERSION=0.8.2 |
971f8192 |
3 | CFLAGS=-std=c99 -Wall |
a4f661fc |
4 | prefix=/usr |
5 | mandir=$(prefix)/share/man |
f2600e3c |
6 | sbindir=$(prefix)/sbin |
03a8ebc8 |
7 | sysconfdir=/etc |
a4f661fc |
8 | |
9 | main: prometheus |
10 | $(CC) -o prometheus prometheus.c |
11 | |
ab783510 |
12 | deb: main |
03a8ebc8 |
13 | debian/prometheus.debian |
45ae1b12 |
14 | dpkg-buildpackage -rfakeroot |
ae776b10 |
15 | |
16 | tgz: clean |
17 | cp -r . ../$(PACKAGE)-$(VERSION) |
18 | rm -rf ../$(PACKAGE)-$(VERSION)/.svn/ |
19 | rm -rf ../$(PACKAGE)-$(VERSION)/*/.svn/ |
20 | rm -rf ../$(PACKAGE)-$(VERSION)/*~ $(PACKAGE)-$(VERSION)/*/*~ |
03a8ebc8 |
21 | tar -czf ../$(PACKAGE)-$(VERSION).tar.gz ../$(PACKAGE)-$(VERSION) |
ae776b10 |
22 | rm -rf ../$(PACKAGE)-$(VERSION) |
23 | |
a4f661fc |
24 | install: main |
f2600e3c |
25 | install -d $(sbindir) |
26 | install -d $(mandir)/man1 |
27 | install -d $(mandir)/man5 |
28 | install -d $(sysconfdir)/cron.d |
6f5053d5 |
29 | install -d $(sysconfdir)/prometheus |
f2600e3c |
30 | install -m 755 prometheus $(sbindir) |
31 | install -m 644 prometheus.1 $(mandir)/man1 |
32 | install -m 644 prometheus.conf.5 $(mandir)/man5 |
ec04fc0f |
33 | install -m 755 conf/prometheus.cron $(sysconfdir)/cron.d/prometheus |
34 | install -m 755 conf/prometheus.init $(sysconfdir)/init.d/prometheus |
35 | install -m 600 conf/prometheus.conf $(sysconfdir)/prometheus |
36 | install -m 600 conf/prometheus.hosts $(sysconfdir)/prometheus/hosts |
37 | install -m 644 conf/prometheus.default $(sysconfdir)/default/prometheus |
a4f661fc |
38 | |
39 | clean: |
40 | rm -f prometheus |
ae776b10 |
41 | rm -f optinal-tools/prometheus-stats |