Magellan Linux

Contents of /trunk/installer-simple/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2448 - (show annotations) (download)
Tue Jan 7 14:58:49 2014 UTC (10 years, 3 months ago) by niro
File size: 1924 byte(s)
-make pkg-config and cat commands variable too
1 # $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 all:
20 $(SED) -e 's:%VERSIONTAG%:$(VERSION):' \
21 -e 's:%LIBDIR%:$(LIBDIR):g' \
22 bin/installer.sh.in \
23 > 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:
30 $(INSTALL) -d -m 0755 $(DESTDIR)/$(SYSCONFDIR)
31 $(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/functions
32 $(INSTALL) -d -m 0755 $(DESTDIR)/$(BINDIR)
33
34 install-files:
35 $(INSTALL) -m 0644 conf/installer.conf $(DESTDIR)$(SYSCONFDIR)
36 $(INSTALL) -m 0755 bin/installer.sh $(DESTDIR)$(BINDIR)/installer
37 $(INSTALL) -m 0644 functions/hwdetection.sh $(DESTDIR)$(LIBDIR)/functions/
38
39 install-systemd:
40 $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)
41 $(INSTALL) -d $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants
42 $(INSTALL) -m 0644 systemd/mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)
43 $(LN_S) ../mnt-cdrom.mount $(DESTDIR)/$(SYSTEMDUNITDIR)/local-fs.target.wants/mnt-cdrom.mount
44
45 install: create-dirs install-files install-systemd
46
47 pot: locale/installer.pot
48 generate-po.sh --create-pot bin/installer.sh.in installer
49 generate-po.sh --append-pot functions/common.sh installer
50 generate-po.sh --append-pot functions/common-dialogs.sh installer
51 generate-po.sh --append-pot functions/installer-dialogs.sh installer
52 generate-po.sh --append-pot functions/hwdetection.sh installer
53 generate-po.sh --generate bin/installer.sh.in installer
54 install-mo: locale/installer.pot
55 DESTDIR=$(DESTDIR) generate-po.sh --compile bin/installer.sh.in installer
56
57 clean:
58 $(RM) -f bin/installer.sh
59 $(RM) -f systemd/installer.service
60
61 .PHONY: all install