From: Konrad Rosenbaum Date: Sun, 25 Dec 2011 14:46:57 +0000 (+0100) Subject: more install targets X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c3c526a88a625e22a96b1b4dc1569583b5040285;p=konrad%2Fsmoke.git more install targets --- diff --git a/Makefile b/Makefile index 6e498a6..b6436db 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ########################################################### # global Makefile for MagicSmoke -# (c) Konrad Rosenbaum, 2008-2011 +# (c) Konrad Rosenbaum, 2008-2012 # # This Makefile is used for creating the complete # MagicSmoke package - including all sub-packages in @@ -29,7 +29,7 @@ DOXYGEN = doxygen #the directory to install MagicSmoke to for preparation of packages # change this only if you want to install directly without building # packages first -PREFIX = dist +PREFIX = /usr/local #the make utility to use # normally you do not need to change this, the macosx target changes it on its own @@ -48,7 +48,7 @@ XPAT=xmlpatterns ########################################################### # END OF CONFIGURATION -# No editable content below this line +# No user editable content below this line ########################################################### QTDIR=$(shell $(QMAKE) -query QT_INSTALL_PREFIX) @@ -65,16 +65,22 @@ none: @echo " server - build the server (in Unix mode)" @echo " all - build everything (in Unix mode)" @echo " debug - build client in debug mode" - @echo " macosx - build the client and server on Mac OS/X" + @echo " macosx - build the client and server on MacOS/X" @echo "Documentation, Translation:" @echo " sdoc - generate source docu, needs doxygen" @echo " lupdate - update translation source files" @echo " lrelease - create binary translation files" - @echo "Installation:" + @echo "Direct Installation:" @echo " install-client - install the client (Unix/Mac)" @echo " install-server - install the server (Unix/Mac)" @echo " install - install everything (Unix/Mac)" + @echo " --> all these install into $(PREFIX) per default, you can" + @echo " override by specifying PREFIX=/my/path for make" + @echo "Installation Packages:" + @echo " macosx - create the client as dmg for MacOS/X" @echo " nsis - generate NSIS package (Win32)" + @echo " dpkg - generate Debian packages" + @echo " tgz - generate generic tar.gz packages (Unix/Linux)" @echo "Cleanup:" @echo " clean - clean up intermediate files (Unix/Mac)" @echo " distclean - clean up built files (Unix/Mac)" @@ -125,12 +131,10 @@ install: install-client install-server install-doc install-client: client mkdir -p $(PREFIX)/bin install -D src/msmoke $(PREFIX)/lib/magicsmoke2/msmoke - cp src/icon.png $(PREFIX)/lib/magicsmoke2/ - echo '#!/bin/sh' >$(PREFIX)/usr/bin/msmoke2 - echo 'LD_LIBRARY_PATH='$(PREFIX)/lib/magicsmoke2:$LD_LIBRARY_PATH' >>$(PREFIX)/bin/msmoke2 - echo 'export LD_LIBRARY_PATH' >>$(PREFIX)/bin/msmoke2 - echo 'exec '$(PREFIX)'/lib/magicsmoke2/msmoke' >>$(PREFIX)/bin/msmoke2 - chmod +x $(PREFIX)/bin/msmoke2 + strip $(PREFIX)/lib/magicsmoke2/msmoke + cp src/images/icon.png $(PREFIX)/lib/magicsmoke2/ + cp msmoke2.sh-tmpl $(PREFIX)/bin/msmoke2 + chmod 755 $(PREFIX)/bin/msmoke2 SPREFIX=$(PREFIX)/share/magicmsoke2-server install-server: server @@ -161,17 +165,47 @@ distclean: clean debug: QMAKEFLAGS+=CONFIG+=debug debug: client server +##installation packages + macosx: MYMAKE=xcodebuild macosx: client server lrelease cd src ; cp *.qm msmoke.app/Contents/MacOS cd src ; for i in *.qm ; do cp -f $(QTTRANS)/qt$${i#smoke} msmoke.app/Contents/MacOS || true ; done cd src ; rm -f msmoke.dmg ; macdeployqt msmoke.app -dmg - + @echo "....." + @echo "You find the package in src/msmoke.dmg" nsis: script client echo !define QTDIR / >qtpath.nsh $(QMAKE) -query QT_INSTALL_PREFIX >>qtpath.nsh $(NSIS) $(NOPT) smoke.nsi +dpkg: + fakeroot debian/rules binary + +tgz-clean: + -rm -rf dist-srv dist-cli dist-doc + +tgz-server: PREFIX=dist-srv +tgz-server: install-server + cd dist-srv ; tar c . |gzip > ../magicsmoke2-server.tar.gz + +tgz-client: PREFIX=dist-cli +tgz-client: install-client + cp -a $(QTDIR)/lib/libQtScript.s* dist-cli/lib/magicsmoke2 + cp -a $(QTDIR)/lib/libQtScriptTools.s* dist-cli/lib/magicsmoke2 + cp -a $(QTDIR)/lib/libQtCore.s* dist-cli/lib/magicsmoke2 + cp -a $(QTDIR)/lib/libQtGui.s* dist-cli/lib/magicsmoke2 + cp -a $(QTDIR)/lib/libQtNetwork.s* dist-cli/lib/magicsmoke2 + cp -a $(QTDIR)/lib/libQtXml.s* dist-cli/lib/magicsmoke2 + cd dist-cli ; tar c . |gzip >../magicsmoke2-client.tar.gz + +tgz-doc: PREFIX=dist-srv +tgz-doc: install-doc + cd dist-doc ; tar c . |gzip >../magicsmoke2-doc.tar.gz + +tgz: tgz-clean tgz-server tgz-client tgz-doc + + #tell Make that the rules above are symbolic: .PHONY: script woc wob server client sdoc zip wbase clean distclean tzone elam debug macosx diff --git a/msmoke2.sh-tmpl b/msmoke2.sh-tmpl new file mode 100755 index 0000000..b1e7288 --- /dev/null +++ b/msmoke2.sh-tmpl @@ -0,0 +1,6 @@ +#!/bin/sh +#this is a wrapper script for MagicSmoke 2 on Unixoid systems +MDIR=$(dirname $0)/../lib/magicsmoke2 +test -n "$LD_LIBRARY_PATH" && LD_LIBRARY_PATH=$MDIR:$LD_LIBRARY_PATH || LD_LIBRARY_PATH=$MDIR +export $LD_LIBRARY_PATH +exec $MDIR/msmoke