[med-svn] [Git][med-team/igraph][master] Debian patch 0.8.5+ds-2
Jérôme Benoit
gitlab at salsa.debian.org
Sun Dec 20 14:48:44 GMT 2020
Jérôme Benoit pushed to branch master at Debian Med / igraph
Commits:
c4bc8292 by Jerome Benoit at 2020-12-20T15:41:11+01:00
Debian patch 0.8.5+ds-2
- - - - -
14 changed files:
- + debian/adhoc/examples/benchmarks/Makefile
- + debian/adhoc/examples/simple/Makefile
- + debian/adhoc/examples/tests/Makefile
- debian/changelog
- debian/control
- debian/libigraph-examples.install
- + debian/libigraph-examples.links
- debian/patches/series
- + debian/patches/upstream-fix-examples_benchmarks_bench_h-missing-include.patch
- + debian/patches/upstream-fix-examples_simple-gcc-warnings.patch
- + debian/patches/upstream-fix-lintian-spelling_error_in_binary.patch
- debian/rules
- + debian/tests/check
- + debian/tests/control
Changes:
=====================================
debian/adhoc/examples/benchmarks/Makefile
=====================================
@@ -0,0 +1,60 @@
+# /usr/share/doc/libigraph-dev/examples/benchmarks/Makefile
+#
+# Ad hoc Makefile for building and playing with the sample sources
+# distributed within the debian package libigraph-examples.
+#
+# Recommended usage:
+# create a dedicated folder somewhere in your HOME directory;
+# link all the files in /usr/share/doc/libigraph-dev/examples/benchmarks
+# in the dedicated folder; launch this Makefile in the dedicated folder:
+# $ make
+# for a basic cleanup, consider the clean target:
+# $ make clean
+# for an entire cleanup, the maintainer-clean target:
+# $ make maintainer-clean
+# for other targets, just read the Makefile.
+#
+# written for Debian by Jerome Benoit <calculus at rezozer.net>
+# on behalf of the Debian Med Packaging Team
+# copyright: 2020 Jerome Benoit <calculus at rezozer.net>
+# distributed under the terms and conditions of GPL version 2 or later
+#
+
+SHELL=/bin/bash
+
+default: all
+
+PROGRAMS = \
+ $(patsubst %.c,%,$(wildcard *.c))
+
+RESULTFILES = \
+ $(addsuffix .res,$(PROGRAMS))
+
+CFLAGS = $(shell pkg-config igraph --cflags)
+LDLIBS = $(shell pkg-config igraph --libs)
+
+CFLAGS += -Wall -g
+
+all: build check
+
+build: $(PROGRAMS)
+
+checkclean:
+ $(RM) $(RESULTFILES)
+
+check-run: $(RESULTFILES)
+
+check: checkclean check-run
+
+clean: checkclean
+ $(RM) $(PROGRAMS)
+
+maintainer-clean: clean
+
+%.res : %
+ @echo "===8><--- $* ---"
+ ( set -o pipefail ; ./$< | tee $@ )
+ @echo "----------><8==="
+ @echo
+
+.NOTPARALLEL:
=====================================
debian/adhoc/examples/simple/Makefile
=====================================
@@ -0,0 +1,91 @@
+# /usr/share/doc/libigraph-dev/examples/simple/Makefile
+#
+# Ad hoc Makefile for building and playing with the sample sources
+# distributed within the debian package libigraph-examples.
+#
+# Recommended usage:
+# create a dedicated folder somewhere in your HOME directory;
+# link all the files in /usr/share/doc/libigraph-dev/examples/simple
+# in the dedicated folder; launch this Makefile in the dedicated folder:
+# $ make
+# for a basic cleanup, consider the clean target:
+# $ make clean
+# for an entire cleanup, the maintainer-clean target:
+# $ make maintainer-clean
+# for other targets, just read the Makefile.
+#
+# written for Debian by Jerome Benoit <calculus at rezozer.net>
+# on behalf of the Debian Med Packaging Team
+# copyright: 2020 Jerome Benoit <calculus at rezozer.net>
+# distributed under the terms and conditions of GPL version 2 or later
+#
+
+SHELL=/bin/bash
+
+default: all
+
+XPROGRAMS = \
+ tls1
+
+XOUTPOUTS = \
+ igraph_power_law_fit.out
+
+PROGRAMS = \
+ $(patsubst %.c,%,$(wildcard *.c))
+
+RESULTFILES = \
+ $(addsuffix .res,$(filter-out $(XPROGRAMS),$(PROGRAMS)))
+
+DIFFFILES = \
+ $(patsubst %.out,%.diff,$(filter-out $(XOUTPOUTS),$(wildcard *.out)))
+
+XDIFFFILES = \
+ $(patsubst %.out,%.xdiff,$(filter $(XOUTPOUTS),$(wildcard *.out)))
+
+CFLAGS = $(shell pkg-config igraph --cflags)
+LDLIBS = $(shell pkg-config igraph --libs) -lm
+
+CFLAGS += -Wall -g
+
+all: build check
+
+build: $(PROGRAMS)
+
+checkclean:
+ $(RM) $(XDIFFFILES) $(DIFFFILES) $(RESULTFILES)
+
+check-run: $(RESULTFILES)
+
+check-res: $(DIFFFILES) $(XDIFFFILES)
+
+check: checkclean check-run check-res
+
+clean: checkclean
+ $(RM) $(PROGRAMS)
+
+maintainer-clean: clean
+
+%.res %.xres : %
+ @echo "===8><--- $* ---"
+ ( set -o pipefail ; ./$< | tee $@ )
+ @echo "----------><8==="
+ @echo
+
+%.diff : %.res %.out
+ @echo "===8><--- $* ---"
+ ( set -o pipefail ; diff -N $^ | tee $@ )
+ @echo "----------><8==="
+ @echo
+
+%.xdiff : %.res %.out
+ @echo "===8><--- $* ---"
+ diff -N $^ | tee $@
+ @echo "----------><8==="
+ @echo
+
+%.out : %
+#### do nothing
+
+.PRECIOUS: %.res %.xres
+
+.NOTPARALLEL:
=====================================
debian/adhoc/examples/tests/Makefile
=====================================
@@ -0,0 +1,78 @@
+# /usr/share/doc/libigraph-dev/examples/tests/Makefile
+#
+# Ad hoc Makefile for building and playing with the sample sources
+# distributed within the debian package libigraph-examples.
+#
+# Recommended usage:
+# create a dedicated folder somewhere in your HOME directory;
+# link all the files in /usr/share/doc/libigraph-dev/examples/tests
+# in the dedicated folder; launch this Makefile in the dedicated folder:
+# $ make
+# for a basic cleanup, consider the clean target:
+# $ make clean
+# for an entire cleanup, the maintainer-clean target:
+# $ make maintainer-clean
+# for other targets, just read the Makefile.
+#
+# written for Debian by Jerome Benoit <calculus at rezozer.net>
+# on behalf of the Debian Med Packaging Team
+# copyright: 2020 Jerome Benoit <calculus at rezozer.net>
+# distributed under the terms and conditions of GPL version 2 or later
+#
+
+SHELL=/bin/bash
+
+default: all
+
+PROGRAMS = \
+ $(patsubst %.c,%,$(wildcard *.c))
+
+RESULTFILES = \
+ $(addsuffix .res,$(PROGRAMS))
+
+DIFFFILES = \
+ $(patsubst %.out,%.diff,$(wildcard *.out))
+
+CFLAGS = $(shell pkg-config igraph --cflags)
+LDLIBS = $(shell pkg-config igraph --libs)
+
+CFLAGS += -Wall -g
+
+all: build check
+
+build: $(PROGRAMS)
+
+checkclean:
+ $(RM) $(DIFFFILES) $(RESULTFILES)
+
+check-run: $(RESULTFILES)
+
+check-res: $(DIFFFILES)
+
+check: checkclean check-run check-res
+
+clean: checkclean
+ $(RM) $(PROGRAMS)
+
+maintainer-clean: clean
+
+%.res : %
+ @echo "===8><--- $* ---"
+ ( set -o pipefail ; ./$< | tee $@ )
+ @echo "----------><8==="
+ @echo
+
+%.diff : %.res %.out
+ @echo "===8><--- $* ---"
+ ( set -o pipefail ; diff -N $^ | tee $@ )
+ @echo "----------><8==="
+ @echo
+
+%.out : %
+#### do nothing
+
+.PRECIOUS: %.res
+
+.DELETE_ON_ERROR:
+
+.NOTPARALLEL:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,22 @@
+igraph (0.8.5+ds-2) unstable; urgency=medium
+
+ * Add myself to Uploaders.
+ * d/tests based on examples material, introduce.
+ * d/adhoc/examples/{tests,simple,benchmarks}/Makefile, introduce
+ (ease d/tests).
+ * d/patches/*:
+ - d/p/upstream-fix-examples*.patch, introduce (ease d/tests);
+ - d/p/upstream-fix-lintian-spelling_error_in_binary.patch, introduce..
+ * d/rules:
+ - override_dh_installchangelogs target: CHANGELOG.md as changelog;
+ - override_dh_compress-indep target: examples material is now
+ uncompressed (ease d/tests);
+ - override_dh_install-indep target, machinery to permit tests over
+ examples material (ease d/tests).
+ * Add Multi-Arch fields.
+
+ -- Jerome Benoit <calculus at rezozer.net> Sun, 20 Dec 2020 14:40:34 +0000
+
igraph (0.8.5+ds-1) unstable; urgency=medium
* Non-maintainer upload.
=====================================
debian/control
=====================================
@@ -1,6 +1,7 @@
Source: igraph
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
+Uploaders: Jerome Benoit <calculus at rezozer.net>,
+ Andreas Tille <tille at debian.org>
Section: science
Priority: optional
Build-Depends: debhelper-compat (= 13),
@@ -32,6 +33,7 @@ Depends: ${shlibs:Depends},
Pre-Depends: ${misc:Pre-Depends}
Conflicts: libigraph0, libigraph0v5
Replaces: libigraph0, libigraph0v5
+Multi-Arch: same
Description: library for creating and manipulating graphs
igraph is a library for creating and manipulating graphs.
It is intended to be as powerful (ie. fast) as possible to enable the
@@ -43,7 +45,9 @@ Package: libigraph-dev
Architecture: any
Section: libdevel
Depends: libigraph1 (= ${binary:Version}),
+ ${devlibs:Depends},
${misc:Depends}
+Multi-Arch: same
Description: library for creating and manipulating graphs - development files
igraph is a library for creating and manipulating graphs.
It is intended to be as powerful (ie. fast) as possible to enable the
@@ -55,6 +59,7 @@ Package: libigraph-examples
Architecture: all
Section: doc
Depends: ${misc:Depends}
+Multi-Arch: foreign
Description: library for creating and manipulating graphs - example files
igraph is a library for creating and manipulating graphs.
It is intended to be as powerful (ie. fast) as possible to enable the
=====================================
debian/libigraph-examples.install
=====================================
@@ -1 +1,2 @@
examples usr/share/doc/libigraph-dev
+debian/adhoc/examples usr/share/doc/libigraph-dev
=====================================
debian/libigraph-examples.links
=====================================
@@ -0,0 +1 @@
+usr/share/doc/libigraph-dev/examples/tests/test_utilities.inc usr/share/doc/libigraph-dev/examples/simple/test_utilities.inc
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,6 @@
+upstream-fix-examples_benchmarks_bench_h-missing-include.patch
+upstream-fix-examples_simple-gcc-warnings.patch
+upstream-fix-lintian-spelling_error_in_binary.patch
skip_tests_accessing_remote.patch
soversion.patch
enable_removing_third_party_code.patch
=====================================
debian/patches/upstream-fix-examples_benchmarks_bench_h-missing-include.patch
=====================================
@@ -0,0 +1,19 @@
+Description: add missing header in `examples/benchnmakrs/bench.h'
+ Include sys/resource.h in `e/b/bench.h'; meant to be submitted to the
+ upstream maintainer.
+Origin: debian
+Forwarded: https://github.com/igraph/igraph/pull/1581
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2020-12-20
+
+--- a/examples/benchmarks/bench.h
++++ b/examples/benchmarks/bench.h
+@@ -24,6 +24,8 @@
+ #ifndef IGRAPH_BENCH_H
+ #define IGRAPH_BENCH_H
+
++#include <sys/resource.h>
++
+ static inline void igraph_get_cpu_time(igraph_real_t *data) {
+
+ struct rusage self, children;
=====================================
debian/patches/upstream-fix-examples_simple-gcc-warnings.patch
=====================================
@@ -0,0 +1,27 @@
+Description: examples/simple: silence gcc Warnings
+ Silence gcc Warnings to ease tests ; meant to be submitted to
+ the upstream maintainer.
+Origin: debian
+Forwarded: https://github.com/igraph/igraph/pull/1580
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2020-12-20
+
+--- a/examples/simple/igraph_community_leiden.c
++++ b/examples/simple/igraph_community_leiden.c
+@@ -28,7 +28,6 @@
+ igraph_vector_t membership, degree;
+ igraph_integer_t nb_clusters;
+ igraph_real_t quality;
+- long int i;
+
+ /* Set default seed to get reproducible results */
+ igraph_rng_seed(igraph_rng_default(), 0);
+@@ -51,7 +50,7 @@
+ /* Start from existing membership to improve it further */
+ igraph_community_leiden(&graph, NULL, NULL, 0.05, 0.01, 1, &membership, &nb_clusters, &quality);
+
+- printf("Iterated Leiden, using CPM (resolution parameter 0.05), quality is %.4f.\n", nb_clusters, quality);
++ printf("Iterated Leiden, using CPM (resolution parameter 0.05), quality is %.4f.\n", quality);
+ printf("Membership: ");
+ igraph_vector_print(&membership);
+ printf("\n");
=====================================
debian/patches/upstream-fix-lintian-spelling_error_in_binary.patch
=====================================
@@ -0,0 +1,21 @@
+Description: source typo
+ Correct spelling errors as reported by lintian in some binaries;
+ meant to silence lintian and eventually to be submitted to the
+ upstream maintainer.
+Origin: debian
+Forwarded: https://github.com/igraph/igraph/pull/1579
+Comment: spelling-error-in-binary
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2020-12-20
+
+--- a/src/lsap.c
++++ b/src/lsap.c
+@@ -109,7 +109,7 @@
+ ++ok;
+ }
+ if (ok != 1)
+- IGRAPH_ERROR("ap_hungarian: error in assigment, is not a permutation",
++ IGRAPH_ERROR("ap_hungarian: error in assignment, is not a permutation",
+ IGRAPH_EINVAL);
+ }
+
=====================================
debian/rules
=====================================
@@ -1,4 +1,5 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/pkg-info.mk
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
@@ -20,8 +21,8 @@ CONF_FLAGS=\
override_dh_auto_configure:
dh_auto_configure -- $(CONF_FLAGS)
-override_dh_install:
- dh_install
+override_dh_install-arch:
+ dh_install -a
d-shlibmove --commit \
--multiarch \
--devunversioned \
@@ -31,10 +32,36 @@ override_dh_install:
debian/tmp/usr/lib/*/*.so
find debian -name "*.la" -delete
+UPS_VERSION := $(firstword $(subst +, ,$(DEB_VERSION)))
+UPS_LISTOF_EXAMPLE__FULLNAME := $(wildcard examples/simple/*.c)
+UPS_LISTOF_TEST__FULLNAME := $(wildcard tests/*.at)
+UPS_LISTOF_PRIVATE_EXAMPLE := $(notdir $(shell grep -l -e igraph_marked_queue.h -e _internal.h $(UPS_LISTOF_EXAMPLE__FULLNAME)))
+UPS_LISTOF_WITH3RDPARTY_EXAMPLE := $(notdir $(shell grep -l -e '<cs/cs.h>' $(UPS_LISTOF_EXAMPLE__FULLNAME)))
+UPS_LISTOF_COMMENTED_EXAMPLE := $(shell sed -n 's|\#AT_COMPILE_CHECK(\[simple/\(.*\)\],\(.*\))|\1|p' $(UPS_LISTOF_TEST__FULLNAME))
+DEB_LISTOF_XEXAMPLE := $(sort $(UPS_LISTOF_PRIVATE_EXAMPLE) $(UPS_LISTOF_WITH3RDPARTY_EXAMPLE) $(UPS_LISTOF_COMMENTED_EXAMPLE))
+DEB_DH_INSTALL_INDEP_XLIST := $(patsubst %.c,%.,$(DEB_LISTOF_XEXAMPLE))
+DEB_DH_INSTALL_INDEP_EXAMPLESDIR := $(CURDIR)/debian/libigraph-examples/usr/share/doc/libigraph-dev/examples
+override_dh_install-indep:
+ dh_install -i $(addprefix -X,$(DEB_DH_INSTALL_INDEP_XLIST))
+ find $(DEB_DH_INSTALL_INDEP_EXAMPLESDIR)/simple -name '*.c' -exec sed -i 's|../tests/test_utilities.inc|test_utilities.inc|' \{\} \;
+ find $(DEB_DH_INSTALL_INDEP_EXAMPLESDIR)/simple -name '*.out' -exec sed -i 's|@VERSION@|$(UPS_VERSION)|' \{\} \;
+
+override_dh_installchangelogs:
+ dh_installchangelogs --keep CHANGELOG.md
+
override_dh_link:
dh_link
jdupes -rl debian/libigraph-examples
+override_dh_compress-indep:
+ dh_compress -X/examples/
+
override_dh_fixperms:
dh_fixperms
find debian \( -name "*.xml" -o -name "*.c" \) -exec chmod -x \{\} \;
+
+get-info:
+ @echo "UPS_VERSION: >$(UPS_VERSION)<"
+ @echo "UPS_LISTOF_PRIVATE_EXAMPLE: >$(UPS_LISTOF_PRIVATE_EXAMPLE)<"
+ @echo "UPS_LISTOF_WITH3RDPARTY_EXAMPLE: >$(UPS_LISTOF_WITH3RDPARTY_EXAMPLE)<"
+ @echo "UPS_LISTOF_COMMENTED_EXAMPLE: >$(UPS_LISTOF_COMMENTED_EXAMPLE)<"
=====================================
debian/tests/check
=====================================
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -ue
+testsuitename="${1:-tests}"
+
+examplesdir=/usr/share/doc/libigraph-dev/examples
+testfolder=$examplesdir/$testsuitename
+
+test -d $testfolder
+
+cp -prL $testfolder $AUTOPKGTEST_TMP
+
+cd $AUTOPKGTEST_TMP/$testsuitename
+
+make -k check
+
+exit 0
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,8 @@
+Test-Command: debian/tests/check tests
+Depends: libigraph-dev, libigraph-examples, build-essential, pkg-config
+
+Test-Command: debian/tests/check simple
+Depends: libigraph-dev, libigraph-examples, build-essential, pkg-config
+
+Test-Command: debian/tests/check benchmarks
+Depends: libigraph-dev, libigraph-examples, build-essential, pkg-config
View it on GitLab: https://salsa.debian.org/med-team/igraph/-/commit/c4bc82923f601f0eb98166e3bf0c5dc32db6521b
--
View it on GitLab: https://salsa.debian.org/med-team/igraph/-/commit/c4bc82923f601f0eb98166e3bf0c5dc32db6521b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201220/72a04658/attachment-0001.html>
More information about the debian-med-commit
mailing list