Support isofrom/fromiso bootoption
[live-initramfs-grml.git] / Makefile
1 # Makefile
2
3 TRANSLATIONS="it"
4
5 all: build
6
7 test:
8         # Checking for syntax errors
9         set -e; for SCRIPT in bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/*; \
10         do \
11                 sh -n $$SCRIPT; \
12         done
13
14         # Checking for bashisms (temporary not failing, but only listing)
15         if [ -x /usr/bin/checkbashisms ]; \
16         then \
17                 checkbashisms bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/* || true; \
18         else \
19                 echo "bashism test skipped - you need to install devscripts."; \
20         fi
21
22 build:
23
24 install: test build
25         # Installing configuration
26         install -D -m 0644 conf/live.conf $(DESTDIR)/etc/live.conf
27         install -D -m 0644 conf/compcache $(DESTDIR)/usr/share/initramfs-tools/conf.d/compcache
28
29         # Installing executables
30         mkdir -p $(DESTDIR)/sbin
31         cp bin/live-getty bin/live-login bin/live-new-uuid bin/live-snapshot $(DESTDIR)/sbin
32
33         mkdir -p $(DESTDIR)/usr/share/live-initramfs
34         cp bin/live-preseed bin/live-reconfigure contrib/languagelist $(DESTDIR)/usr/share/live-initramfs
35
36         mkdir -p $(DESTDIR)/usr/share/initramfs-tools
37         cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
38
39         # Installing documentation
40         mkdir -p $(DESTDIR)/usr/share/doc/live-initramfs
41         cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-initramfs
42
43         mkdir -p $(DESTDIR)/usr/share/doc/live-initramfs/examples
44         cp -r conf/* $(DESTDIR)/usr/share/doc/live-initramfs/examples
45
46         # Installing manpages
47         set -e; for MANPAGE in manpages/*.en.1; \
48         do \
49                 install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
50         done
51
52         set -e; for MANPAGE in manpages/*.en.7; \
53         do \
54                 install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
55         done
56
57         set -e; for TRANSLATIONS in $$TRANSLATIONS; \
58         do \
59                 for MANPAGE in manpages/*.$$TRANSLATION.1; \
60                 do \
61                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/`basename $$MANPAGE .$$TRANSLATION.1`.1; \
62                 done; \
63                 for MANPAGE in manpages/*.$$TRANSLATION.7; \
64                 do \
65                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7; \
66                 done; \
67         done
68
69         # Temporary symlinks
70         ln -sf live-initramfs.7.gz $(DESTDIR)/usr/share/man/man7/live-getty.7.gz
71         ln -sf live-initramfs.7.gz $(DESTDIR)/usr/share/man/man7/live-login.7.gz
72
73 uninstall:
74         # Uninstalling configuration
75         rm -f $(DESTDIR)/etc/live.conf
76
77         # Uninstalling executables
78         rm -f $(DESTDIR)/sbin/live-getty $(DESTDIR)/sbin/live-login $(DESTDIR)/sbin/live-snapshot
79         rm -rf $(DESTDIR)/usr/share/live-initramfs
80         rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
81         rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
82         rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/live
83
84         # Uninstalling documentation
85         rm -rf $(DESTDIR)/usr/share/doc/live-initramfs
86
87         # Uninstalling manpages
88         set -e; for MANPAGE in manpages/*.en.1; \
89         do \
90                 rm -f $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
91         done
92
93         set -e; for MANPAGE in manpages/*.en.7; \
94         do \
95                 rm -f $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
96         done
97
98         set -e; for TRANSLATIONS in $$TRANSLATIONS; \
99         do \
100                 for MANPAGE in manpages/*.$$TRANSLATION.1; \
101                 do \
102                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/`basename $$MANPAGE .$$TRANSLATION.1`.1; \
103                 done; \
104                 for MANPAGE in manpages/*.$$TRANSLATION.7; \
105                 do \
106                         install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7; \
107                 done; \
108         done
109
110         # Temporary symlinks
111         rm -f $(DESTDIR)/usr/share/man/man7/live-getty.7.gz
112         rm -f $(DESTDIR)/usr/share/man/man7/live-login.7.gz
113
114 update:
115         set -e; for FILE in docs/parameters.txt; \
116         do \
117                 sed -i  -e 's/2007\\-11\\-19/2007\\-11\\-26/' \
118                         -e 's/2007-11-19/2007-11-26/' \
119                         -e 's/19.11.2007/26.11.2007/' \
120                         -e 's/1.113.1/1.113.2/' \
121                 $$FILE; \
122         done
123
124         # Update language list
125         wget -O "contrib/languagelist" \
126                 "http://svn.debian.org/viewsvn/*checkout*/d-i/trunk/packages/localechooser/languagelist"
127
128 clean:
129
130 distclean:
131
132 reinstall: uninstall install