aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 0f4d2e0e5a42c52068fbfb677c216ac338e933ff (plain)
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
PACKAGE = net_monitor
VERSION = 0.25
GITPATH = git://git.mageia.org/software/net_monitor

all: version python

version:
	echo "version='$(VERSION)'" > version.py

python:
	python3 setup.py build

clean:
	-find . -name '*.o' -o -name '*.py[oc]' -o -name '*~' | xargs rm -f

install: all
	python3 setup.py install --root=$(RPM_BUILD_ROOT)/
	make -C po DESTDIR=$(RPM_BUILD_ROOT)/usr install
	install -d $(RPM_BUILD_ROOT)/etc/sysconfig/network-scripts/ifup.d
	install -d $(RPM_BUILD_ROOT)/etc/sysconfig/network-scripts/ifdown.d
	install -m755 scripts/netmonitor_up $(RPM_BUILD_ROOT)/etc/sysconfig/network-scripts/ifup.d/
	install -m755 scripts/netmonitor_down $(RPM_BUILD_ROOT)/etc/sysconfig/network-scripts/ifdown.d/

cleandist:
	rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2

dist: cleandist
	git archive --prefix $(PACKAGE)-$(VERSION)/ HEAD | xz -9 > $(PACKAGE)-$(VERSION).tar.xz