1 |
# $Id$ |
# $Id$ |
2 |
|
|
3 |
VERSION=$(shell cat VERSION) |
SYSCONFDIR = /etc |
|
|
|
4 |
PREFIX = /usr |
PREFIX = /usr |
5 |
LIBDIR = $(PREFIX)/lib/installer |
LIBDIR = $(PREFIX)/lib/installer |
6 |
BINDIR = $(PREFIX)/bin |
BINDIR = $(PREFIX)/bin |
7 |
|
|
8 |
|
SED = sed |
9 |
|
INSTALL = install |
10 |
|
LN_S = ln -snf |
11 |
|
RM = rm |
12 |
|
CAT = cat |
13 |
|
PKGCONFIG = pkg-config |
14 |
|
|
15 |
|
VERSION = $(shell $(CAT) VERSION) |
16 |
|
SYSTEMDUNITDIR = $(shell $(PKGCONFIG) --variable=systemdsystemunitdir systemd) |
17 |
|
INSTALLER_TTY = tty1 |
18 |
|
|
19 |
all: |
all: |
20 |
sed 's:%VERSIONTAG%:$(VERSION):' \ |
$(SED) -e 's:%VERSIONTAG%:$(VERSION):' \ |
21 |
|
-e 's:%LIBDIR%:$(LIBDIR):g' \ |
22 |
bin/installer.sh.in \ |
bin/installer.sh.in \ |
23 |
> bin/installer.sh |
> bin/installer.sh |
24 |
|
$(SED) -e 's:%INSTALLER_TTY%:$(INSTALLER_TTY):g' \ |
25 |
|
-e 's:%BINDIR%:$(BINDIR):g' \ |
26 |
|
systemd/installer.service.in \ |
27 |
|
> systemd/installer.service |
28 |
|
|
29 |
create-dirs: |
create-dirs: |
30 |
install -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions |
$(INSTALL) -d -m 0755 $(DESTDIR)/$(SYSCONFDIR) |
31 |
install -d -m 0755 $(DESTDIR)/$(BINDIR) |
$(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions |
32 |
|
$(INSTALL) -d -m 0755 $(DESTDIR)/$(BINDIR) |
33 |
|
|
34 |
install-files: |
install-files: |
35 |
install -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer |
$(INSTALL) -m 0644 conf/installer.conf $(DESTDIR)$(SYSCONFDIR) |
36 |
install -m 0644 functions/findhdd.sh $(DESTDIR)$(LIBDIR)/functions/ |
$(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer |
37 |
|
$(INSTALL) -m 0644 functions/common.sh $(DESTDIR)$(LIBDIR)/functions/ |
38 |
install: create-dirs install-files |
$(INSTALL) -m 0644 functions/common-dialogs.sh $(DESTDIR)$(LIBDIR)/functions/ |
39 |
|
$(INSTALL) -m 0644 functions/installer-dialogs.sh $(DESTDIR)$(LIBDIR)/functions/ |
40 |
|
$(INSTALL) -m 0644 functions/hwdetection.sh $(DESTDIR)$(LIBDIR)/functions/ |
41 |
|
$(INSTALL) -m 0644 functions/bootloader.sh $(DESTDIR)$(LIBDIR)/functions/ |
42 |
|
$(INSTALL) -m 0644 functions/grub.sh $(DESTDIR)$(LIBDIR)/functions/ |
43 |
|
$(INSTALL) -m 0644 functions/grub2.sh $(DESTDIR)$(LIBDIR)/functions/ |
44 |
|
$(INSTALL) -m 0644 functions/initrd-tools.sh $(DESTDIR)$(LIBDIR)/functions/ |
45 |
|
$(INSTALL) -m 0644 functions/dracut.sh $(DESTDIR)$(LIBDIR)/functions/ |
46 |
|
$(INSTALL) -m 0644 functions/mkinitrd.sh $(DESTDIR)$(LIBDIR)/functions/ |
47 |
|
|
48 |
|
install-systemd: |
49 |
|
$(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR) |
50 |
|
$(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants |
51 |
|
$(INSTALL) -m 0644 systemd/mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR) |
52 |
|
$(LN_S) ../mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants/mnt-cdrom.mount |
53 |
|
|
54 |
|
install: create-dirs install-files install-systemd |
55 |
|
|
56 |
|
pot: locale/installer.pot |
57 |
|
generate-po.sh --create-pot bin/installer.sh.in installer |
58 |
|
generate-po.sh --append-pot functions/common.sh installer |
59 |
|
generate-po.sh --append-pot functions/common-dialogs.sh installer |
60 |
|
generate-po.sh --append-pot functions/installer-dialogs.sh installer |
61 |
|
generate-po.sh --append-pot functions/hwdetection.sh installer |
62 |
|
generate-po.sh --generate bin/installer.sh.in installer |
63 |
|
install-mo: locale/installer.pot |
64 |
|
DESTDIR=$(DESTDIR) generate-po.sh --compile bin/installer.sh.in installer |
65 |
|
|
66 |
clean: |
clean: |
67 |
rm -f bin/installer.sh |
$(RM) -f bin/installer.sh |
68 |
|
$(RM) -f systemd/installer.service |
69 |
|
|
70 |
.PHONY: all install |
.PHONY: all install |