[Pkg-voip-commits] [janus] 01/04: Build-depend on libsrtp0-dev on archs not yet supported by libsrtp2-dev.

Jonas Smedegaard dr at jones.dk
Thu Mar 16 12:07:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository janus.

commit 57e303f548606638f1c24a0c9fd216168a60a767
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Thu Mar 16 12:33:35 2017 +0100

    Build-depend on libsrtp0-dev on archs not yet supported by libsrtp2-dev.
---
 debian/control        |  5 +++--
 debian/control-update | 26 ++++++++++++++++++++++++++
 debian/pkgarchs.sh    | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 102a471..3d73a6b 100644
--- a/debian/control
+++ b/debian/control
@@ -22,7 +22,8 @@ Build-Depends:
  libopus-dev,
  librabbitmq-dev,
  libsofia-sip-ua-dev,
- libsrtp2-dev,
+ libsrtp2-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el],
+ libsrtp0-dev [!amd64 !arm64 !armel !armhf !i386 !mips64el !mipsel !ppc64el],
  libssl-dev,
  libwebsockets-dev (>> 1.3),
  libavutil-dev,
@@ -71,7 +72,7 @@ Depends:
  libglib2.0-dev,
  libjansson-dev,
  libnice-dev,
- libsrtp2-dev,
+ libsrtp2-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el],
  libssl-dev,
 Suggests:
  janus-doc,
diff --git a/debian/control-update b/debian/control-update
new file mode 100755
index 0000000..f34a78d
--- /dev/null
+++ b/debian/control-update
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Copyright © 2017  Jonas Smedegaard <dr at jones.dk>
+# Description: helper script to update copyright_hints
+#
+# This program 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 3, or (at your option)
+# any later version.
+#
+# This program 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 <http://www.gnu.org/licenses/>.
+
+set -eu
+
+SRTP2=$(sh ./debian/pkgarchs.sh libsrtp2-dev)
+SRTP=$(echo "$SRTP2" | perl -pe 's/(\S+)/!$1/g')
+
+perl -pi \
+	-e "s/libsrtp2-dev\K[^,]*,/ [$SRTP2],/;" \
+	-e "s/libsrtp0-dev\K[^,]*,/ [$SRTP],/;" \
+	debian/control
diff --git a/debian/pkgarchs.sh b/debian/pkgarchs.sh
new file mode 100644
index 0000000..c8f4270
--- /dev/null
+++ b/debian/pkgarchs.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# Copyright © 2008, 2013-2014 Jonas Smedegaard <dr at jones.dk>
+# Description: Resolves supported archs of a Debian package
+#
+# This program 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 3, or (at your option)
+# any later version.
+#
+# This program 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+#
+# Depends: devscripts liburi-perl curl ca-certificates
+
+set -e
+
+defaultsuite="unstable"
+currentsuite="`dpkg-parsechangelog | grep ^Distribution: | awk '{print $2}'`"
+
+pkg="$1"
+suite="${2:-$currentsuite}"
+
+case "$suite" in
+    experimental)
+	suite="unstable,experimental"
+	;;
+    UNRELEASED|"")
+	echo >&2 "WARNING: bad suite \"$suite\", using \"$defaultsuite\" instead."
+	suite="$defaultsuite"
+	;;
+    *-*)
+	suite="$(echo "$suite" | sed -e 's/-.*//')"
+	;;
+esac
+
+echo >&2 "INFO: Resolving architectures for package \"$pkg\" through rmadison Internet request."
+dump="$(rmadison -s "$suite" "$pkg")"
+archs="$(echo "$dump" \
+	| awk -F'|' '{ print $4 }' \
+	| sed 's/source,//;s/ //g;s/,/\n/g' \
+	| LANG=C sort -u \
+	| tr '\n' ' ' \
+	| sed 's/^ //;s/ $/\n/;s/\ball\b/any/')"
+echo "${archs:-none}"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list