live-build/Makefile

114 lines
2.9 KiB
Makefile
Raw Normal View History

2007-09-23 08:05:09 +00:00
# Makefile
2007-09-23 08:04:20 +00:00
2009-04-26 07:11:42 +00:00
SHELL := sh -e
#TRANSLATIONS="de"
2007-09-23 08:05:09 +00:00
2009-04-26 07:11:42 +00:00
all: test install
2007-09-23 08:04:20 +00:00
2007-09-23 08:04:51 +00:00
test:
# Checking for syntax errors
2010-03-07 09:49:29 -01:00
for SCRIPT in live-helper.sh cgi/* 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
2009-04-26 07:11:42 +00:00
if [ -x /usr/bin/checkbashisms ]; \
then \
checkbashisms live-helper.sh functions/* examples/*/*.sh helpers/* hooks/*; \
else \
echo "WARNING: skipping bashism test - you need to install devscripts."; \
fi
2007-09-23 08:05:09 +00:00
build:
@echo "Nothing to build."
install:
2007-09-23 08:04:46 +00:00
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live-helper
2010-03-07 09:49:29 -01:00
cp -r cgi data examples live-helper.sh functions helpers hooks includes lists templates $(DESTDIR)/usr/share/live-helper
2009-11-22 12:40:20 -01:00
# Installing executables
mkdir -p $(DESTDIR)/usr/bin
mv $(DESTDIR)/usr/share/live-helper/helpers/lh $(DESTDIR)/usr/share/live-helper/helpers/live-helper $(DESTDIR)/usr/bin
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
2009-04-26 07:11:42 +00:00
for MANPAGE in manpages/*.en.1; \
2007-09-23 08:04:51 +00:00
do \
2009-04-26 07:11:42 +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
2009-04-26 07:11:42 +00:00
for MANPAGE in manpages/*.en.7; \
2007-09-23 08:04:51 +00:00
do \
2009-04-26 07:11:42 +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
2009-04-26 07:11:42 +00:00
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 \
2009-04-26 07:11:42 +00:00
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1; \
2007-09-23 08:05:09 +00:00
done; \
for MANPAGE in manpages/*.$$TRANSLATION.7; \
do \
2009-04-26 07:11:42 +00:00
install -D -m 0644 $$MANPAGE $(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: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 shared data
rm -rf $(DESTDIR)/usr/share/live-helper
2009-11-22 12:40:20 -01:00
# Uninstalling executables
rm -f $(DESTDIR)/usr/bin/lh $(DESTDIR)/usr/bin/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
2009-04-26 07:11:42 +00:00
for MANPAGE in manpages/*.en.1; \
2007-09-23 08:04:51 +00:00
do \
2009-04-26 07:11:42 +00:00
rm -f $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1*; \
2007-09-23 08:04:51 +00:00
done
2009-04-26 07:11:42 +00:00
for MANPAGE in manpages/*.en.7; \
2007-09-23 08:04:47 +00:00
do \
2009-04-26 07:11:42 +00:00
rm -f $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7*; \
2007-09-23 08:04:47 +00:00
done
2009-04-26 07:11:42 +00:00
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 \
2009-04-26 07:11:42 +00:00
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1*; \
2007-09-23 08:05:09 +00:00
done; \
for MANPAGE in manpages/*.$$TRANSLATION.7; \
do \
2009-04-26 07:11:42 +00: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:46 +00:00
clean:
2007-09-23 08:04:40 +00:00
2007-09-23 08:04:51 +00:00
distclean:
reinstall: uninstall install
po4a:
# Automatic generation of translated manpages
2009-04-26 07:11:42 +00:00
if [ $$(which po4a) ]; \
then \
cd manpages; \
po4a po4a/live-helper.cfg; \
else \
2009-04-26 07:11:42 +00:00
echo "ERROR: skipping po generation - you need to install po4a <http://po4a.alioth.debian.org/>."; \
fi