1 |
# $Id$ |
# $Id$ |
2 |
|
|
3 |
VERSION=$(shell cat VERSION) |
VERSION = $(shell cat VERSION) |
4 |
|
SYSTEMDUNITDIR = $(shell pkg-config --variable=systemdsystemunitdir systemd) |
5 |
|
INSTALLER_TTY = tty1 |
6 |
|
|
7 |
PREFIX = /usr |
PREFIX = /usr |
8 |
LIBDIR = $(PREFIX)/lib/installer |
LIBDIR = $(PREFIX)/lib/installer |
17 |
$(SED) 's:%VERSIONTAG%:$(VERSION):' \ |
$(SED) 's:%VERSIONTAG%:$(VERSION):' \ |
18 |
bin/installer.sh.in \ |
bin/installer.sh.in \ |
19 |
> bin/installer.sh |
> 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: |
create-dirs: |
26 |
$(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions |
$(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions |
30 |
$(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer |
$(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer |
31 |
$(INSTALL) -m 0644 functions/findhdd.sh $(DESTDIR)$(LIBDIR)/functions/ |
$(INSTALL) -m 0644 functions/findhdd.sh $(DESTDIR)$(LIBDIR)/functions/ |
32 |
|
|
33 |
install: create-dirs install-files |
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: |
clean: |
42 |
$(RM) -f bin/installer.sh |
$(RM) -f bin/installer.sh |
43 |
|
$(RM) -f systemd/installer.service |
44 |
|
|
45 |
.PHONY: all install |
.PHONY: all install |