a4f661fc |
1 | PACKAGE=prometheus |
ae776b10 |
2 | VERSION=0.7.8 |
971f8192 |
3 | CFLAGS=-std=c99 -Wall |
a4f661fc |
4 | prefix=/usr |
5 | mandir=$(prefix)/share/man |
f2600e3c |
6 | sbindir=$(prefix)/sbin |
7 | sysconfdir=/etc/ |
a4f661fc |
8 | |
9 | main: prometheus |
10 | $(CC) -o prometheus prometheus.c |
11 | |
ab783510 |
12 | deb: main |
ae776b10 |
13 | arch=`dpkg-architecture -qDEB_HOST_ARCH` |
14 | maintainer="gandalf <gandalf@arachne.cz>" |
8ee9e0bd |
15 | #patch -Nl <debian/prometheus.patch |
16 | sed -e "s/__ARCHITECTURE__/$(arch)/" -e "s/__VERSION__/($VERSION)/" -e "s/__PACKAGE__/($PACKAGE)/" -e "s/__MAINTAINER__/$(maintainer)/" debian/prometheus.control > debian/control |
ae776b10 |
17 | dpkg-buildpackage |
18 | |
19 | tgz: clean |
20 | cp -r . ../$(PACKAGE)-$(VERSION) |
21 | rm -rf ../$(PACKAGE)-$(VERSION)/.svn/ |
22 | rm -rf ../$(PACKAGE)-$(VERSION)/*/.svn/ |
23 | rm -rf ../$(PACKAGE)-$(VERSION)/*~ $(PACKAGE)-$(VERSION)/*/*~ |
24 | tar -czf $(PACKAGE)-$(VERSION).tar.gz ../$(PACKAGE)-$(VERSION) |
25 | rm -rf ../$(PACKAGE)-$(VERSION) |
26 | |
a4f661fc |
27 | install: main |
f2600e3c |
28 | install -d $(sbindir) |
29 | install -d $(mandir)/man1 |
30 | install -d $(mandir)/man5 |
31 | install -d $(sysconfdir)/cron.d |
6f5053d5 |
32 | install -d $(sysconfdir)/prometheus |
f2600e3c |
33 | install -m 755 prometheus $(sbindir) |
34 | install -m 644 prometheus.1 $(mandir)/man1 |
35 | install -m 644 prometheus.conf.5 $(mandir)/man5 |
ec04fc0f |
36 | install -m 755 conf/prometheus.cron $(sysconfdir)/cron.d/prometheus |
37 | install -m 755 conf/prometheus.init $(sysconfdir)/init.d/prometheus |
38 | install -m 600 conf/prometheus.conf $(sysconfdir)/prometheus |
39 | install -m 600 conf/prometheus.hosts $(sysconfdir)/prometheus/hosts |
40 | install -m 644 conf/prometheus.default $(sysconfdir)/default/prometheus |
a4f661fc |
41 | |
42 | clean: |
43 | rm -f prometheus |
ae776b10 |
44 | rm -f optinal-tools/prometheus-stats |