File: Makefile

package info (click to toggle)
munin-libvirt-plugins 0.0.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 88 kB
  • ctags: 11
  • sloc: python: 466; makefile: 35
file content (41 lines) | stat: -rw-r--r-- 952 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
VERSION=0.0.6
PACKAGE=munin-libvirt-plugins
SBINDIR=/usr/sbin
PLUGINDIR=/usr/share/munin/plugins
MUNINCONFDIR=/etc/munin

PLUGINS=libvirt-cputime \
	libvirt-blkstat \
	libvirt-ifstat  \
	libvirt-mem

DETECT=$(PACKAGE)-detect
PYFILES=$(patsubst %,%.py,$(PLUGINS) $(DETECT))

all: $(DETECT)

install: build
	install -d $(DESTDIR)$(PLUGINDIR)
	install -m 755 $(PLUGINS) $(DESTDIR)$(PLUGINDIR)
	install -d $(DESTDIR)$(SBINDIR)
	install -m 755 $(DETECT) $(DESTDIR)$(SBINDIR)

$(DETECT): $(DETECT).in
	sed -e "s,::MUNINCONFDIR::,$(MUNINCONFDIR),"\
            -e "s,::PLUGINDIR::,$(PLUGINDIR),"      \
            -e "s,::VERSION::,$(VERSION),"          \
            < $< > $@ 

%.py: %
	ln -s $< $@
	pychecker -q -e Error $@

check: $(DETECT) $(PYFILES)

clean:
	rm -f *.py *.pyc $(DETECT)

dist: clean check
	git-archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ HEAD | gzip -c > ../$(PACKAGE)-$(VERSION).tar.gz

.PHONY: clean check dist install build