From 20da4d20d5b4a11edb923cb8c4d184ce01e3ae91 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Sat, 10 Feb 2018 19:54:03 +0200 Subject: [PATCH] proper library versioning --- broadvoice.spec | 2 +- build_deb8.sh | 6 + debian/README.Debian | 4 +- debian/README.source | 7 +- debian/changelog | 11 +- debian/compat | 2 +- debian/control | 16 +- debian/copyright | 59 ++- debian/libbroadvoice-dev.install | 3 +- debian/libbroadvoice-dev.lintian-overrides | 2 + debian/libbroadvoice.doc-base.EX | 20 - debian/libbroadvoice1.lintian-overrides | 3 + debian/next-release.txt | 1 - debian/rules | 25 +- debian/source.lintian-overrides | 1 + debian/util.sh | 460 --------------------- 16 files changed, 76 insertions(+), 546 deletions(-) create mode 100755 build_deb8.sh create mode 100644 debian/libbroadvoice-dev.lintian-overrides delete mode 100644 debian/libbroadvoice.doc-base.EX create mode 100644 debian/libbroadvoice1.lintian-overrides delete mode 100644 debian/next-release.txt create mode 100644 debian/source.lintian-overrides delete mode 100755 debian/util.sh diff --git a/broadvoice.spec b/broadvoice.spec index e9d5bf9..15f26e3 100644 --- a/broadvoice.spec +++ b/broadvoice.spec @@ -18,7 +18,7 @@ broadvoice is a library for the BroadVoice 16 and 32 speech codecs. %package devel Summary: BroadVoice development files Group: Development/Libraries -Requires: broadvoice = %{version} +Requires: libbroadvoice = %{version} %description devel libbroadvoice development files. diff --git a/build_deb8.sh b/build_deb8.sh new file mode 100755 index 0000000..6d21541 --- /dev/null +++ b/build_deb8.sh @@ -0,0 +1,6 @@ +#/bin/sh + +apt-get -y install build-essential devscripts +mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" +apt-get -y -f install +debuild -us -uc -b -I.git -i'\.git/' diff --git a/debian/README.Debian b/debian/README.Debian index f11db0d..213f832 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,6 +1,6 @@ libbroadvoice for Debian ------------------------ - +libbroadvoice debian package for FreeSwitch project use - -- William King Tue, 31 Mar 2015 10:28:23 -0700 + -- FreeSWITCH Solutions Fri, 09 Feb 2018 12:41:37 +0200 diff --git a/debian/README.source b/debian/README.source index 7b6fe93..213f832 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,9 +1,6 @@ libbroadvoice for Debian ------------------------ - - - - +libbroadvoice debian package for FreeSwitch project use + -- FreeSWITCH Solutions Fri, 09 Feb 2018 12:41:37 +0200 diff --git a/debian/changelog b/debian/changelog index cb0f8b4..3bcee1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,12 @@ +libbroadvoice (0.1.0-999~u1) unstable; urgency=low + + * Update version release + + -- FreeSWITCH Solutions Fri, 09 Feb 2018 12:50:37 +0200 + libbroadvoice (0.1.0-1) unstable; urgency=low - * Initial release (Closes: #nnnn) + * Initial release, based on release 0.0.1 dated at 20.09.14 + by Steve Underwood - -- William King Tue, 31 Mar 2015 10:28:23 -0700 + -- FreeSWITCH Solutions Fri, 09 Feb 2018 12:41:37 +0200 diff --git a/debian/compat b/debian/compat index 45a4fb7..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +9 diff --git a/debian/control b/debian/control index 04a9701..5885566 100644 --- a/debian/control +++ b/debian/control @@ -1,23 +1,21 @@ Source: libbroadvoice Priority: extra -Maintainer: William King -Build-Depends: debhelper (>= 8.0.0), dh-autoreconf -Standards-Version: 3.9.3 +Maintainer: FreeSWITCH Solutions +Build-Depends: debhelper (>= 9), dh-autoreconf, automake (>= 1.14), autoconf (>= 2.69) +Standards-Version: 3.9.6 Section: libs Homepage: https://www.broadcom.com/support/broadvoice/ -#Vcs-Git: git://git.debian.org/collab-maint/libbroadvoice.git -#Vcs-Browser: http://git.debian.org/?p=collab-maint/libbroadvoice.git;a=summary Package: libbroadvoice-dev Section: libdevel Architecture: any -Depends: libbroadvoice1 (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libbroadvoice1 (= ${binary:Version}) Description: BroadVoice codec development libraries - BroadVoice is a family of speech coding algorithms created by Broadcom and standardized by CableLabs, SCTE, and ANSI for Voice over IP applications in cable telephony. BroadVoice is also part of the ITU-T Recommendations J.161 and J.361. To encourage wide-spread use of BroadVoice in diverse speech compression applications, Broadcom is providing both the floating-point and fixed-point C source code of BroadVoice on a royalty-free basis under the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation. + A library for the BroadVoice 16 and 32 speech codecs. Package: libbroadvoice1 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: BroadVoice codec - BroadVoice is a family of speech coding algorithms created by Broadcom and standardized by CableLabs, SCTE, and ANSI for Voice over IP applications in cable telephony. BroadVoice is also part of the ITU-T Recommendations J.161 and J.361. To encourage wide-spread use of BroadVoice in diverse speech compression applications, Broadcom is providing both the floating-point and fixed-point C source code of BroadVoice on a royalty-free basis under the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation. +Description: BroadVoice codec development libraries + A library for the BroadVoice 16 and 32 speech codecs. diff --git a/debian/copyright b/debian/copyright index 9e3e7ea..8d3d822 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,38 +1,27 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libbroadvoice -Source: +This package was debianized by FreeSWITCH Solutions +on Fri, 09 Feb 2018 12:41:37 +0200. -Files: * -Copyright: - -License: - - - . - +It was downloaded from https://www.soft-switch.org/downloads/voipcodecs/snapshots/broadvoice-20091122.tar.gz -# If you want to use GPL v2 or later for the /debian/* files use -# the following clauses, or change it to suit. Delete these two lines -Files: debian/* -Copyright: 2015 William King -License: GPL-2+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see - . - On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". +Upstream Author(s): + Steve Underwood + +Copyright: + Copyright (C) 2018 FreeSWITCH Solutions -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid to pick license terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. +License: GPL-2+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/libbroadvoice-dev.install b/debian/libbroadvoice-dev.install index d082d99..c4e0b93 100644 --- a/debian/libbroadvoice-dev.install +++ b/debian/libbroadvoice-dev.install @@ -1,4 +1,3 @@ usr/include/* -#usr/lib/lib*.a -usr/lib/lib*.so usr/lib/pkgconfig/* +usr/lib/lib*.so diff --git a/debian/libbroadvoice-dev.lintian-overrides b/debian/libbroadvoice-dev.lintian-overrides new file mode 100644 index 0000000..807eb4a --- /dev/null +++ b/debian/libbroadvoice-dev.lintian-overrides @@ -0,0 +1,2 @@ +libbroadvoice-dev: new-package-should-close-itp-bug +libbroadvoice-dev: helper-templates-in-copyright diff --git a/debian/libbroadvoice.doc-base.EX b/debian/libbroadvoice.doc-base.EX deleted file mode 100644 index faae9fd..0000000 --- a/debian/libbroadvoice.doc-base.EX +++ /dev/null @@ -1,20 +0,0 @@ -Document: libbroadvoice -Title: Debian libbroadvoice Manual -Author: -Abstract: This manual describes what libbroadvoice is - and how it can be used to - manage online manuals on Debian systems. -Section: unknown - -Format: debiandoc-sgml -Files: /usr/share/doc/libbroadvoice/libbroadvoice.sgml.gz - -Format: postscript -Files: /usr/share/doc/libbroadvoice/libbroadvoice.ps.gz - -Format: text -Files: /usr/share/doc/libbroadvoice/libbroadvoice.text.gz - -Format: HTML -Index: /usr/share/doc/libbroadvoice/html/index.html -Files: /usr/share/doc/libbroadvoice/html/*.html diff --git a/debian/libbroadvoice1.lintian-overrides b/debian/libbroadvoice1.lintian-overrides new file mode 100644 index 0000000..50cddc6 --- /dev/null +++ b/debian/libbroadvoice1.lintian-overrides @@ -0,0 +1,3 @@ +libbroadvoice1: new-package-should-close-itp-bug +libbroadvoice1: package-name-doesnt-match-sonames libbroadvoice0 +libbroadvoice1: helper-templates-in-copyright diff --git a/debian/next-release.txt b/debian/next-release.txt deleted file mode 100644 index 6e8bf73..0000000 --- a/debian/next-release.txt +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/debian/rules b/debian/rules index 85ce4e2..1bf4e3f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,22 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +# get debian distribution codename +DISTRIBUTION=$(shell lsb_release -sc) +# get version from changelog, for string mangling +VERSION=$(shell dpkg-parsechangelog --count 1 --show-field Version) +# add distribution codename to package version +PACKAGEVERSION=$(subst ~,~$(DISTRIBUTION)-,$(VERSION)) + +export DH_VERBOSE=1 %: - dh $@ --with autoreconf + dh $@ + +override_dh_auto_configure: + ./autogen.sh + ./configure --prefix=/usr --disable-doc --enable-static --enable-shared + +# setting mangled package version +override_dh_gencontrol: + dh_gencontrol -- -v$(PACKAGEVERSION) diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides new file mode 100644 index 0000000..989839c --- /dev/null +++ b/debian/source.lintian-overrides @@ -0,0 +1 @@ +libbroadvoice source: native-package-with-dash-version diff --git a/debian/util.sh b/debian/util.sh deleted file mode 100755 index 7fa20d2..0000000 --- a/debian/util.sh +++ /dev/null @@ -1,460 +0,0 @@ -#!/bin/bash -##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*- -##### Original Author: Travis Cross -##### Hacks for more generic use: Ken Rice - -set -e - -ddir="." -[ -n "${0%/*}" ] && ddir="${0%/*}" -cd $ddir/../ - -#### lib - -err () { - echo "$0 error: $1" >&2 - exit 1 -} - -announce () { - cat >&2 </dev/null 2>&1 \ - || err "untracked files or build products present" -} - -get_last_release_ver () { - dsc_ver | cut -f 1 -d- - -} - -get_nightly_version () { - dsc_ver | cut -f 1 -d- - -} - -get_nightly_revision_human () { - dsc_ver | cut -f 1 -d- - -} - -create_orig () { - { - set -e - local OPTIND OPTARG - local uver="" hrev="" bundle_deps=false modules_list="" zl=9e - while getopts 'bm:nv:z:' o "$@"; do - case "$o" in - n) uver="nightly";; - v) uver="$OPTARG";; - z) zl="$OPTARG";; - esac - done - shift $(($OPTIND-1)) - if [ -z "$uver" ] || [ "$uver" = "nightly" ]; then - uver="$(get_nightly_version)" - hrev="$(get_nightly_revision_human)" - fi - local treeish="$1" dver="$(mk_dver "$uver")" - local orig="../$(dsc_source)_$dver.orig.tar.xz" - [ -n "$treeish" ] || treeish="HEAD" - check_repo_clean - git reset --hard "$treeish" - mv .gitattributes .gitattributes.orig - local -a args=(-e '\bdebian-ignore\b') - grep .gitattributes.orig "${args[@]}" \ - | while xread l; do - echo "$l export-ignore" >> .gitattributes - done - echo "$uver" > .version && git add -f .version - git commit --allow-empty -m "nightly v$uver" - git archive -v \ - --worktree-attributes \ - --format=tar \ - --prefix=$(dsc_source)-$uver/ \ - HEAD \ - | xz -c -${zl}v > $orig - mv .gitattributes.orig .gitattributes - git reset --hard HEAD~1 && git clean -fdx - } 1>&2 - echo $orig -} - -set_modules_quicktest () { - cat > debian/modules.conf < ../$(dsc_base)_source.changes - echo "WTF!@#!@#4" - local dsc="../$(dsc_base).dsc" - echo "WTF!@#!@#5" - git reset --hard HEAD^ && git clean -fdx - echo "WTF!@#!@#6" - } 1>&2 - echo $dsc -} - -fmt_debug_hook () { - cat <<'EOF' -#!/bin/bash -export debian_chroot="cow" -cd /tmp/buildd/*/debian/.. -/bin/bash < /dev/tty > /dev/tty 2> /dev/tty -EOF -} - -get_sources () { - local tgt_distro="$1" - while read type path distro components; do - test "$type" = deb || continue - printf "$type $path $tgt_distro $components\n" - done < /etc/apt/sources.list -} - -get_mirrors () { - get_sources "$1" | tr '\n' '|' | head -c-1; echo -} - -build_debs () { - { - set -e - local OPTIND OPTARG debug_hook=false hookdir="" cow_build_opts="" - local keep_pbuilder_config=false - local use_system_sources=false - while getopts 'Bbdkt' o "$@"; do - case "$o" in - B) cow_build_opts="--debbuildopts '-B'";; - b) cow_build_opts="--debbuildopts '-b'";; - d) debug_hook=true;; - k) keep_pbuilder_config=true;; - t) use_system_sources=true;; - esac - done - shift $(($OPTIND-1)) - local distro="$(find_distro $1)" dsc="$2" arch="$3" - if [ -z "$distro" ] || [ "$distro" = "auto" ]; then - if ! (echo "$dsc" | grep -e '-[0-9]*~[a-z]*+[0-9]*'); then - err "no distro specified or found" - fi - local x="$(echo $dsc | sed -e 's/^[^-]*-[0-9]*~//' -e 's/+[^+]*$//')" - distro="$(find_distro $x)" - fi - [ -n "$arch" ] || arch="$(dpkg-architecture | grep '^DEB_BUILD_ARCH=' | cut -d'=' -f2)" - [ -x "$(which cowbuilder)" ] \ - || err "package cowbuilder isn't installed" - local cow_img=/var/cache/pbuilder/base-$distro-$arch.cow - cow () { - if ! $use_system_sources; then - cowbuilder "$@" \ - --distribution $distro \ - --architecture $arch \ - --basepath $cow_img - else - local keyring="$(mktemp /tmp/keyringXXXXXXXX.asc)" - apt-key exportall > "$keyring" - cowbuilder "$@" \ - --distribution $distro \ - --architecture $arch \ - --basepath $cow_img \ - --keyring "$keyring" \ - --othermirror "$(get_mirrors $distro)" - rm -f $keyring - fi - } - if ! [ -d $cow_img ]; then - announce "Creating base $distro-$arch image..." - local x=30 - while ! cow --create; do - [ $x -lt 1 ] && break; sleep 120; x=$((x-1)) - done - fi - announce "Updating base $distro-$arch image..." - local x=30 - local opts="--override-config" - $keep_pbuilder_config && opts="" - while ! cow --update $opts; do - [ $x -lt 1 ] && break; sleep 120; x=$((x-1)) - done - announce "Building $distro-$arch DEBs from $dsc..." - if $debug_hook; then - mkdir -p .hooks - fmt_debug_hook > .hooks/C10shell - chmod +x .hooks/C10shell - hookdir=$(pwd)/.hooks - fi - cow --build $dsc \ - --hookdir "$hookdir" \ - --buildresult ../ \ - $cow_build_opts - } 1>&2 - echo ${dsc%.dsc}_${arch}.changes -} - -default_distros () { - local host_distro="Debian" - test -z "$(which lsb_release)" || host_distro="$(lsb_release -is)" - case "$host_distro" in - Debian) echo "sid jessie wheezy" ;; - Ubuntu) echo "utopic trusty" ;; - *) err "Unknown host distribution \"$host_distro\"" ;; - esac -} - -build_all () { - local OPTIND OPTARG - local orig_opts="" dsc_opts="" deb_opts="" modlist="" - local archs="" distros="" orig="" depinst=false par=false - while getopts 'a:bc:df:ijkl:m:no:p:s:tu:v:z:' o "$@"; do - case "$o" in - a) archs="$archs $OPTARG";; - b) orig_opts="$orig_opts -b";; - c) distros="$distros $OPTARG";; - d) deb_opts="$deb_opts -d";; - f) dsc_opts="$dsc_opts -f$OPTARG";; - i) depinst=true;; - j) par=true;; - k) deb_opts="$deb_opts -k";; - m) orig_opts="$orig_opts -m$OPTARG"; dsc_opts="$dsc_opts -m$OPTARG";; - n) orig_opts="$orig_opts -n";; - o) orig="$OPTARG";; - t) deb_opts="$deb_opts -t";; - u) dsc_opts="$dsc_opts -u$OPTARG";; - v) orig_opts="$orig_opts -v$OPTARG";; - z) orig_opts="$orig_opts -z$OPTARG"; dsc_opts="$dsc_opts -z$OPTARG";; - esac - done - shift $(($OPTIND-1)) - [ -n "$archs" ] || archs="amd64 i386" - [ -n "$distros" ] || distros="$(default_distros)" - ! $depinst || aptitude install -y \ - rsync git less cowbuilder ccache \ - devscripts equivs build-essential - [ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)" - if [ -n "$modlist" ]; then - local modtmp="$(mktemp /tmp/modules-XXXXXXXXXX.conf)" - > $modtmp - for m in "$modlist"; do printf '%s\n' "$m" >> $modtmp; done - dsc_opts="$dsc_opts -f${modtmp}"; fi - [ -n "$orig" ] || orig="$(create_orig $orig_opts HEAD | tail -n1)" - mkdir -p ../log - > ../log/changes - echo; echo; echo; echo - trap 'echo "Killing children...">&2; for x in $(jobs -p); do kill $x; done' EXIT - if [ "${orig:0:2}" = ".." ]; then - echo "true" > ../log/builds-ok - for distro in $distros; do - echo "Creating $distro dsc..." >&2 - local dsc="$(create_dsc $dsc_opts $distro $orig 2>../log/$distro | tail -n1)" - echo "Done creating $distro dsc." >&2 - if [ "${dsc:0:2}" = ".." ]; then - local lopts="-b" - for arch in $archs; do - { - echo "Building $distro-$arch debs..." >&2 - local changes="$(build_debs $lopts $deb_opts $distro $dsc $arch 2>../log/$distro-$arch | tail -n1)" - echo "Done building $distro-$arch debs." >&2 - if [ "${changes:0:2}" = ".." ]; then - echo "$changes" >> ../log/changes - else - echo "false" > ../log/builds-ok - fi - } & - $par || wait - lopts="-B" - done - fi - done - ! $par || wait - fi - [ -z "$modlist" ] || rm -f $modtmp - trap - EXIT - cat ../log/changes - test "$(cat ../log/builds-ok)" = true || exit 1 -} - -usage () { - cat >&2 < - Build only modules listed in this file - -i Auto install build deps on host system - -j Build debs in parallel - -k Don't override pbuilder image configurations - -m [ quicktest | non-dfsg ] - Choose custom list of modules to build - -n Nightly build - -o - Specify existing .orig.tar.xz file - -t Use system /etc/apt/sources.list in build environment - -u - Specify a custom suite postfix - -v Set version - -z Set compression level - - build-debs - - [ This must be run as root! ] - - -B Binary architecture-dependent build - -b Binary-only build - -d Enable cowbuilder debug hook - -k Don't override pbuilder image configurations - -t Use system /etc/apt/sources.list in build environment - - create-dbg-pkgs - - create-dsc - - -f - Build only modules listed in this file - -m [ quicktest | non-dfsg ] - Choose custom list of modules to build - -p - Include otherwise avoided module - -s [ paranoid | reckless ] - Set FS bootstrap/build -j flags - -u - Specify a custom suite postfix - -z Set compression level - - create-orig - - -n Nightly build - -v Set version - -z Set compression level - -EOF - exit 1 -} - -while getopts 'dh' o "$@"; do - case "$o" in - d) set -vx;; - h) usage;; - esac -done -shift $(($OPTIND-1)) - -cmd="$1"; [ -n "$cmd" ] || usage -shift -case "$cmd" in - archive-orig) archive_orig "$@" ;; - build-all) build_all "$@" ;; - build-debs) build_debs "$@" ;; - create-dbg-pkgs) create_dbg_pkgs ;; - create-dsc) create_dsc "$@" ;; - create-orig) create_orig "$@" ;; - *) usage ;; -esac