summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-11-22 14:36:42 +0100
committerDaniel Baumann <daniel@debian.org>2009-11-22 14:38:00 +0100
commita62f12110b19a52a58d7eae871012202cfa16055 (patch)
tree0bd188079c808ee8956fb5304c46ce8266b49f75 /Makefile
downloadvyos-live-build-a62f12110b19a52a58d7eae871012202cfa16055.tar.gz
vyos-live-build-a62f12110b19a52a58d7eae871012202cfa16055.zip
Renaming categories to archive areas (Closes: #519690).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile116
1 files changed, 116 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..5bbe14c8a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,116 @@
+# Makefile
+
+SHELL := sh -e
+
+#TRANSLATIONS="de"
+
+all: test install
+
+test:
+ # Checking for syntax errors
+ for SCRIPT in functions.sh functions/* examples/*/*.sh helpers/* hooks/*; \
+ do \
+ sh -n $$SCRIPT; \
+ done
+
+ # Checking for bashisms
+ if [ -x /usr/bin/checkbashisms ]; \
+ then \
+ checkbashisms functions.sh functions/* examples/*/*.sh helpers/* hooks/*; \
+ else \
+ echo "WARNING: skipping bashism test - you need to install devscripts."; \
+ fi
+
+build:
+ @echo "Nothing to build."
+
+install:
+ # Installing executables
+ mkdir -p $(DESTDIR)/usr/bin
+ cp helpers/* $(DESTDIR)/usr/bin
+
+ # Installing shared data
+ mkdir -p $(DESTDIR)/usr/share/live-helper
+ cp -r data examples functions.sh functions hooks includes lists templates $(DESTDIR)/usr/share/live-helper
+
+ # Installing documentation
+ mkdir -p $(DESTDIR)/usr/share/doc/live-helper
+ cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-helper
+
+ # Installing manpages
+ for MANPAGE in manpages/*.en.1; \
+ do \
+ install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1; \
+ done
+
+ for MANPAGE in manpages/*.en.7; \
+ do \
+ install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7; \
+ done
+
+ for TRANSLATIONS in $$TRANSLATIONS; \
+ do \
+ for MANPAGE in manpages/*.$$TRANSLATION.1; \
+ do \
+ install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1; \
+ done; \
+ for MANPAGE in manpages/*.$$TRANSLATION.7; \
+ do \
+ install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/$$(basename $$MANPAGE .$$TRANSLATION.7).7; \
+ done; \
+ done
+
+ # Installing logfile
+ mkdir -p $(DESTDIR)/var/log
+
+uninstall:
+ # Uninstalling executables
+ for HELPER in helpers/*; \
+ do \
+ rm -f $(DESTDIR)/usr/bin/$$(basename $$HELPER); \
+ done
+
+ # Uninstalling shared data
+ rm -rf $(DESTDIR)/usr/share/live-helper
+
+ # Uninstalling documentation
+ rm -rf $(DESTDIR)/usr/share/doc/live-helper
+
+ # Uninstalling manpages
+ for MANPAGE in manpages/*.en.1; \
+ do \
+ rm -f $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1*; \
+ done
+
+ for MANPAGE in manpages/*.en.7; \
+ do \
+ rm -f $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7*; \
+ done
+
+ for TRANSLATIONS in $$TRANSLATIONS; \
+ do \
+ for MANPAGE in manpages/*.$$TRANSLATION.1; \
+ do \
+ rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1*; \
+ done; \
+ for MANPAGE in manpages/*.$$TRANSLATION.7; \
+ do \
+ rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/$$(basename $$MANPAGE .$$TRANSLATION.7).7*; \
+ done; \
+ done
+
+clean:
+
+distclean:
+
+reinstall: uninstall install
+
+po4a:
+ # Automatic generation of translated manpages
+ if [ $$(which po4a) ]; \
+ then \
+ cd manpages; \
+ po4a po4a/live-helper.cfg; \
+ else \
+ echo "ERROR: skipping po generation - you need to install po4a <http://po4a.alioth.debian.org/>."; \
+ fi