2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00
fhem-mirror/fhem/Makefile
rudolfkoenig 25747ccd51 Autocreate modifications
git-svn-id: https://svn.fhem.de/fhem/trunk@521 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2009-12-22 11:00:54 +00:00

55 lines
1.7 KiB
Makefile

BINDIR=/usr/local/bin
MODDIR=/usr/local/lib
VARDIR=/var/log/fhem
VERS=4.9
DATE=2009-12-23
all:
@echo Nothing to do for all.
@echo To install, check the Makefile, and then \'make install\'
@echo or \'make install-pgm2\' to install a web frontend too.
install:install-base
-mv $(VARDIR)/fhem.cfg $(VARDIR)/fhem.cfg.`date "+%Y-%m-%d_%H:%M:%S"`
cp examples_changed/sample_fhem $(VARDIR)/fhem.cfg
@echo
@echo
@echo Start fhem with
@echo perl $(BINDIR)/fhem.pl $(VARDIR)/fhem.cfg
install-pgm2:install-base
cp -r webfrontend/pgm2/* $(MODDIR)/FHEM
cp docs/commandref.html docs/faq.html docs/HOWTO.html $(MODDIR)/FHEM
-mv $(VARDIR)/fhem.cfg $(VARDIR)/fhem.cfg.`date "+%Y-%m-%d_%H:%M:%S"`
cp examples_changed/sample_pgm2 $(VARDIR)/fhem.cfg
cd examples_changed; for i in *; do cp -r $$i $(MODDIR)/FHEM/example.$$i; done
@echo
@echo
@echo Start fhem with
@echo perl $(BINDIR)/fhem.pl $(VARDIR)/fhem.cfg
install-base:
mkdir -p $(BINDIR) $(MODDIR) $(VARDIR)
cp fhem.pl $(BINDIR)
cp -r FHEM $(MODDIR)
rm -rf examples_changed
cp -r examples examples_changed
perl -pi -e 's,modpath \.,modpath $(MODDIR),' examples_changed/[a-z]*
perl -pi -e 's,([^h]) /tmp,$$1 $(VARDIR),' examples_changed/[a-z]*
dist:
@echo Version is $(VERS), Date is $(DATE)
mkdir .f
cp -r CHANGED FHEM HISTORY Makefile README.CVS\
TODO contrib docs examples fhem.pl webfrontend .f
find .f -name CVS -print | xargs rm -rf
find .f -name \*.orig -print | xargs rm -f
find .f -name .#\* -print | xargs rm -f
find .f -type f -print |\
xargs perl -pi -e 's/=VERS=/$(VERS)/g;s/=DATE=/$(DATE)/g'
mv .f fhem-$(VERS)
tar cf - fhem-$(VERS) | gzip > fhem-$(VERS).tar.gz
mv fhem-$(VERS)/docs/*.html .
rm -rf fhem-$(VERS)