Annotation of /trunk/installer-simple/Makefile
Parent Directory | Revision Log
Revision 2653 -
(hide annotations)
(download)
Thu Jul 3 08:01:05 2014 UTC (10 years, 2 months ago) by niro
File size: 3591 byte(s)
Thu Jul 3 08:01:05 2014 UTC (10 years, 2 months ago) by niro
File size: 3591 byte(s)
-do not hardcore LIVEROOT as /mnt/cdrom; dracut mounts livecd at /run/initramfs/live so we use that as default and make this more configurable
1 | niro | 2453 | # $Id$ |
2 | |||
3 | SYSCONFDIR = /etc | ||
4 | PREFIX = /usr | ||
5 | LIBDIR = $(PREFIX)/lib/installer | ||
6 | 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 | niro | 2653 | INSTALLER_LIVEROOT = /run/initramfs/live |
19 | INSTALLER_IMAGEROOT = $(INSTALLER_LIVEROOT)/system | ||
20 | niro | 2640 | INSTALLER_INSTALLROOT = /mnt/magellan |
21 | niro | 2508 | LOCALE = |
22 | niro | 2453 | |
23 | niro | 2465 | all: |
24 | niro | 2453 | $(SED) -e 's:%VERSIONTAG%:$(VERSION):' \ |
25 | -e 's:%LIBDIR%:$(LIBDIR):g' \ | ||
26 | niro | 2454 | -e 's:%SYSCONFDIR%:$(SYSCONFDIR):g' \ |
27 | niro | 2453 | bin/installer.sh.in \ |
28 | > bin/installer.sh | ||
29 | niro | 2456 | $(SED) -e 's:%INSTALLER_TTY%:$(INSTALLER_TTY):g' \ |
30 | -e 's:%BINDIR%:$(BINDIR):g' \ | ||
31 | niro | 2508 | -e 's:%LOCALE%:$(LOCALE):g' \ |
32 | niro | 2653 | -e 's:%INSTALLER_LIVEROOT%:$(INSTALLER_LIVEROOT):g' \ |
33 | niro | 2647 | -e 's:%INSTALLER_IMAGEROOT%:$(INSTALLER_IMAGEROOT):g' \ |
34 | niro | 2453 | systemd/installer.service.in \ |
35 | > systemd/installer.service | ||
36 | niro | 2653 | $(SED) -e 's:%INSTALLER_LIVEROOT%:$(INSTALLER_LIVEROOT):g' \ |
37 | -e 's:%INSTALLER_INSTALLROOT%:$(INSTALLER_INSTALLROOT):g' \ | ||
38 | niro | 2640 | -e 's:%INSTALLER_IMAGEROOT%:$(INSTALLER_IMAGEROOT):g' \ |
39 | conf/installer.conf.in \ | ||
40 | > conf/installer.conf | ||
41 | niro | 2453 | |
42 | create-dirs: | ||
43 | $(INSTALL) -d -m 0755 $(DESTDIR)/$(SYSCONFDIR) | ||
44 | $(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions | ||
45 | $(INSTALL) -d -m 0755 $(DESTDIR)/$(BINDIR) | ||
46 | |||
47 | install-files: | ||
48 | $(INSTALL) -m 0644 conf/installer.conf $(DESTDIR)$(SYSCONFDIR) | ||
49 | $(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer | ||
50 | $(INSTALL) -m 0644 functions/common.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
51 | $(INSTALL) -m 0644 functions/common-dialogs.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
52 | $(INSTALL) -m 0644 functions/installer-dialogs.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
53 | $(INSTALL) -m 0644 functions/hwdetection.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
54 | $(INSTALL) -m 0644 functions/bootloader.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
55 | $(INSTALL) -m 0644 functions/grub.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
56 | $(INSTALL) -m 0644 functions/grub2.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
57 | $(INSTALL) -m 0644 functions/initrd-tools.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
58 | $(INSTALL) -m 0644 functions/dracut.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
59 | $(INSTALL) -m 0644 functions/mkinitrd.sh $(DESTDIR)$(LIBDIR)/functions/ | ||
60 | |||
61 | install-systemd: | ||
62 | $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR) | ||
63 | niro | 2504 | $(INSTALL) -m 0644 systemd/installer.service $(DESTDIR)/$(SYSTEMDUNITDIR) |
64 | niro | 2453 | $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants |
65 | |||
66 | niro | 2455 | install: create-dirs install-files install-systemd install-mo |
67 | niro | 2453 | |
68 | pot: locale/installer.pot | ||
69 | generate-po.sh --create-pot bin/installer.sh.in installer | ||
70 | generate-po.sh --append-pot functions/common.sh installer | ||
71 | generate-po.sh --append-pot functions/common-dialogs.sh installer | ||
72 | generate-po.sh --append-pot functions/installer-dialogs.sh installer | ||
73 | generate-po.sh --append-pot functions/hwdetection.sh installer | ||
74 | generate-po.sh --append-pot functions/bootloader.sh installer | ||
75 | generate-po.sh --append-pot functions/grub.sh installer | ||
76 | generate-po.sh --append-pot functions/grub2.sh installer | ||
77 | generate-po.sh --append-pot functions/initrd-tools.sh installer | ||
78 | generate-po.sh --append-pot functions/dracut.sh installer | ||
79 | generate-po.sh --append-pot functions/mkinitrd.sh installer | ||
80 | generate-po.sh --unique-pot bin/installer.sh.in installer | ||
81 | generate-po.sh --generate bin/installer.sh.in installer | ||
82 | |||
83 | install-mo: locale/installer.pot | ||
84 | DESTDIR=$(DESTDIR) generate-po.sh --compile bin/installer.sh.in installer | ||
85 | |||
86 | clean: | ||
87 | $(RM) -f bin/installer.sh | ||
88 | niro | 2640 | $(RM) -f conf/installer.conf |
89 | niro | 2453 | $(RM) -f systemd/installer.service |
90 | niro | 2497 | $(RM) -f locale/installer.pot.dump |
91 | $(RM) -f locale/installer.pot.fixed | ||
92 | niro | 2453 | |
93 | .PHONY: all install |