Magellan Linux

Annotation of /trunk/qemu-networking/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2205 - (hide annotations) (download)
Mon Oct 14 09:19:15 2013 UTC (10 years, 7 months ago) by niro
File size: 1423 byte(s)
-use pkgconfig to determinate systemd pathes
1 niro 1822 # qemu-networking
2     # $Id$
3    
4     VERSION = $(shell cat VERSION)
5    
6 niro 2205 PKGCONFIG = pkg-config
7 niro 2204 INSTALL = install
8     RM = rm
9     SED = sed
10     COMPRESS = gzip -9 -c
11    
12 niro 1822 confddir = /etc/conf.d
13     datadir = /usr/share
14     docdir = $(datadir)/doc/qemu-networking-$(VERSION)
15 niro 2205 systemddir = $(shell $(PKGCONFIG) pkg-config systemd --variable=systemdutildir)
16     systemdhelperdir = $(shell $(PKGCONFIG) systemd --variable=systemdutildir)
17     systemdunitdir = $(shell $(PKGCONFIG) systemd --variable=systemdsystemunitdir)
18 niro 1822
19     all: qemu-networking qemu-networking.service
20    
21     qemu-networking:
22 niro 2204 $(SED) 's:@@confddir@@:$(confddir):g' qemu-networking.in > qemu-networking
23 niro 1828
24 niro 1822 qemu-networking.service:
25 niro 2204 $(SED) 's:@@systemdhelperdir@@:$(systemdhelperdir):g' qemu-networking.service.in > qemu-networking.service
26 niro 1822
27 niro 2203 check:
28    
29 niro 1822 clean:
30     for i in qemu-networking qemu-networking.service; do \
31 niro 2204 if [ -f $$i ]; then $(RM) $$i; fi \
32 niro 1822 done
33    
34     install:
35 niro 2204 $(INSTALL) -d $(DESTDIR)/$(confddir)
36     $(INSTALL) -m0644 qemu-networking.conf $(DESTDIR)/$(confddir)/qemu-networking
37     $(INSTALL) -d $(DESTDIR)/$(systemdhelperdir)
38     $(INSTALL) -m0755 qemu-networking $(DESTDIR)/$(systemdhelperdir)
39     $(INSTALL) -d $(DESTDIR)/$(systemdunitdir)
40     $(INSTALL) -m0644 qemu-networking.service $(DESTDIR)/$(systemdunitdir)
41     $(INSTALL) -d $(DESTDIR)/$(docdir)
42 niro 1822 $(COMPRESS) VERSION > $(DESTDIR)/$(docdir)/VERSION.gz
43     if [ -f ChangeLog ]; then $(COMPRESS) ChangeLog > $(DESTDIR)/$(docdir)/ChangeLog.gz; fi
44    
45 niro 1825 .PHONY: install clean check