live-build/Makefile

114 lines
2.8 KiB
Makefile
Raw Normal View History

2007-09-23 08:05:09 +00:00
# Makefile
2007-09-23 08:04:20 +00:00
#TRANSLATIONS="de"
2007-09-23 08:05:09 +00:00
all: build
2007-09-23 08:04:20 +00:00
2007-09-23 08:04:51 +00:00
test:
# Checking for syntax errors
2007-09-23 08:05:09 +00:00
set -e; for SCRIPT in functions/* examples/*/*.sh helpers/* hooks/*; \
2007-09-23 08:04:51 +00:00
do \
2007-09-23 08:05:09 +00:00
sh -n $$SCRIPT; \
2007-09-23 08:04:51 +00:00
done
# Checking for bashisms (temporary not failing, but only listing)
if [ -x /usr/bin/checkbashisms ]; \
then \
checkbashisms functions/* examples/*/*.sh helpers/* hooks/* || true; \
else \
echo "bashism test skipped - you need to install devscripts."; \
fi
2007-09-23 08:05:09 +00:00
build:
@echo "Nothing to build."
2007-09-23 08:04:51 +00:00
install: test
2007-09-23 08:04:46 +00:00
# Installing executables
mkdir -p $(DESTDIR)/usr/bin
cp helpers/lh* helpers/make-live $(DESTDIR)/usr/bin
2007-09-23 08:04:20 +00:00
2007-09-23 08:04:46 +00:00
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live-helper
2007-09-23 08:05:12 +00:00
cp -r data examples functions hooks includes lists templates $(DESTDIR)/usr/share/live-helper
2007-09-23 08:04:20 +00:00
2007-09-23 08:04:46 +00:00
# Installing documentation
mkdir -p $(DESTDIR)/usr/share/doc/live-helper
2007-09-23 08:05:09 +00:00
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-helper
2007-09-23 08:04:40 +00:00
2007-09-23 08:04:47 +00:00
# Installing manpages
2007-09-23 08:05:09 +00:00
set -e; for MANPAGE in manpages/*.en.1; \
2007-09-23 08:04:51 +00:00
do \
2007-09-23 08:05:09 +00:00
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
2007-09-23 08:04:51 +00:00
done
2007-09-23 08:05:09 +00:00
set -e; for MANPAGE in manpages/*.en.7; \
2007-09-23 08:04:51 +00:00
do \
2007-09-23 08:05:09 +00:00
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
2007-09-23 08:04:51 +00:00
done
2007-09-23 08:04:47 +00:00
2007-09-23 08:05:09 +00:00
set -e; for TRANSLATIONS in $$TRANSLATIONS; \
2007-09-23 08:04:51 +00:00
do \
2007-09-23 08:05:09 +00:00
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; \
2007-09-23 08:04:51 +00:00
done
2007-09-23 08:04:47 +00:00
2007-09-23 08:05:10 +00:00
# Installing logfile
mkdir -p $(DESTDIR)/var/log
2007-09-23 08:04:20 +00:00
uninstall:
2007-09-23 08:04:46 +00:00
# Uninstalling executables
2007-09-23 08:04:47 +00:00
for HELPER in helpers/*; \
do \
rm -f $(DESTDIR)/usr/bin/`basename $$HELPER`; \
done
2007-09-23 08:04:21 +00:00
2007-09-23 08:04:46 +00:00
# Uninstalling shared data
rm -rf $(DESTDIR)/usr/share/live-helper
2007-09-23 08:04:22 +00:00
2007-09-23 08:04:46 +00:00
# Uninstalling documentation
rm -rf $(DESTDIR)/usr/share/doc/live-helper
2007-09-23 08:04:20 +00:00
2007-09-23 08:04:47 +00:00
# Uninstalling manpages
2007-09-23 08:05:09 +00:00
set -e; for MANPAGE in manpages/*.en.1; \
2007-09-23 08:04:51 +00:00
do \
2007-09-23 08:05:09 +00:00
rm -f $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
2007-09-23 08:04:51 +00:00
done
2007-09-23 08:05:09 +00:00
set -e; for MANPAGE in manpages/*.en.7; \
2007-09-23 08:04:47 +00:00
do \
2007-09-23 08:05:09 +00:00
rm -f $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
2007-09-23 08:04:47 +00:00
done
2007-09-23 08:05:09 +00:00
set -e; for TRANSLATIONS in $$TRANSLATIONS; \
2007-09-23 08:04:47 +00:00
do \
2007-09-23 08:05:09 +00:00
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 \
2007-11-19 16:07:55 -01:00
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7; \
2007-09-23 08:05:09 +00:00
done; \
2007-09-23 08:04:47 +00:00
done
2007-09-23 08:04:52 +00:00
update:
2007-11-19 16:07:35 -01:00
set -e; for FILE in functions/*.sh examples/cron/*.sh manpages/*.en.*; \
2007-09-23 08:04:52 +00:00
do \
2007-11-19 16:07:35 -01:00
sed -i -e 's/2007\\-11\\-26/2007\\-12\\-03/' \
-e 's/26.11.2007/03.12.2007/' \
-e 's/1.0~a38/1.0~a39/' \
2007-09-23 08:05:15 +00:00
$$FILE; \
2007-09-23 08:05:10 +00:00
done
2007-09-23 08:04:52 +00:00
2007-09-23 08:04:46 +00:00
clean:
2007-09-23 08:04:40 +00:00
2007-09-23 08:04:51 +00:00
distclean:
reinstall: uninstall install