live-build/Makefile

110 lines
2.7 KiB
Makefile
Raw Normal View History

2007-09-23 08:05:09 +00:00
# Makefile
2007-09-23 08:04:20 +00:00
2007-09-23 08:05:09 +00:00
TRANSLATIONS="de"
all: build
2007-09-23 08:04:20 +00:00
2007-09-23 08:04:51 +00:00
test:
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
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:04:50 +00:00
cp -r 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 \
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .de.7`.7; \
done; \
2007-09-23 08:04:47 +00:00
done
2007-09-23 08:04:52 +00:00
update:
2007-09-23 08:05:09 +00:00
set -e; for MANPAGE in manpages/*.de.* manpages/*.en.*; \
2007-09-23 08:04:52 +00:00
do \
2007-09-23 08:05:11 +00:00
sed -i -e 's/2007\\-06\\-04/2007\\-06\\-11/' \
-e 's/04.06.2007/11.06.2007/' \
-e 's/1.0~a13/1.0~a14/' \
2007-09-23 08:04:52 +00:00
$$MANPAGE; \
done
2007-09-23 08:05:10 +00:00
set -e; for SCRIPT in functions/common.sh examples/cron/etch.sh examples/cron/etch+beryl.sh; \
do \
2007-09-23 08:05:11 +00:00
sed -i -e 's/1.0~a13/1.0~a14/' $$SCRIPT; \
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