Update conf/live.conf
[live-initramfs-grml.git] / Makefile
1 # Makefile
2
3 TRANSLATIONS="it"
4
5 all: build
6
7 test:
8         set -e; for SCRIPT in bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/*; \
9         do \
10                 sh -n $$SCRIPT; \
11         done
12
13 build:
14
15 install: test build
16         # Installing configuration
17         install -D -m 0644 conf/live.conf $(DESTDIR)/etc/live.conf
18
19         # Installing executables
20         mkdir -p $(DESTDIR)/sbin
21         cp bin/live-getty bin/live-login bin/live-snapshot $(DESTDIR)/sbin
22
23         mkdir -p $(DESTDIR)/usr/share/live-initramfs
24         cp bin/live-preseed bin/live-reconfigure $(DESTDIR)/usr/share/live-initramfs
25
26         mkdir -p $(DESTDIR)/usr/share/initramfs-tools
27         cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
28
29         # Installing documentation
30         mkdir -p $(DESTDIR)/usr/share/doc/live-initramfs
31         cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-initramfs
32
33         mkdir -p $(DESTDIR)/usr/share/doc/live-initramfs/examples
34         cp -r conf/live.conf $(DESTDIR)/usr/share/doc/live-initramfs/examples
35
36         # Installing manpages
37         set -e; for MANPAGE in manpages/*.en.1; \
38         do \
39                 install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
40         done
41
42         set -e; for MANPAGE in manpages/*.en.7; \
43         do \
44                 install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
45         done
46
47         set -e; for TRANSLATIONS in $$TRANSLATIONS; \
48         do \
49                 for MANPAGE in manpages/*.$$TRANSLATION.1; \
50                 do \
51                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/`basename $$MANPAGE .$$TRANSLATION.1`.1; \
52                 done; \
53                 for MANPAGE in manpages/*.$$TRANSLATION.7; \
54                 do \
55                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7; \
56                 done; \
57         done
58
59         # Temporary symlinks
60         ln -sf live-initramfs.7.gz $(DESTDIR)/usr/share/man/man7/live-getty.7.gz
61         ln -sf live-initramfs.7.gz $(DESTDIR)/usr/share/man/man7/live-login.7.gz
62
63 uninstall:
64         # Uninstalling configuration
65         rm -f $(DESTDIR)/etc/live.conf
66
67         # Uninstalling executables
68         rm -f $(DESTDIR)/sbin/live-getty $(DESTDIR)/sbin/live-login $(DESTDIR)/sbin/live-snapshot
69         rm -rf $(DESTDIR)/usr/share/live-initramfs
70         rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
71         rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
72         rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/live
73
74         # Uninstalling documentation
75         rm -rf $(DESTDIR)/usr/share/doc/live-initramfs
76
77         # Uninstalling manpages
78         set -e; for MANPAGE in manpages/*.en.1; \
79         do \
80                 rm -f $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
81         done
82
83         set -e; for MANPAGE in manpages/*.en.7; \
84         do \
85                 rm -f $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
86         done
87
88         set -e; for TRANSLATIONS in $$TRANSLATIONS; \
89         do \
90                 for MANPAGE in manpages/*.$$TRANSLATION.1; \
91                 do \
92                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/`basename $$MANPAGE .$$TRANSLATION.1`.1; \
93                 done; \
94                 for MANPAGE in manpages/*.$$TRANSLATION.7; \
95                 do \
96                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7; \
97                 done; \
98         done
99
100         # Temporary symlinks
101         rm -f $(DESTDIR)/usr/share/man/man7/live-getty.7.gz
102         rm -f $(DESTDIR)/usr/share/man/man7/live-login.7.gz
103
104 update:
105         set -e; for FILE in docs/parameters.txt; \
106         do \
107                 sed -i  -e 's/2007\\-10\\-29/2007\\-11\\-05/' \
108                         -e 's/2007-10-29/2007-11-05/' \
109                         -e 's/29.10.2007/05.11.2007/' \
110                         -e 's/1.110.4/1.110.5/' \
111                 $$FILE; \
112         done
113
114 clean:
115
116 distclean:
117
118 reinstall: uninstall install