2007-01-30 12:47:36 +00:00
|
|
|
BINDIR=/usr/local/bin
|
|
|
|
MODDIR=/usr/local/lib
|
2008-07-28 12:33:29 +00:00
|
|
|
VARDIR=/var/log/fhem
|
2007-01-30 12:47:36 +00:00
|
|
|
|
2009-12-22 11:00:54 +00:00
|
|
|
VERS=4.9
|
2010-03-13 11:23:13 +00:00
|
|
|
DATE=2010-03-14
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
all:
|
|
|
|
@echo Nothing to do for all.
|
|
|
|
@echo To install, check the Makefile, and then \'make install\'
|
2008-07-28 12:33:29 +00:00
|
|
|
@echo or \'make install-pgm2\' to install a web frontend too.
|
2007-01-30 12:47:36 +00:00
|
|
|
|
2008-07-28 12:33:29 +00:00
|
|
|
install:install-base
|
2009-01-22 19:32:34 +00:00
|
|
|
-mv $(VARDIR)/fhem.cfg $(VARDIR)/fhem.cfg.`date "+%Y-%m-%d_%H:%M:%S"`
|
2009-12-05 09:00:12 +00:00
|
|
|
cp examples_changed/sample_fhem $(VARDIR)/fhem.cfg
|
2008-07-28 12:33:29 +00:00
|
|
|
@echo
|
|
|
|
@echo
|
2009-12-05 09:00:12 +00:00
|
|
|
@echo Start fhem with
|
2009-02-11 14:35:16 +00:00
|
|
|
@echo perl $(BINDIR)/fhem.pl $(VARDIR)/fhem.cfg
|
2008-07-28 12:33:29 +00:00
|
|
|
|
|
|
|
install-pgm2:install-base
|
2009-02-11 14:35:16 +00:00
|
|
|
cp -r webfrontend/pgm2/* $(MODDIR)/FHEM
|
2008-07-28 12:33:29 +00:00
|
|
|
cp docs/commandref.html docs/faq.html docs/HOWTO.html $(MODDIR)/FHEM
|
2010-03-13 11:23:13 +00:00
|
|
|
cp docs/*.png docs/*.jpg $(MODDIR)/FHEM
|
2009-01-22 19:32:34 +00:00
|
|
|
-mv $(VARDIR)/fhem.cfg $(VARDIR)/fhem.cfg.`date "+%Y-%m-%d_%H:%M:%S"`
|
2009-12-05 09:00:12 +00:00
|
|
|
cp examples_changed/sample_pgm2 $(VARDIR)/fhem.cfg
|
|
|
|
cd examples_changed; for i in *; do cp -r $$i $(MODDIR)/FHEM/example.$$i; done
|
2008-07-28 12:33:29 +00:00
|
|
|
@echo
|
|
|
|
@echo
|
2009-12-05 09:00:12 +00:00
|
|
|
@echo Start fhem with
|
2009-02-11 14:35:16 +00:00
|
|
|
@echo perl $(BINDIR)/fhem.pl $(VARDIR)/fhem.cfg
|
2007-01-30 12:47:36 +00:00
|
|
|
|
2008-07-28 12:33:29 +00:00
|
|
|
install-base:
|
2009-02-11 14:35:16 +00:00
|
|
|
mkdir -p $(BINDIR) $(MODDIR) $(VARDIR)
|
2008-07-12 08:16:51 +00:00
|
|
|
cp fhem.pl $(BINDIR)
|
2008-07-24 07:39:15 +00:00
|
|
|
cp -r FHEM $(MODDIR)
|
2009-12-05 09:00:12 +00:00
|
|
|
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]*
|
2008-07-12 08:16:51 +00:00
|
|
|
|
2007-01-30 12:47:36 +00:00
|
|
|
dist:
|
|
|
|
@echo Version is $(VERS), Date is $(DATE)
|
|
|
|
mkdir .f
|
2009-10-23 14:42:41 +00:00
|
|
|
cp -r CHANGED FHEM HISTORY Makefile README.CVS\
|
|
|
|
TODO contrib docs examples fhem.pl webfrontend .f
|
2008-07-28 12:33:29 +00:00
|
|
|
find .f -name CVS -print | xargs rm -rf
|
2007-01-30 12:47:36 +00:00
|
|
|
find .f -name \*.orig -print | xargs rm -f
|
2008-07-24 07:39:15 +00:00
|
|
|
find .f -name .#\* -print | xargs rm -f
|
2007-01-30 12:47:36 +00:00
|
|
|
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)
|