Magellan Linux

Annotation of /tags/installer-simple-0_4_90_20140108_2/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2456 - (hide annotations) (download)
Tue Jan 7 15:09:12 2014 UTC (10 years, 3 months ago) by niro
Original Path: trunk/installer-simple/Makefile
File size: 3153 byte(s)
-only re-create bin/installer.sh and systemd/installer.service on changes
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    
19 niro 2456 all: bin/installer.sh systemd/installer.service
20    
21     bin/installer.sh:
22 niro 2453 $(SED) -e 's:%VERSIONTAG%:$(VERSION):' \
23     -e 's:%LIBDIR%:$(LIBDIR):g' \
24 niro 2454 -e 's:%SYSCONFDIR%:$(SYSCONFDIR):g' \
25 niro 2453 bin/installer.sh.in \
26     > bin/installer.sh
27 niro 2456
28     systemd/installer.service:
29     $(SED) -e 's:%INSTALLER_TTY%:$(INSTALLER_TTY):g' \
30     -e 's:%BINDIR%:$(BINDIR):g' \
31 niro 2453 systemd/installer.service.in \
32     > systemd/installer.service
33    
34     create-dirs:
35     $(INSTALL) -d -m 0755 $(DESTDIR)/$(SYSCONFDIR)
36     $(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions
37     $(INSTALL) -d -m 0755 $(DESTDIR)/$(BINDIR)
38    
39     install-files:
40     $(INSTALL) -m 0644 conf/installer.conf $(DESTDIR)$(SYSCONFDIR)
41     $(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer
42     $(INSTALL) -m 0644 functions/common.sh $(DESTDIR)$(LIBDIR)/functions/
43     $(INSTALL) -m 0644 functions/common-dialogs.sh $(DESTDIR)$(LIBDIR)/functions/
44     $(INSTALL) -m 0644 functions/installer-dialogs.sh $(DESTDIR)$(LIBDIR)/functions/
45     $(INSTALL) -m 0644 functions/hwdetection.sh $(DESTDIR)$(LIBDIR)/functions/
46     $(INSTALL) -m 0644 functions/bootloader.sh $(DESTDIR)$(LIBDIR)/functions/
47     $(INSTALL) -m 0644 functions/grub.sh $(DESTDIR)$(LIBDIR)/functions/
48     $(INSTALL) -m 0644 functions/grub2.sh $(DESTDIR)$(LIBDIR)/functions/
49     $(INSTALL) -m 0644 functions/initrd-tools.sh $(DESTDIR)$(LIBDIR)/functions/
50     $(INSTALL) -m 0644 functions/dracut.sh $(DESTDIR)$(LIBDIR)/functions/
51     $(INSTALL) -m 0644 functions/mkinitrd.sh $(DESTDIR)$(LIBDIR)/functions/
52    
53     install-systemd:
54     $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)
55     $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants
56     $(INSTALL) -m 0644 systemd/mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)
57     $(LN_S) ../mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants/mnt-cdrom.mount
58    
59 niro 2455 install: create-dirs install-files install-systemd install-mo
60 niro 2453
61     pot: locale/installer.pot
62     generate-po.sh --create-pot bin/installer.sh.in installer
63     generate-po.sh --append-pot functions/common.sh installer
64     generate-po.sh --append-pot functions/common-dialogs.sh installer
65     generate-po.sh --append-pot functions/installer-dialogs.sh installer
66     generate-po.sh --append-pot functions/hwdetection.sh installer
67     generate-po.sh --append-pot functions/bootloader.sh installer
68     generate-po.sh --append-pot functions/grub.sh installer
69     generate-po.sh --append-pot functions/grub2.sh installer
70     generate-po.sh --append-pot functions/initrd-tools.sh installer
71     generate-po.sh --append-pot functions/dracut.sh installer
72     generate-po.sh --append-pot functions/mkinitrd.sh installer
73     generate-po.sh --unique-pot bin/installer.sh.in installer
74     generate-po.sh --generate bin/installer.sh.in installer
75    
76     install-mo: locale/installer.pot
77     DESTDIR=$(DESTDIR) generate-po.sh --compile bin/installer.sh.in installer
78    
79     clean:
80     $(RM) -f bin/installer.sh
81     $(RM) -f systemd/installer.service
82    
83     .PHONY: all install