--- opus-1.3.1.orig/debian/changelog +++ opus-1.3.1/debian/changelog @@ -0,0 +1,330 @@ +opus (1.3.1-0.1build2) jammy; urgency=high + + * No change rebuild for ppc64el baseline bump. + + -- Julian Andres Klode Thu, 24 Mar 2022 17:28:37 +0100 + +opus (1.3.1-0.1build1) impish; urgency=medium + + * No-change rebuild to build packages with zstd compression. + + -- Matthias Klose Thu, 07 Oct 2021 12:22:02 +0200 + +opus (1.3.1-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream release (closes: #934809). + + -- Dmitry Shachnev Fri, 25 Sep 2020 18:09:03 +0300 + +opus (1.3-1) unstable; urgency=medium + + * Enable support for ambisonics coding using mappings 2 and 3. + * Use wideband encoding down to 9 kb/s. + * Retrain RNN classifier weights to include reverberated speech. + * Drop the explicit --enable-hardening from d/rules, it's enabled by default + upstream now. + + -- Ron Lee Tue, 18 Dec 2018 06:04:03 +1030 + +opus (1.3~beta+20180518-1) unstable; urgency=medium + + * Fix the CELT input NaN test. + + -- Ron Lee Fri, 18 May 2018 05:04:27 +0930 + +opus (1.3~beta+20180516-1) unstable; urgency=medium + + * Snapshot from 652c4559f593d3aad78bd5c85a216eeae7859429 as a preview of + patches pending for the 1.3 release. The main motivation for doing this + now is to pull in the fix for the PLC regression introduced just before + 1.2~alpha2, which Closes: #898690, and to get some broader testing on the + new hardening checks before flipping the switch to enable those by default + upstream. + * Fix celt_pitch_xcorr() ARM jump table compiling error for a bug introduced + in 1.2-rc1. + * Better rate allocation for stereo SILK in hybrid mode. + * Add RNN for VAD and speech/music classification. + * Fixing bandwidth detection for 24 kHz analysis. + * Enable RFC 8251 changes by default. + * Better tuning for low-bitrate music. + * Don't set _FORTIFY_SOURCE and -fstack-protector as part of the packaging + anymore, the upstream build system will add them where they are supported + and needed now. + * Build with --enable-hardening, which isn't related to the compile options + above, but instead includes additional opus-specific runtime sanity checks + which are cheap and certain enough to use in production builds. + * Use dh compat 9, not because it actually brings anything new which we need + here, but it hushes the increasingly insistent warnings about deprecated + compat levels, and is a baseline supported by all of the releases we still + need to be able to support. I'm going to say this Closes: #810258, since + the rest of the 'modernisation' there mostly isn't helpful. We've already + been running the tests since the very first release, we release directly + from upstream git and maintain upstream patches there, so format 3(quilt) + adds nothing but pain, and we have upstream build and install targets that + are designed to cleanly separate the -arch specific and -indep components, + so regressing to make those codependent isn't very appealing either. It + would have also broken support for building where m-a wasn't supported, + though that's less of a problem today than it was previously. + + -- Ron Lee Thu, 17 May 2018 16:07:39 +0930 + +opus (1.2.1-1) unstable; urgency=medium + + * Fixes a bug in surround encoding causing very bad quality on loud signals + beyond a certain amplitude. + * Speech quality improvements especially in the 12-24 kbit/s range. + * Music quality improvements in the 32-48 kb/s range. + * More aggressive use of wider speech bandwidth, including fullband speech + starting at 14 kbit/s. + * Improved VBR encoding for hybrid mode. + * SILK CBR improvements. + * DTX support for CELT mode. + * Support for directly encoding packets up to 120 ms. + * Improves quality on files with powerful tones that cause MDCT leakage. + * Fixes for speech/music detection at the very beginning of files. + * Fixes an issue where the encoder can misdetect that the signal is SWB + instead of FB, lowpassing the signal. + + -- Ron Lee Thu, 28 Sep 2017 01:48:45 +0930 + +opus (1.2~alpha2-1) unstable; urgency=medium + + * Run the tonality analysis at 24 kHz, which reduces complexity while giving + better frequency resolution for the tonality estimate. + * Speech quality improvements especially in the 12-20 kbit/s range. + * Improved VBR encoding for hybrid mode. + * More aggressive use of wider speech bandwidth, including fullband speech + starting at 14 kbit/s. + * Music quality improvements in the 32-48 kb/s range. + * Generic and SSE CELT optimizations. + * Support for directly encoding packets up to 120 ms. + * DTX support for CELT mode. + * SILK CBR improvements. + * Ensure that NLSF cannot be negative when computing a min distance between + them. This was reported and fixed in July, and assessed as having only a + relatively minor impact (garbage output, from the garbage input needed to + trigger it), or at very worst, an assertion failure or simple crash from + a slightly out of bounds read. In December it was assigned CVE-2017-0381 + by someone other than the upstream developers, with claims of it being a + 'Critical' issue on Android, but we're yet to see any analysis to back + that up. Closes: #851612 + + -- Ron Lee Fri, 20 Jan 2017 02:48:31 +1030 + +opus (1.1.3-1) unstable; urgency=medium + + * Remove the generation date from the docs to improve reproducible builds. + Closes: #825345 + * Fixes some corner cases with the soft clipper. + * Improve CBR and some other issues seen with using crazy low rates. + * More robustness fixes for reporting bad input. + * More optimisations, mostly for ARM. + * More precision fixes for edge cases. + * Fixes to comfort noise generation. + + -- Ron Lee Thu, 27 Oct 2016 23:58:06 +1030 + +opus (1.1.2-1) unstable; urgency=medium + + * Fixes the transient detector on silence. + * Fixes discontinuities in background noise after extended PLC. + * Make the CELT background noise estimator adapt more quickly on DTX update. + * Fixes max_decay for LFE in fixed-point. + * Fixes patch_transient_decision() for hybrid mode. + * Don't reset the RTCD arch on encoder/decoder reset. + + -- Ron Lee Wed, 13 Jan 2016 07:26:14 +1030 + +opus (1.1.1-1) unstable; urgency=medium + + * Mostly just lots of new optimisation, with a few minor bug fixes and + quality improvements. + + -- Ron Lee Fri, 27 Nov 2015 00:08:55 +1030 + +opus (1.1-2) unstable; urgency=medium + + * Regenerate build system files, mostly to pull in a later libtool.m4 + which has fixes for building the ppc64le architecture. Closes: #751982 + + -- Ron Lee Tue, 26 Aug 2014 19:43:46 +0930 + +opus (1.1-1) unstable; urgency=low + + * Bump to the final 1.1 release version. + * Relax the shlibs and track real symbol versions from here on, + now that we have a real stable release version in the distro. + + -- Ron Lee Mon, 09 Dec 2013 02:04:41 +1030 + +opus (1.1~rc+20131204-1) unstable; urgency=low + + * Really 1.1-rc3, except 3 < + to dpkg. + * Fixes fixed-point OPUS_SET_GAIN. + * Fixes fixed-point stereo regression. + + -- Ron Lee Wed, 04 Dec 2013 23:16:57 +1030 + +opus (1.1~rc+20131128-1) unstable; urgency=low + + * Fixes the EDSP asm for ARMv5TE. + * Uses the actually intended NEON code. + + -- Ron Lee Thu, 28 Nov 2013 04:30:46 +1030 + +opus (1.1~rc-1) unstable; urgency=low + + * Adds the new packet padding API and OPUS_SET_PREDICTION_DISABLED ctl. + * Supports the SET_MAX_BANDWIDTH ctl for multstream encoders too. + * Many improvements to surround encoding. + * More asm optimisation for ARM, and speed ups for other CPUs. + * Many fixes for oddball corner cases, and improvements to calibration. + + -- Ron Lee Tue, 26 Nov 2013 21:46:41 +1030 + +opus (1.1~beta-4) unstable; urgency=low + + * Revert bogus NMU. + + -- Ron Lee Mon, 18 Nov 2013 06:26:21 +1030 + +opus (1.1~beta-3) unstable; urgency=low + + * Bump shlibs for the surround API. + + -- Ron Lee Sun, 14 Jul 2013 01:02:28 +0930 + +opus (1.1~beta-2) unstable; urgency=low + + * Rebuild with the correct package_version indicated. + + -- Ron Lee Sat, 13 Jul 2013 02:49:49 +0930 + +opus (1.1~beta-1) unstable; urgency=low + + * Adds the new surround API. + * Many encoder improvements, better tonality and speech/music probability + estimation, temporal VBR, surround masking, numerous speed optimisations. + + -- Ron Lee Sat, 13 Jul 2013 01:54:14 +0930 + +opus (1.1~alpha+20130512-1) unstable; urgency=low + + * Preview snapshot of the 1.1 release. Mostly to give people who need some + of the newer API functions for their own projects something to play with + while we finalise the rest of what is planned for this one. + The encoder should perform better (both for quality and bitrate) than the + 1.0.x releases, but please do report any regressions you find upstream + so that they can be fixed. + + -- Ron Lee Sun, 12 May 2013 16:33:52 +0930 + +opus (1.0.1-1) experimental; urgency=low + + * The RFC 6716 release. + * Cherry pick be0d8c5ee1 to fix the build system breakage from -rc3. + * Add the stack protector flags to /rules which got dropped from the + upstream build system in -rc3 too. + * Pushed to experimental for the new libav which needs the gain ctls. + Closes: #690563 + + -- Ron Lee Thu, 18 Oct 2012 10:38:53 +1030 + +opus (0.9.14+20120615-1) unstable; urgency=low + + * Add extern "C" protection to opus_multistream.h. + * Warn about unused returns and NULL arguments for functions where that would + always be an error in the calling code. + * Clearly mark fixed point builds in the internal versioning. + * Better documentation. + * Suggest opus-tools. + + -- Ron Lee Fri, 15 Jun 2012 11:58:27 +0930 + +opus (0.9.14+20120521-2) unstable; urgency=low + + * Build the fixed point version for arm(el) and mips(el). + Fixes the unit test timeout seen on the mips buildd. + * Add some extra 'hardening' flags to those upstream uses already. + + -- Ron Lee Wed, 23 May 2012 12:49:50 +0930 + +opus (0.9.14+20120521-1) unstable; urgency=low + + * Opus draft-14 release testing. + * This one's for Sid. Closes: #610980 + + -- Ron Lee Mon, 21 May 2012 06:24:33 +0930 + +opus (0.9.8-1) experimental; urgency=low + + * Opus draft-10 release testing. + + -- Ron Lee Wed, 02 Nov 2011 22:55:51 +1030 + +opus (0.9.4-1) experimental; urgency=low + + * Initial (re)release as Opus. Closes: #610980 + + -- Ron Lee Sat, 30 Apr 2011 18:31:33 +0930 + +celt (0.7.1-1) unstable; urgency=low + + * The "correlation does not imply causation" release. + To celebrate the first release of celt that is actually compatible with a + a previously distributed version, we've renamed the library! + * libcelt is now libcelt0. The intent from upstream being to make it clear + that one of the above was an accident, and unlikely to be repeated soon. + On the bright side, this means we should be getting proper soname bumps + from now on when the code ABI changes. The bitstream format still remains + entirely fluid though, applications which communicate with a peer _must_ + check that the formats are compatible at runtime. It may, and indeed is + very likely to, continue changing with every release. + * By some small miracle, this should be an entirely painless transition + though. The new package doesn't conflict with the existing one, and all + rdeps except mumble will switch to the new package with a binNMU, but not + be broken in the meantime. They use the .pc file provided, and have been + build tested. The mumble package is waiting on this one before it can work + properly anyway, so a fix for that is just waiting for this to get through + the NEW queue first now. + * The new PLC is reported to be working Really Well. + + -- Ron Lee Wed, 20 Jan 2010 18:31:33 +1030 + +celt (0.7.0-1) unstable; urgency=low + + * Another day, another bitstream format. Closes: #554559 + * Drop the IETF drafts for now. Better to leave worrying about the + paperwork for this until we have some documents that aren't actually + supposed to expire in less than the life of a distro release. + Closes: #538990 for now. If you really need to reference them, then + you should probably be tracking git anyhow, as they should be changing + while the codec evolves too. + + -- Ron Lee Sat, 07 Nov 2009 17:48:35 +1030 + +celt (0.6.1-1) unstable; urgency=low + + * New upstream release. Closes: #511163 + + -- Ron Lee Sun, 26 Jul 2009 05:16:42 +0930 + +celt (0.4.0-1) unstable; urgency=low + + * New upstream release. + + -- Ron Lee Sat, 26 Jul 2008 23:21:35 +0930 + +celt (0.3.2-1) unstable; urgency=low + + * New upstream release. + + -- Ron Lee Sat, 17 May 2008 04:31:42 +0930 + +celt (0.3.0-1) unstable; urgency=low + + * Initial release. Closes: #474392 + + -- Ron Lee Sat, 05 Apr 2008 03:07:18 +0930 + --- opus-1.3.1.orig/debian/compat +++ opus-1.3.1/debian/compat @@ -0,0 +1 @@ +9 --- opus-1.3.1.orig/debian/control +++ opus-1.3.1/debian/control @@ -0,0 +1,86 @@ +Source: opus +Section: sound +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ron Lee +Build-Depends: debhelper (>= 9) +Build-Depends-Indep: doxygen, graphviz +Standards-Version: 4.2.1.5 +Homepage: http://www.opus-codec.org +Vcs-Git: https://salsa.debian.org/ron/opus.git +Vcs-Browser: https://salsa.debian.org/ron/opus + +Package: libopus0 +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends} +Suggests: opus-tools +Description: Opus codec runtime library + The Opus codec is designed for interactive speech and audio transmission over + the Internet. It is designed by the IETF Codec Working Group and incorporates + technology from Skype's SILK codec and Xiph.Org's CELT codec. + . + It is intended to suit a wide range of interactive audio applications, + including Voice over IP, videoconferencing, in-game chat, and even remote live + music performances. It can scale from low bit-rate narrowband speech to very + high quality stereo music. The current features are: + . + Bit-rates from 6 kb/s 510 kb/s + Sampling rates from 8 to 48 kHz + Frame sizes from 2.5 ms to 60 ms + Support for both constant bit-rate (CBR) and variable bit-rate (VBR) + Audio bandwidth from narrowband to full-band + Support for speech and music + Support for mono and stereo + Support for up to 255 channels (multistream frames) + Dynamically adjustable bitrate, audio bandwidth, and frame size + Good loss robustness and packet loss concealment (PLC) + Floating point and fixed-point implementation + . + This package provides the Opus runtime library. + +Package: libopus-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: libopus0 (= ${binary:Version}) +Description: Opus codec library development files + The Opus codec is designed for interactive speech and audio transmission over + the Internet. It is designed by the IETF Codec Working Group and incorporates + technology from Skype's SILK codec and Xiph.Org's CELT codec. + . + It is intended to suit a wide range of interactive audio applications, + including Voice over IP, videoconferencing, in-game chat, and even remote live + music performances. It can scale from low bit-rate narrowband speech to very + high quality stereo music. The current features are: + . + Bit-rates from 6 kb/s 510 kb/s + Sampling rates from 8 to 48 kHz + Frame sizes from 2.5 ms to 60 ms + Support for both constant bit-rate (CBR) and variable bit-rate (VBR) + Audio bandwidth from narrowband to full-band + Support for speech and music + Support for mono and stereo + Support for up to 255 channels (multistream frames) + Dynamically adjustable bitrate, audio bandwidth, and frame size + Good loss robustness and packet loss concealment (PLC) + Floating point and fixed-point implementation + . + This package provides the Opus library headers and development files. + +Package: libopus-dbg +Section: debug +Priority: extra +Architecture: any +Multi-Arch: same +Depends: libopus0 (= ${binary:Version}) +Description: debugging symbols for libopus + This package provides the detached debug symbols for libopus. + +Package: libopus-doc +Section: doc +Architecture: all +Description: libopus API documentation + This package contains the developer documentation for libopus. + --- opus-1.3.1.orig/debian/copyright +++ opus-1.3.1/debian/copyright @@ -0,0 +1,41 @@ +This package was debianised by Ron on +Sat, 05 Apr 2008 03:07:18 +0930. + +Upstream source was cloned from http://git.opus-codec.org/opus.git + + Copyright 2001-2018 Xiph.Org, Skype Limited, Octasic, + Jean-Marc Valin, Timothy B. Terriberry, + CSIRO, Gregory Maxwell, Mark Borgerding, + Erik de Castro Lopo + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + - Neither the name of Internet Society, IETF or IETF Trust, nor the + names of specific contributors, may be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +The Debian packaging is Copyright 2008 - 2018, Ron and +is licensed under the same terms as opus itself. --- opus-1.3.1.orig/debian/libopus-doc.doc-base +++ opus-1.3.1/debian/libopus-doc.doc-base @@ -0,0 +1,27 @@ +Document: libopus +Title: Opus codec and library API documentation +Author: IETF codec working group +Abstract: A low-latency interactive speech and audio codec + . + The Opus codec is designed for interactive speech and audio transmission over + the Internet. It is designed by the IETF Codec Working Group and incorporates + technology from Skype's SILK codec and Xiph.Org's CELT codec. + . + It is intended to suit a wide range of interactive audio applications, + including Voice over IP, videoconferencing, in-game chat, and even remote live + music performances. It can scale from low bit-rate narrowband speech to very + high quality stereo music. The current features are: + . + Sampling rates from 8 to 48 kHz + Bit-rates from 6 kb/s 510 kb/s + Support for both constant bit-rate (CBR) and variable bit-rate (VBR) + Audio bandwidth from narrowband to full-band + Support for speech and music + Support for mono and stereo + Frame sizes from 2.5 ms to 60 ms + Good loss robustness and packet loss concealment (PLC) +Section: Programming/C + +Format: HTML +Index: /usr/share/doc/libopus-doc/html/index.html +Files: /usr/share/doc/libopus-doc/html/* --- opus-1.3.1.orig/debian/libopus-doc.docs +++ opus-1.3.1/debian/libopus-doc.docs @@ -0,0 +1 @@ +debian/tmp/usr/share/doc/opus/html --- opus-1.3.1.orig/debian/libopus0.symbols +++ opus-1.3.1/debian/libopus0.symbols @@ -0,0 +1,68 @@ +libopus.so.0 libopus0 #MINVER# + opus_decode@Base 1.1 + opus_decode_float@Base 1.1 + opus_decoder_create@Base 1.1 + opus_decoder_ctl@Base 1.1 + opus_decoder_destroy@Base 1.1 + opus_decoder_get_nb_samples@Base 1.1 + opus_decoder_get_size@Base 1.1 + opus_decoder_init@Base 1.1 + opus_encode@Base 1.1 + opus_encode_float@Base 1.1 + opus_encoder_create@Base 1.1 + opus_encoder_ctl@Base 1.1 + opus_encoder_destroy@Base 1.1 + opus_encoder_get_size@Base 1.1 + opus_encoder_init@Base 1.1 + opus_get_version_string@Base 1.1 + opus_multistream_decode@Base 1.1 + opus_multistream_decode_float@Base 1.1 + opus_multistream_decoder_create@Base 1.1 + opus_multistream_decoder_ctl@Base 1.1 + opus_multistream_decoder_destroy@Base 1.1 + opus_multistream_decoder_get_size@Base 1.1 + opus_multistream_decoder_init@Base 1.1 + opus_multistream_encode@Base 1.1 + opus_multistream_encode_float@Base 1.1 + opus_multistream_encoder_create@Base 1.1 + opus_multistream_encoder_ctl@Base 1.1 + opus_multistream_encoder_destroy@Base 1.1 + opus_multistream_encoder_get_size@Base 1.1 + opus_multistream_encoder_init@Base 1.1 + opus_multistream_packet_pad@Base 1.1 + opus_multistream_packet_unpad@Base 1.1 + opus_multistream_surround_encoder_create@Base 1.1 + opus_multistream_surround_encoder_get_size@Base 1.1 + opus_multistream_surround_encoder_init@Base 1.1 + opus_packet_get_bandwidth@Base 1.1 + opus_packet_get_nb_channels@Base 1.1 + opus_packet_get_nb_frames@Base 1.1 + opus_packet_get_nb_samples@Base 1.1 + opus_packet_get_samples_per_frame@Base 1.1 + opus_packet_pad@Base 1.1 + opus_packet_parse@Base 1.1 + opus_packet_unpad@Base 1.1 + opus_pcm_soft_clip@Base 1.1 + opus_projection_ambisonics_encoder_create@Base 1.3~beta+20180516 + opus_projection_ambisonics_encoder_get_size@Base 1.3~beta+20180516 + opus_projection_ambisonics_encoder_init@Base 1.3~beta+20180516 + opus_projection_decode@Base 1.3~beta+20180516 + opus_projection_decode_float@Base 1.3~beta+20180516 + opus_projection_decoder_create@Base 1.3~beta+20180516 + opus_projection_decoder_ctl@Base 1.3~beta+20180516 + opus_projection_decoder_destroy@Base 1.3~beta+20180516 + opus_projection_decoder_get_size@Base 1.3~beta+20180516 + opus_projection_decoder_init@Base 1.3~beta+20180516 + opus_projection_encode@Base 1.3~beta+20180516 + opus_projection_encode_float@Base 1.3~beta+20180516 + opus_projection_encoder_ctl@Base 1.3~beta+20180516 + opus_projection_encoder_destroy@Base 1.3~beta+20180516 + opus_repacketizer_cat@Base 1.1 + opus_repacketizer_create@Base 1.1 + opus_repacketizer_destroy@Base 1.1 + opus_repacketizer_get_nb_frames@Base 1.1 + opus_repacketizer_get_size@Base 1.1 + opus_repacketizer_init@Base 1.1 + opus_repacketizer_out@Base 1.1 + opus_repacketizer_out_range@Base 1.1 + opus_strerror@Base 1.1 --- opus-1.3.1.orig/debian/rules +++ opus-1.3.1/debian/rules @@ -0,0 +1,163 @@ +#!/usr/bin/make -f +# Ron Lee 2003 - 2018 + +#export DH_VERBOSE=1 +export DH_OPTIONS + +SHELL = /bin/bash + +NUM_CPUS = $(shell getconf _NPROCESSORS_ONLN 2>/dev/null) +PARALLEL = $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +NJOBS = -j$(or $(PARALLEL),$(NUM_CPUS),1) + + +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null) + + +# We don't need to add _FORTIFY_SOURCE here anymore, the upstream build system +# will do that for us on systems which support it and where the compiler does +# not already define it for us. +# +#HARD_CPPFLAGS = -D_FORTIFY_SOURCE=2 +HARD_CFLAGS = -Wformat=2 +HARD_LDFLAGS = -Wl,-z,now + +# We don't need to add this here either anymore, the upstream build system will +# also use -fstack-protector-strong where it is supported. +# +#ifneq (,$(filter-out alpha hppa arm, $(DEB_HOST_ARCH))) +# HARD_CFLAGS += -fstack-protector --param ssp-buffer-size=4 +#endif +ifneq (,$(filter-out ia64 hppa avr32, $(DEB_HOST_ARCH))) + HARD_LDFLAGS += -Wl,-z,relro +endif + +# Keep dpkg-buildpackage the hell out of messing with our compile flags, +# we should trust upstream to know better than it what to use here. +# We explicitly re-add -g and -O2 here, since by explicitly overriding +# these variables, we otherwise disable autoconf adding them by default. +CPPFLAGS = $(HARD_CPPFLAGS) +CFLAGS = $(HARD_CFLAGS) -g -O2 +CXXFLAGS = $(HARD_CFLAGS) -g -O2 +LDFLAGS = $(HARD_LDFLAGS) + + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS = -g -O0 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + BUILD_TARGET = check-opus +else + BUILD_TARGET = opus +endif + + +ifneq (,$(DEB_HOST_MULTIARCH)) + MADIR = /$(DEB_HOST_MULTIARCH) + EXTRA_CONFIG_FLAGS = --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) +endif + +ifneq (,$(filter arm armel mips mipsel, $(DEB_HOST_ARCH))) + EXTRA_CONFIG_FLAGS += --enable-fixed-point +endif + + + +objdir := objs + + +clean: + dh_testdir + dh_testroot + $(RM) -r $(objdir) + $(RM) *-stamp + dh_clean + + +$(objdir)/config.status: configure + dh_testdir + mkdir -p $(objdir) + cd $(objdir) && ../configure --disable-maintainer-mode \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + $(EXTRA_CONFIG_FLAGS) \ + CPPFLAGS="$(CPPFLAGS)" \ + CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + LDFLAGS="$(LDFLAGS)" + +build: build-arch build-indep + +build-arch: build-arch-stamp +build-arch-stamp: $(objdir)/config.status + dh_testdir + $(MAKE) $(NJOBS) -C $(objdir) $(BUILD_TARGET) + touch $@ + +build-indep: build-indep-stamp +build-indep-stamp: $(objdir)/config.status + dh_testdir + $(MAKE) $(NJOBS) -C $(objdir) docs + touch $@ + + +install: install-arch install-indep + +install-arch: install-arch-stamp +install-arch-stamp: build-arch + dh_testdir + $(MAKE) -C $(objdir) install-opus DESTDIR=$(CURDIR)/debian/tmp + touch $@ + +install-indep: install-indep-stamp +install-indep-stamp: build-indep + dh_testdir + $(MAKE) -C $(objdir) install-docs DESTDIR=$(CURDIR)/debian/tmp + touch $@ + + +binary: binary-arch binary-indep + +binary-indep: DH_OPTIONS = -i +binary-indep: install-indep + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: install-arch + dh_testdir + dh_testroot + dh_install -plibopus0 debian/tmp/usr/lib$(MADIR)/lib*.so.* usr/lib$(MADIR) + dh_install -plibopus-dev debian/tmp/usr/include/* usr/include + dh_install -plibopus-dev debian/tmp/usr/lib$(MADIR)/lib*.{a,so} usr/lib$(MADIR) + dh_install -plibopus-dev debian/tmp/usr/lib$(MADIR)/pkgconfig/opus.pc usr/lib$(MADIR)/pkgconfig + dh_installdocs -a + dh_installchangelogs -a + dh_strip -a --dbg-package=libopus-dbg + dh_compress -a + dh_fixperms -a + dh_makeshlibs -plibopus0 -- -c0 + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + + +.PHONY: clean build build-arch build-indep install install-arch install-indep \ + binary binary-arch binary-indep +