[SCM] qm-dsp/master: Rather use d/rules than own Makefile.

mira-guest at users.alioth.debian.org mira-guest at users.alioth.debian.org
Mon Dec 12 18:05:48 UTC 2016


The following commit has been merged in the master branch:
commit 057649d3d18e14eedc86a265d30a9f83917146ca
Author: Jaromír Mikeš <mira.mikes at seznam.cz>
Date:   Mon Dec 12 19:05:30 2016 +0100

    Rather use d/rules than own Makefile.

diff --git a/debian/patches/01-Makefile.patch b/debian/patches/01-Makefile.patch
deleted file mode 100644
index 8c32909..0000000
--- a/debian/patches/01-Makefile.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Description: Provide own Makefile to build shared libs.
-Author: Jaromír Mikeš <mira.mikes at seznam.cz>
-Forwarded: no
-
-Index: qm-dsp/Makefile
-===================================================================
---- /dev/null
-+++ qm-dsp/Makefile
-@@ -0,0 +1,60 @@
-+PREFIX ?= /usr
-+LIBDIR ?=
-+
-+MAJVERS = 0
-+MINVERS = 0.0
-+
-+CFLAGS += -DNDEBUG -O3 -fPIC -ffast-math -ftree-vectorize -DUSE_PTHREADS
-+CXXFLAGS += -fPIC -Wall
-+CXXFLAGS += $(CFLAGS)
-+LDLFAGS +=
-+LDLIBS +=
-+
-+QM-DSP_SO = libqm-dsp.so
-+QM-DSP_MAJ = $(QM-DSP_SO).$(MAJVERS)
-+QM-DSP_MIN = $(QM-DSP_MAJ).$(MINVERS)
-+QM-DSP_DEP = libqm-dsp.a
-+QM-DSP_H = qm-dsp
-+
-+$(QM-DSP_MAJ):	$(QM-DSP_DEP)
-+	gcc -shared $(LDFLAGS) -o $(QM-DSP_MAJ) -Wl,-soname,$(QM-DSP_MAJ) -Wl,--whole-archive $(QM-DSP_DEP) -Wl,--no-whole-archive
-+
-+install:	$(QM-DSP_MAJ)
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/base
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/chromagram
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/keydetection
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/mfcc
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/onsets
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/phasevocoder
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rateconversion
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rhythm
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/segmentation
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/signalconditioning
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tempotracking
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tonal
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/transforms
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/wavelet
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/hmm
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/maths/pca
-+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/thread
-+	install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
-+	install -m 644 base/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/base
-+	install -m 644 dsp/chromagram/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/chromagram
-+	install -m 644 dsp/keydetection/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/keydetection
-+	install -m 644 dsp/mfcc/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/mfcc
-+	install -m 644 dsp/onsets/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/onsets
-+	install -m 644 dsp/phasevocoder/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/phasevocoder
-+	install -m 644 dsp/rateconversion/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rateconversion
-+	install -m 644 dsp/rhythm/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rhythm
-+	install -m 644 dsp/segmentation/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/segmentation
-+	install -m 644 dsp/signalconditioning/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/signalconditioning
-+	install -m 644 dsp/tempotracking/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tempotracking
-+	install -m 644 dsp/tonal/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tonal
-+	install -m 644 dsp/transforms/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/transforms
-+	install -m 644 dsp/wavelet/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/wavelet
-+	install -m 644 hmm/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/hmm
-+	install -m 644 maths/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/maths
-+	install -m 644 maths/pca/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/maths/pca
-+	install -m 644 thread/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/thread
-+	install -m 755 $(QM-DSP_MAJ) $(DESTDIR)$(PREFIX)/$(LIBDIR)
-+	ln -sf $(QM-DSP_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(QM-DSP_SO)
diff --git a/debian/patches/series b/debian/patches/series
index 0073058..6bea02c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-01-Makefile.patch
 02-fix_include.patch
diff --git a/debian/rules b/debian/rules
index e167c5d..e7ab052 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,14 +3,70 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-export LIBDIR=lib/$(DEB_HOST_MULTIARCH)
-export DESTDIR=$(CURDIR)/debian/tmp
+PREFIX = /usr
+LIBDIR=lib/$(DEB_HOST_MULTIARCH)
+DESTDIR=$(CURDIR)/debian/tmp
 
 DEB_MAINT_LD_FLAGS_APPEND = -Wl,--as-needed
 
+MAJVERS = 0
+MINVERS = 0.0
+
+CFLAGS += -DNDEBUG -O3 -fPIC -ffast-math -ftree-vectorize -DUSE_PTHREADS
+CXXFLAGS += -fPIC -Wall
+CXXFLAGS += $(CFLAGS)
+
+QM-DSP_SO = libqm-dsp.so
+QM-DSP_MAJ = $(QM-DSP_SO).$(MAJVERS)
+QM-DSP_MIN = $(QM-DSP_MAJ).$(MINVERS)
+QM-DSP_DEP = libqm-dsp.a
+QM-DSP_H = qm-dsp
+
 %:
 	dh $@
 
 override_dh_auto_build:
-	$(MAKE) -f Makefile -f build/general/Makefile.inc
+	$(MAKE) -f build/general/Makefile.inc
 	dh_auto_build
+	gcc -shared $(LDFLAGS) -o $(QM-DSP_MAJ) -Wl,-soname,$(QM-DSP_MAJ) -Wl,--whole-archive $(QM-DSP_DEP) -Wl,--no-whole-archive
+
+override_dh_auto_install:
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/base
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/chromagram
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/keydetection
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/mfcc
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/onsets
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/phasevocoder
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rateconversion
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rhythm
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/segmentation
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/signalconditioning
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tempotracking
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tonal
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/transforms
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/wavelet
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/hmm
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/maths/pca
+	install -d $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/thread
+	install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
+	install -m 644 base/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/base
+	install -m 644 dsp/chromagram/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/chromagram
+	install -m 644 dsp/keydetection/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/keydetection
+	install -m 644 dsp/mfcc/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/mfcc
+	install -m 644 dsp/onsets/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/onsets
+	install -m 644 dsp/phasevocoder/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/phasevocoder
+	install -m 644 dsp/rateconversion/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rateconversion
+	install -m 644 dsp/rhythm/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/rhythm
+	install -m 644 dsp/segmentation/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/segmentation
+	install -m 644 dsp/signalconditioning/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/signalconditioning
+	install -m 644 dsp/tempotracking/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tempotracking
+	install -m 644 dsp/tonal/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/tonal
+	install -m 644 dsp/transforms/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/transforms
+	install -m 644 dsp/wavelet/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/dsp/wavelet
+	install -m 644 hmm/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/hmm
+	install -m 644 maths/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/maths
+	install -m 644 maths/pca/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/maths/pca
+	install -m 644 thread/*.h $(DESTDIR)$(PREFIX)/include/$(QM-DSP_H)/thread
+	install -m 755 $(QM-DSP_MAJ) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+	ln -sf $(QM-DSP_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(QM-DSP_SO)
+	dh_auto_install

-- 
qm-dsp packaging



More information about the pkg-multimedia-commits mailing list