[SCM] csoundqt/master: Use upstream install target, add patch to make it work

fsateler at users.alioth.debian.org fsateler at users.alioth.debian.org
Fri Mar 11 18:20:01 UTC 2016


The following commit has been merged in the master branch:
commit 4ea1390573833c2456f3094e06c55a10c6835a5c
Author: Felipe Sateler <fsateler at debian.org>
Date:   Mon Mar 7 20:55:21 2016 -0300

    Use upstream install target, add patch to make it work

diff --git a/debian/csoundqt.install b/debian/csoundqt.install
index 691b94a..7955253 100644
--- a/debian/csoundqt.install
+++ b/debian/csoundqt.install
@@ -1,2 +1 @@
-bin/csoundqt		/usr/bin
 images/qtcs.xpm		/usr/share/pixmaps
diff --git a/debian/patches/install-path.patch b/debian/patches/install-path.patch
new file mode 100644
index 0000000..5d1fdd9
--- /dev/null
+++ b/debian/patches/install-path.patch
@@ -0,0 +1,55 @@
+--- a/qcs.pro
++++ b/qcs.pro
+@@ -155,10 +155,14 @@ message(TARGET is:      $${TARGET})
+ # install commands for linux (for make install)
+ # use 'sudo make install' for system wide installation
+ unix {
+-	INSTALL_DIR=/usr/local  # ~  #for HOME
+-	SHARE_DIR=/usr/share # ~/.local for HOME install
++	isEmpty(INSTALL_DIR) {	
++		INSTALL_DIR=/usr/local  # ~  #for HOME
++	}
++	isEmpty(SHARE_DIR) {
++		SHARE_DIR=/usr/share # ~/.local for HOME install
++	}
+ 	target.path = $$INSTALL_DIR/bin
+-	target.commands = ln -sf $$INSTALL_DIR/bin/$$TARGET $$INSTALL_DIR/bin/csoundqt #	 create link always with the same name
++	target.commands = ln -sf $$TARGET $(INSTALL_ROOT)/$$INSTALL_DIR/bin/csoundqt #	 create link always with the same name
+ 	target.files = $$DESTDIR/$$TARGET
+ 
+ 
+@@ -168,8 +172,8 @@ unix {
+ 	icon.path=$$SHARE_DIR/icons # not sure in fact, if /usr/share/icons is enough or better to put into hicolor...
+ 	icon.files=images/qtcs.svg
+ 
+-	mimetypes.path=$$PWD # in some reason path must be set to create install target in Makefile
+-	mimetypes.commands = cd $$PWD/mime-types/; ./add_csound_mimetypes.sh
++	mimetypes.path=$$INSTALL_DIR # in some reason path must be set to create install target in Makefile
++	mimetypes.commands = cd $$PWD/mime-types/; ./add_csound_mimetypes.sh $(INSTALL_ROOT)/$$INSTALL_DIR no-update
+ 
+ 
+ 	#TODO: mime types
+--- a/mime-types/add_csound_mimetypes.sh
++++ b/mime-types/add_csound_mimetypes.sh
+@@ -1,7 +1,10 @@
+ #!/bin/sh 
+ 
+ #copy icon for csound mimetypes
+-INSTALLDIR=/usr #~/.local # use the latter one for local install
++INSTALLDIR="$1"
++if [ -z "$INSTALLDIR" ] ; then
++	INSTALLDIR=/usr #~/.local # use the latter one for local install
++fi
+ ICONDIR=$INSTALLDIR/share/icons/hicolor/128x128/mimetypes 
+ mkdir -v -p $ICONDIR
+ cp -v csound-light-128.png $ICONDIR/csound.png
+@@ -11,6 +14,8 @@ MIMEDIR=$INSTALLDIR/share/mime # or /usr
+ DESTDIR=$MIMEDIR/packages 
+ mkdir -v -p $DESTDIR # make if does not exist
+ cp -v *.xml $DESTDIR
+-update-mime-database -V $MIMEDIR
++if [ "$2" != "no-update" ] ; then
++	update-mime-database -V $MIMEDIR
++fi
+ 
+ echo "You may need to log out and log in to make changes effective." 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..31f7921
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+install-path.patch
diff --git a/debian/rules b/debian/rules
index ac3b1f2..6481af0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,12 +14,9 @@ DEB_QMAKE_ARGS = -r qcs.pro \
     "CSOUND_INCLUDE_DIR = /usr/include/csound" \
     "CSOUND_LIBRARY_DIR = /usr/lib" \
     "CSOUND_SOURCE_TREE = /dev/null " \
+    INSTALL_DIR=/usr SHARE_DIR=/usr/share \
+
 
 DEB_BUILD_PARALLEL = 1
 DEB_INSTALL_MANPAGES_csoundqt = debian/csoundqt.1
 
-build/csoundqt::
-	[ -f bin/csoundqt ] || mv bin/CsoundQt-d-cs6 bin/csoundqt
-
-clean::
-	rm -f bin/csoundqt

-- 
csoundqt packaging



More information about the pkg-multimedia-commits mailing list