Magellan Linux

Contents of /trunk/installer-simple/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2331 - (show annotations) (download)
Fri Jan 3 13:51:48 2014 UTC (10 years, 10 months ago) by niro
File size: 1205 byte(s)
-include systemd service files
1 # $Id$
2
3 VERSION = $(shell cat VERSION)
4 SYSTEMDUNITDIR = $(shell pkg-config --variable=systemdsystemunitdir systemd)
5 INSTALLER_TTY = tty1
6
7 PREFIX = /usr
8 LIBDIR = $(PREFIX)/lib/installer
9 BINDIR = $(PREFIX)/bin
10
11 SED = sed
12 INSTALL = install
13 LN_S = ln -snf
14 RM = rm
15
16 all:
17 $(SED) 's:%VERSIONTAG%:$(VERSION):' \
18 bin/installer.sh.in \
19 > bin/installer.sh
20 $(SED) -e 's:%INSTALLER_TTY%:$(INSTALLER_TTY):g' \
21 -e 's:%BINDIR%:$(BINDIR):g' \
22 systemd/installer.service.in \
23 > systemd/installer.service
24
25 create-dirs:
26 $(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions
27 $(INSTALL) -d -m 0755 $(DESTDIR)/$(BINDIR)
28
29 install-files:
30 $(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer
31 $(INSTALL) -m 0644 functions/findhdd.sh $(DESTDIR)$(LIBDIR)/functions/
32
33 install-systemd
34 $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)
35 $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants
36 $(INSTALL) -m 0644 systemd/mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)
37 $(LN_S) ../mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants/mnt-cdrom.mount
38
39 install: create-dirs install-files install-systemd
40
41 clean:
42 $(RM) -f bin/installer.sh
43 $(RM) -f systemd/installer.service
44
45 .PHONY: all install