Rename packages to not clash with upstream
[live-boot-grml.git] / Makefile
index 7b15560..c62aabd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,11 @@
 
 SHELL := sh -e
 
-LANGUAGES = de
+LANGUAGES = en $(shell cd manpages/po && ls)
 
 SCRIPTS = bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/*
 
-all: test build
+all: build
 
 test:
        @echo -n "Checking for syntax errors"
@@ -19,47 +19,44 @@ test:
 
        @echo " done."
 
-       @echo -n "Checking for bashisms"
-
        @# We can't just fail yet on bashisms (FIXME)
-       @if [ -x /usr/bin/checkbashisms ]; \
+       @if [ -x "$$(which checkbashisms 2>/dev/null)" ]; \
        then \
+               echo -n "Checking for bashisms"; \
                for SCRIPT in $(SCRIPTS); \
                do \
                        checkbashisms -f -x $${SCRIPT} || true; \
                        echo -n "."; \
                done; \
+               echo " done."; \
        else \
-               echo "WARNING: skipping bashism test - you need to install devscripts."; \
+               echo "W: checkbashisms - command not found"; \
+               echo "I: checkbashisms can be optained from: "; \
+               echo "I:   http://git.debian.org/?p=devscripts/devscripts.git"; \
+               echo "I: On Debian systems, checkbashisms can be installed with:"; \
+               echo "I:   apt-get install devscripts"; \
        fi
 
-       @echo " done."
-
 build:
        @echo "Nothing to build."
 
 install:
-       # (FIXME)
-       # Installing configuration
-       install -D -m 0644 conf/live.conf $(DESTDIR)/etc/live.conf
-       install -D -m 0644 conf/compcache $(DESTDIR)/usr/share/initramfs-tools/conf.d/compcache
-
        # Installing executables
        mkdir -p $(DESTDIR)/sbin
-       cp bin/live-getty bin/live-login bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin
+       cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin
 
-       mkdir -p $(DESTDIR)/usr/share/live-boot
-       cp bin/live-preseed bin/live-reconfigure contrib/languagelist $(DESTDIR)/usr/share/live-boot
+       mkdir -p $(DESTDIR)/usr/share/live-boot-grml
+       cp bin/live-preseed bin/live-reconfigure local/languagelist $(DESTDIR)/usr/share/live-boot-grml
 
        mkdir -p $(DESTDIR)/usr/share/initramfs-tools
        cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
 
        # Installing docs
-       mkdir -p $(DESTDIR)/usr/share/doc/live-boot
-       cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-boot
+       mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml
+       cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-boot-grml
 
-       mkdir -p $(DESTDIR)/usr/share/doc/live-boot/examples
-       cp -r conf/* $(DESTDIR)/usr/share/doc/live-boot/examples
+       mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml/examples
+       cp -r etc/* $(DESTDIR)/usr/share/doc/live-boot-grml/examples
        # (FIXME)
 
        # Installing manpages
@@ -79,20 +76,28 @@ install:
        done
 
 uninstall:
-       # (FIXME)
-       # Uninstalling configuration
-       rm -f $(DESTDIR)/etc/live.conf
-
        # Uninstalling executables
-       rm -f $(DESTDIR)/sbin/live-getty $(DESTDIR)/sbin/live-login $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
-       rm -rf $(DESTDIR)/usr/share/live-boot
+       rm -f $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/sbin
+
+       rm -rf $(DESTDIR)/usr/share/live-boot-grml
+
        rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
        rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
        rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/live
 
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/hooks
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr
+
        # Uninstalling docs
-       rm -rf $(DESTDIR)/usr/share/doc/live-boot
-       # (FIXME)
+       rm -rf $(DESTDIR)/usr/share/doc/live-boot-grml
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr
 
        # Uninstalling manpages
        for MANPAGE in manpages/en/*; \
@@ -110,8 +115,22 @@ uninstall:
                done; \
        done
 
+       for SECTION in $(ls manpages/en/* | awk -F. '{ print $2 }'); \
+       do \
+               rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/man$${SECTION} || true; \
+               rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/*/man$${SECTION} || true; \
+       done
+
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man || true
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share || true
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr || true
+
+       rmdir --ignore-fail-on-non-empty $(DESTDIR) || true
+
 clean:
+       @echo "Nothing to clean."
 
-distclean:
+distclean: clean
+       @echo "Nothing to distclean."
 
 reinstall: uninstall install