Magellan Linux

Contents of /trunk/installer/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1055 - (show annotations) (download)
Mon May 31 20:57:36 2010 UTC (14 years, 5 months ago) by niro
File size: 2132 byte(s)
-added installer log feature

1 # Magellan Installer
2 # $Id$
3
4 DESTDIR=
5
6 sysconfdir=/etc
7 datadir=/usr/share/installer
8 sbindir=/usr/sbin
9 logfile=/var/log/installer.log
10
11 srcdir=.
12
13 all: install
14
15 create-dirs-common:
16 install -d -m 0755 $(DESTDIR)$(sysconfdir)
17 install -d -m 0755 $(DESTDIR)$(datadir)
18 install -d -m 0755 $(DESTDIR)$(datadir)/data
19 install -d -m 0755 $(DESTDIR)$(datadir)/include
20
21 create-dirs-ncurses:
22 install -d -m 0755 $(DESTDIR)$(datadir)/ncurses-gui
23 install -d -m 0755 $(DESTDIR)$(sbindir)
24
25 create-dirs-gtk:
26 install -d -m 0755 $(DESTDIR)$(datadir)/gtk-gui
27 install -d -m 0755 $(DESTDIR)$(sbindir)
28
29 install-files-common:
30 install -m 0644 $(srcdir)/etc/installer.conf $(DESTDIR)$(sysconfdir)
31 install -m 0644 $(srcdir)/VERSION $(DESTDIR)$(datadir)
32 for i in $(srcdir)/data/*; do install -m 0644 $${i} $(DESTDIR)$(datadir)/data/$(basename $i); done
33 for i in $(srcdir)/include/*; do install -m 0755 $${i} $(DESTDIR)$(datadir)/include/$(basename $i); done
34 # fix datadir location
35 echo "INSTALLER_DIR=\"$(datadir)\"" > $(DESTDIR)$(sysconfdir)/installer.conf
36 echo "INSTALLER_LOG=\"$(logfile)\"" >> $(DESTDIR)$(sysconfdir)/installer.conf
37
38 install-files-ncurses:
39 install -m 0755 $(srcdir)/installer-ncurses.sh $(DESTDIR)$(datadir)
40 for i in $(srcdir)/ncurses-gui/*; do install -m 0644 $${i} $(DESTDIR)$(datadir)/ncurses-gui/$(basename $i); done
41
42 install-files-gtk:
43 install -m 0755 $(srcdir)/installer-gtk.sh $(DESTDIR)$(datadir)
44 install -m 0755 $(srcdir)/guification.sh $(DESTDIR)$(datadir)
45 for i in $(srcdir)/gtk-gui/*; do install -m 0644 $${i} $(DESTDIR)$(datadir)/gtk-gui/$(basename $i); done
46
47 install-symlinks-ncurses:
48 ln -snf $(datadir)/installer-ncurses.sh $(DESTDIR)$(sbindir)/installer-ncurses
49
50 install-symlinks-gtk:
51 ln -snf $(datadir)/installer-gtk.sh $(DESTDIR)$(sbindir)/installer-gtk
52
53 install-common: create-dirs-common \
54 install-files-common
55
56 install-ncurses: create-dirs-ncurses \
57 install-files-ncurses \
58 install-symlinks-ncurses \
59
60 install-gtk: create-dirs-gtk \
61 install-files-gtk \
62 install-symlinks-gtk
63
64 install: install-common \
65 install-ncurses \
66 install-gtk
67
68 .PHONY: all install install-common install-ncurses install-gtk