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