On Sun, May 10, 2020 at 11:17:01AM +0200, Steinar H. Gunderson wrote:
> Evidently, libsrt-gnutls-dev has the wrong dependencies (depends on
> libsrt1 instead of libsrt1-gnutls). These are the right ones:

Newer version with some fixes attached.

/* Steinar */
-- 
Homepage: https://www.sesse.net/
diff -Nru srt-1.4.0/debian/changelog srt-1.4.0/debian/changelog
--- srt-1.4.0/debian/changelog	2019-09-17 11:38:25.000000000 +0200
+++ srt-1.4.0/debian/changelog	2020-05-09 20:28:05.000000000 +0200
@@ -1,3 +1,11 @@
+srt (1.4.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add a build against GnuTLS, for packages with licenses that are not
+    compatible with OpenSSL. (Closes: #933180)
+
+ -- Steinar H. Gunderson <se...@debian.org>  Sat, 09 May 2020 20:28:05 +0200
+
 srt (1.4.0-1) unstable; urgency=medium
 
   * New upstream release (Closes: #939040)
diff -Nru srt-1.4.0/debian/control srt-1.4.0/debian/control
--- srt-1.4.0/debian/control	2019-09-17 11:38:25.000000000 +0200
+++ srt-1.4.0/debian/control	2020-05-09 20:28:05.000000000 +0200
@@ -21,6 +21,7 @@
 Multi-Arch: same
 Depends: libsrt1 (= ${binary:Version}), ${misc:Depends}
 Suggests: libsrt-doc (= ${binary:Version})
+Conflicts: libsrt-gnutls-dev
 Description: Secure Reliable Transport UDP streaming library
  SRT is a latency-aware UDP transport mechanism optimized for video streams.
  It detects and compensates for jitter and bandwidth fluctuations due to
@@ -28,6 +29,20 @@
  .
  This package contains development files for libsrt1
 
+Package: libsrt-gnutls-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libsrt-gnutls1 (= ${binary:Version}), ${misc:Depends}
+Suggests: libsrt-doc (= ${binary:Version})
+Conflicts: libsrt-dev
+Description: Secure Reliable Transport UDP streaming library
+ SRT is a latency-aware UDP transport mechanism optimized for video streams.
+ It detects and compensates for jitter and bandwidth fluctuations due to
+ network congestion. It mitigates packet loss and supports AES encryption.
+ .
+ This package contains development files for libsrt-gnutls1
+
 Package: libsrt-doc
 Section: doc
 Architecture: all
@@ -48,6 +63,19 @@
  It detects and compensates for jitter and bandwidth fluctuations due to
  network congestion. It mitigates packet loss and supports AES encryption.
 
+Package: libsrt-gnutls1
+Architecture: any
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Secure Reliable Transport UDP streaming library
+ SRT is a latency-aware UDP transport mechanism optimized for video streams.
+ It detects and compensates for jitter and bandwidth fluctuations due to
+ network congestion. It mitigates packet loss and supports AES encryption.
+ .
+ The package contains a version of the shared library that is linked to
+ GnuTLS instead of OpenSSL. This is useful if you intend to use SRT in
+ software that is GPL-compatible but not compatible with the OpenSSL license.
+
 Package: srt-tools
 Architecture: any
 Section: utils
diff -Nru srt-1.4.0/debian/libsrt1.install srt-1.4.0/debian/libsrt1.install
--- srt-1.4.0/debian/libsrt1.install	2019-09-17 11:38:25.000000000 +0200
+++ srt-1.4.0/debian/libsrt1.install	2020-05-09 20:06:32.000000000 +0200
@@ -1 +1 @@
-usr/lib/*/lib*.so.*
+usr/lib/*/libsrt.so.*
diff -Nru srt-1.4.0/debian/libsrt-dev.install srt-1.4.0/debian/libsrt-dev.install
--- srt-1.4.0/debian/libsrt-dev.install	2019-09-17 11:38:25.000000000 +0200
+++ srt-1.4.0/debian/libsrt-dev.install	2020-05-09 20:28:05.000000000 +0200
@@ -1,3 +1,3 @@
 usr/include/*
-usr/lib/*/lib*.so
-usr/lib/*/pkgconfig/*
+usr/lib/*/libsrt.a
+usr/lib/*/libsrt.so
diff -Nru srt-1.4.0/debian/libsrt-gnutls1.install srt-1.4.0/debian/libsrt-gnutls1.install
--- srt-1.4.0/debian/libsrt-gnutls1.install	1970-01-01 01:00:00.000000000 +0100
+++ srt-1.4.0/debian/libsrt-gnutls1.install	2020-05-09 20:06:43.000000000 +0200
@@ -0,0 +1,2 @@
+usr/lib/*/libsrt-gnutls.so.*
+
diff -Nru srt-1.4.0/debian/libsrt-gnutls-dev.install srt-1.4.0/debian/libsrt-gnutls-dev.install
--- srt-1.4.0/debian/libsrt-gnutls-dev.install	1970-01-01 01:00:00.000000000 +0100
+++ srt-1.4.0/debian/libsrt-gnutls-dev.install	2020-05-09 20:28:05.000000000 +0200
@@ -0,0 +1,3 @@
+usr/include/*
+usr/lib/*/libsrt-gnutls.a
+usr/lib/*/libsrt-gnutls.so
diff -Nru srt-1.4.0/debian/rules srt-1.4.0/debian/rules
--- srt-1.4.0/debian/rules	2019-09-17 11:38:25.000000000 +0200
+++ srt-1.4.0/debian/rules	2020-05-09 20:28:05.000000000 +0200
@@ -4,6 +4,14 @@
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+# Standardized flags from /usr/share/perl5/Debian/Debhelper/Buildsystem/cmake.pm.
+CMAKE_OPTS := -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  MAKEFLAGS += -j$(NUMJOBS)
+endif
+
 include /usr/share/dpkg/default.mk  # provides DEB_VERSION
 
 %:
@@ -11,16 +19,32 @@
 
 override_dh_auto_clean:
 	dh_clean
-	rm -rf CMakeFiles/ debian/html
+	rm -rf CMakeFiles/ debian/html build-openssl build-gnutls
+
+override_dh_auto_configure:
+	mkdir -p build-openssl build-gnutls
+	cd build-openssl && cmake .. $(CMAKE_OPTS) -DUSE_ENCLIB=openssl
+	cd build-gnutls && cmake .. $(CMAKE_OPTS) -DUSE_ENCLIB=gnutls -DTARGET_srt=srt-gnutls
 
 override_dh_auto_build:
-	dh_auto_build
+	mkdir -p build-openssl build-gnutls
+	cd build-openssl && $(MAKE)
+	cd build-gnutls && $(MAKE)
 	http_proxy='http://127.0.0.1:9/' python3 -m sphinx -N -c debian -bhtml docs debian/html
 
 override_dh_auto_install:
-	dh_auto_install
+	install -d debian/tmp
+	cd build-openssl && $(MAKE) install DESTDIR=../debian/tmp
+	cd build-gnutls && $(MAKE) install DESTDIR=../debian/tmp   # Does not overwrite anything.
 	test -f debian/tmp/usr/bin/stransmit || cp debian/tmp/usr/bin/srt-live-transmit debian/tmp/usr/bin/stransmit
 
+override_dh_install:
+	dh_install
+	install -d debian/libsrt-dev/usr/lib/$(DEB_BUILD_GNU_TYPE)/pkgconfig/
+	install -m 0644 build-openssl/*.pc debian/libsrt-dev/usr/lib/$(DEB_BUILD_GNU_TYPE)/pkgconfig/
+	install -d debian/libsrt-gnutls-dev/usr/lib/$(DEB_BUILD_GNU_TYPE)/pkgconfig/
+	install -m 0644 build-gnutls/*.pc debian/libsrt-gnutls-dev/usr/lib/$(DEB_BUILD_GNU_TYPE)/pkgconfig/
+
 override_dh_installman-indep:
 
 override_dh_installman-arch:

Reply via email to