From: konrad Date: Thu, 6 Aug 2009 09:53:20 +0000 (+0000) Subject: correct debian packages for new version X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=197123e774a99d593a3e76f53f6a1209dfeeb3d9;p=web%2Fkonrad%2Fsmoke.git correct debian packages for new version git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@311 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/debian/README.server b/debian/README.server index 55da69e..44afaf6 100644 --- a/debian/README.server +++ b/debian/README.server @@ -7,7 +7,7 @@ Unfortunately this does not work entirely automaticly. ----------------- The debian package installs the server PHP files in /usr/lib/magicsmoke-server -and links them to /var/www/magicsmoke . You need to change that link if your +and links them to /var/www/magicsmoke2 . You need to change that link if your DocumentRoot is somewhere else or you want a different name. 2 - Database @@ -26,11 +26,14 @@ Create a MySQL database - I'll assume it is called "smoke". Give the user all rights on this database. mysql> GRANT ALL ON smoke.* TO smoke; -MagicSmoke uses a common configurable prefix for its tables ("smoke_*" per +MagicSmoke uses a common configurable prefix for its tables ("smoke2_*" per default), so you can use an existing database or even use the same database for multiple installations or different programs (assuming the other programs are as tolerant as MagicSmoke). +MagicSmoke2 can be installed in parallel to the old MagicSmoke packages, but it +cannot access the same tables. + 3 - Configuring MagicSmoke --------------------------- @@ -56,6 +59,9 @@ else can abuse this interface. From now on you can access it with the MagicSmoke client. Your URL for the client ends in machine.php (eg. http://localhost/magicsmoke/machine.php). +Note: MagicSmoke2 is not able to import old MagicSmoke Backups, you need to +import those with an old installation and then convert them. (See below.) + 5 - Templates -------------- @@ -69,3 +75,8 @@ templates. When you are ready redirect the server to your now template directory by editing the $template variable in config.php . + +Appendix A - Converting an old Database +---------------------------------------- + +To be written. diff --git a/debian/control b/debian/control index 9be8a17..8042c39 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: magicsmoke +Source: magicsmoke2 Section: main Priority: extra Maintainer: Konrad Rosenbaum @@ -6,17 +6,17 @@ Build-Depends: debhelper (>= 7), libqt4-dev, qt4-dev-tools, subversion, subversi Standards-Version: 3.7.3 Homepage: http://smoke.silmor.de -Package: magicsmoke +Package: magicsmoke2-client Architecture: any Depends: ${shlibs:Depends} -Recommends: magicsmoke-doc -Suggests: magicsmoke-server +Recommends: magicsmoke2-doc +Suggests: magicsmoke2-server Description: MagicSmoke Ticket Sale System - This package contains the MagicSmoke Ticket Sales System Client. + This package contains the MagicSmoke Ticket Sales System Client version 2. . - It requires a server to be running somewhere. + It requires a MagicSmoke version 2 server to be running somewhere. -Package: magicsmoke-doc +Package: magicsmoke2-doc Architecture: all Depends: Suggests: magicsmoke @@ -24,9 +24,12 @@ Description: MagicSmoke Ticket Sale System This package contains the MagicSmoke Ticket Sales System Documentation in HTML format. -Package: magicsmoke-server +Package: magicsmoke2-server Architecture: all Depends: php5 (>= 5), php5-mysql (>= 5), php5-mhash (>= 5) Suggests: magicsmoke-doc, magicsmoke Description: MagicSmoke Ticket Sale System - This package contains the MagicSmoke Ticket Sales System Server. + This package contains the MagicSmoke Ticket Sales System Server version 2. + . + It can be installed in parallel to the old version 1 system, but is + incompatible with old databases. diff --git a/debian/gencl b/debian/gencl index 9318281..aaa3741 100755 --- a/debian/gencl +++ b/debian/gencl @@ -2,15 +2,14 @@ cl=debian/changelog -REV=$(svn info|grep Revision:|cut -d " " -f 2) - -while test $(echo -n $REV|wc -c) -lt 4 ; do REV="0$REV" ; done +REV="$(svn info|grep Revision:|cut -d " " -f 2)" +REV="2$(echo -n $REV|wc -c|tr 1-9 a-i)$REV" if test `svn stat -q|wc -l` -gt 0 ; then - REV="$REV-uc" + REV="$REV-local0" fi -echo "magicsmoke (1r$REV) stable; urgency=low" >$cl +echo "magicsmoke2 ($REV) unstable; urgency=low" >$cl echo >>$cl echo " Package Generated by" `whoami`@`hostname` `date -R`>>$cl echo >>$cl diff --git a/debian/magicsmoke.menu b/debian/magicsmoke.menu deleted file mode 100644 index 01da780..0000000 --- a/debian/magicsmoke.menu +++ /dev/null @@ -1,3 +0,0 @@ -?package(magicsmoke):needs="X11" section="Applications/Network"\ - title="MagicSmoke Client" command="/usr/bin/msmoke"\ - icon="/usr/lib/magicsmoke/icon.png" diff --git a/debian/magicsmoke2-client.menu b/debian/magicsmoke2-client.menu new file mode 100644 index 0000000..9c735fb --- /dev/null +++ b/debian/magicsmoke2-client.menu @@ -0,0 +1,3 @@ +?package(magicsmoke):needs="X11" section="Applications/Network"\ + title="MagicSmoke Client" command="/usr/bin/msmoke2"\ + icon="/usr/lib/magicsmoke2/icon.png" diff --git a/debian/magicsmoke.postinst b/debian/magicsmoke2-client.postinst similarity index 100% rename from debian/magicsmoke.postinst rename to debian/magicsmoke2-client.postinst diff --git a/debian/magicsmoke.postrm b/debian/magicsmoke2-client.postrm similarity index 100% rename from debian/magicsmoke.postrm rename to debian/magicsmoke2-client.postrm diff --git a/debian/magicsmoke.prerm b/debian/magicsmoke2-client.prerm similarity index 100% rename from debian/magicsmoke.prerm rename to debian/magicsmoke2-client.prerm diff --git a/debian/rules b/debian/rules index 1e089bf..bee3a9c 100755 --- a/debian/rules +++ b/debian/rules @@ -23,7 +23,6 @@ configure-stamp: @echo Configuring... dh_testdir debian/gencl - cd src; /usr/bin/qmake touch configure-stamp @@ -33,6 +32,12 @@ build-stamp: configure-stamp @echo '********************' @echo Building... dh_testdir + cd woc; /usr/bin/qmake + $(MAKE) -C woc + cd wob; ../woc/woc magicsmoke.wolf + cd zip; /usr/bin/qmake + $(MAKE) -C zip + cd src; /usr/bin/qmake $(MAKE) -C src cd src ; /usr/bin/lrelease smoke.pro touch $@ @@ -44,6 +49,9 @@ clean: dh_testroot rm -f build-stamp configure-stamp $(MAKE) -C src distclean + $(MAKE) -C woc distclean + $(MAKE) -C zip distclean + rm -rf src/wob www/inc/wob dh_clean install: install-base install-client install-doc install-server @@ -55,44 +63,52 @@ install-base: build dh_installdirs -i dh_installdirs -s +CLIENT=$(CURDIR)/debian/magicsmoke2-client install-client: @echo '********************' @echo Install Client... - mkdir -p $(CURDIR)/debian/magicsmoke/usr/share/doc/magicsmoke - install -D src/msmoke $(CURDIR)/debian/magicsmoke/usr/lib/magicsmoke/msmoke - cp src/icon.png $(CURDIR)/debian/magicsmoke/usr/lib/magicsmoke/ - echo '#!/bin/sh' >$(CURDIR)/debian/magicsmoke/usr/bin/msmoke - echo 'exec /usr/lib/magicsmoke/msmoke' >>$(CURDIR)/debian/magicsmoke/usr/bin/msmoke - chmod +x $(CURDIR)/debian/magicsmoke/usr/bin/msmoke - rm -rf `find $(CURDIR)/debian/magicsmoke -name .svn` - cp -L README COPYING* $(CURDIR)/debian/magicsmoke/usr/share/doc/magicsmoke - gzip `ls $(CURDIR)/debian/magicsmoke/usr/share/doc/magicsmoke/* |grep -v .gz` - cp -L src/smoke*.qm $(CURDIR)/debian/magicsmoke/usr/lib/magicsmoke - + mkdir -p $(CLIENT)/usr/share/doc/magicsmoke2-client + install -D src/msmoke $(CLIENT)/usr/lib/magicsmoke2/msmoke + cp zip/lib* $(CLIENT)/usr/lib/magicsmoke2/ + cp src/icon.png $(CLIENT)/usr/lib/magicsmoke2/ + echo '#!/bin/sh' >$(CLIENT)/usr/bin/msmoke2 + echo 'LD_LIBRARY_PATH=/usr/lib/magicsmoke2:$LD_LIBRARY_PATH' >>$(CLIENT)/usr/bin/msmoke2 + echo 'export LD_LIBRARY_PATH' >>$(CLIENT)/usr/bin/msmoke2 + echo 'exec /usr/lib/magicsmoke2/msmoke' >>$(CLIENT)/usr/bin/msmoke2 + chmod +x $(CLIENT)/usr/bin/msmoke2 + rm -rf `find $(CLIENT) -name .svn` + cp -L README COPYING* $(CLIENT)/usr/share/doc/magicsmoke2-client + gzip `ls $(CLIENT)/usr/share/doc/magicsmoke2-client/* |grep -v .gz` + cp -L src/smoke*.qm $(CLIENT)/usr/lib/magicsmoke2 + +DOCDIR=$(CURDIR)/debian/magicsmoke2-doc +DOCTARGET=usr/share/doc/magicsmoke2-client +DOCDOC=usr/share/doc/magicsmoke2-doc install-doc: @echo '********************' @echo Install Doc... - mkdir -p $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke - mkdir -p $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke-doc - mkdir -p $(CURDIR)/debian/magicsmoke-doc/usr/lib/magicsmoke - cp -rL doc $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke - ln -sf ../../share/doc/magicsmoke/doc $(CURDIR)/debian/magicsmoke-doc/usr/lib/magicsmoke/doc - cp -L README COPYING* $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke-doc - gzip `ls $(CURDIR)/debian/magicsmoke-doc/usr/share/doc/magicsmoke-doc/* |grep -v .gz` - rm -rf `find $(CURDIR)/debian/magicsmoke-doc -name .svn` - + mkdir -p $(DOCDIR)/$(DOCTARGET) + mkdir -p $(DOCDIR)/$(DOCDOC) + mkdir -p $(DOCDIR)/usr/lib/magicsmoke2 + cp -rL doc $(DOCDIR)/$(DOCTARGET) + ln -sf ../../../$(DOCTARGET)/doc $(DOCDIR)/usr/lib/magicsmoke2/doc + cp -L README COPYING* $(DOCDIR)/$(DOCDOC) + gzip `ls $(DOCDIR)/$(DOCDOC)/* |grep -v .gz` + rm -rf `find $(DOCDIR) -name .svn` + +SERVER=$(CURDIR)/debian/magicsmoke2-server install-server: @echo '********************' @echo Install Server... - mkdir -p $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server - cp -rL www $(CURDIR)/debian/magicsmoke-server/usr/share/magicsmoke-server - mkdir -p $(CURDIR)/debian/magicsmoke-server/var/www - ln -sf ../../usr/share/magicsmoke-server $(CURDIR)/debian/magicsmoke-server/var/www/magicsmoke - rm -rf `find $(CURDIR)/debian/magicsmoke-server -name .svn` - rm -f $(CURDIR)/debian/magicsmoke-server/usr/share/magicsmoke-server/config.php - cp -L README COPYING* $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server - gzip `ls $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server/* |grep -v .gz` - gzip $(CURDIR)/debian/magicsmoke-server/usr/share/doc/magicsmoke-server/README.Debian-Install.gz + mkdir -p $(SERVER)/usr/share/doc/magicsmoke2-server + cp -rL www $(SERVER)/usr/share/magicsmoke2-server + mkdir -p $(SERVER)/var/www + ln -sf ../../usr/share/magicsmoke2-server $(SERVER)/var/www/magicsmoke2 + rm -rf `find $(SERVER) -name .svn` + rm -f $(SERVER)/usr/share/magicsmoke2-server/config.php + cp -L README COPYING* $(SERVER)/usr/share/doc/magicsmoke2-server + gzip `ls $(SERVER)/usr/share/doc/magicsmoke2-server/* |grep -v .gz` + gzip $(SERVER)/usr/share/doc/magicsmoke2-server/README.Debian-Install.gz binary-common: dh_testdir @@ -119,7 +135,7 @@ binary-common: # dh_perl # dh_makeshlibs dh_installdeb - dh_shlibdeps + dh_shlibdeps -lusr/lib/magicsmoke2 dh_gencontrol dh_md5sums dh_builddeb