[gap-float] 02/02: first Debian packaging

Jerome Benoit calculus-guest at moszumanska.debian.org
Tue Aug 19 19:23:00 UTC 2014


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

calculus-guest pushed a commit to branch master
in repository gap-float.

commit 77cf8758eb58f8829186cbff51c0f9432d2eaa47
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Tue Aug 19 21:19:28 2014 +0200

    first Debian packaging
---
 debian/README.Debian                               |  10 ++
 debian/changelog                                   |  30 ++++
 debian/compat                                      |   1 +
 debian/control                                     |  28 +++
 debian/copyright                                   |  39 ++++
 debian/float.map                                   |  24 +++
 debian/gap-float.dir                               |   5 +
 debian/gap-float.install                           |   2 +
 debian/patches/debianization.patch                 |  38 ++++
 debian/patches/series                              |   4 +
 .../patches/upstream-autotoolization-cleanup.patch |  96 ++++++++++
 debian/patches/upstream-autotoolization-doc.patch  |  59 ++++++
 .../upstream-update-m4_ac_find_gap_m4.patch        | 197 +++++++++++++++++++++
 debian/repack                                      | 140 +++++++++++++++
 debian/rules                                       |  35 ++++
 debian/source/format                               |   1 +
 debian/source/include-binaries                     |   1 +
 debian/source/options                              |   2 +
 debian/upstream/signing-key.pgp                    | Bin 0 -> 1198 bytes
 debian/watch                                       |   4 +
 20 files changed, 716 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..d3ac877
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,10 @@
+Float GAP package for Debian GNU/Linux
+========================================
+
+For now, the Float GAP package for Debian GNU/Linux is limited to MPFR
+and ist friends; namely, it is built only against MPFR, MPC, and MPFI
+but neither FPLLL nor CXCS:
+ * linking against FPLLL passes, but dlopen emits an undefined symbol error;
+ * CXCS is not (yet) supported by Debian.
+
+ -- Jerome Benoit <calculus at rezozer.net>  Tue, 19 Aug 2014 18:50:20 +0000
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..5923d6d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,30 @@
+gap-float (0.6.0+ds-1) unstable; urgency=low
+
+  * Initial release (Closes: #734316):
+    thanks to the upstream maintainer for reorganizing the source tarball
+    wrt to autotools customs, for providing a gpg signature, and other
+    minor enhancements that have facilitated the packaging.
+  * Debianization:
+    - debian/copyright in DEP-5 format;
+    - debian/control:
+      - debhelper build-dep to >= 9;
+      - Standards Version 3.9.5;
+      - Vcs-* headers.
+    - debian/source, format 3.0 (quilt);
+    - debian/patches/ patches in DEP-3 format;
+    - debian/watch, effective set up with upstream signature verification;
+    - debian/repack, repack script to clean up and gain weight;
+    - debian/rules:
+      - autoreconf-iguration;
+      - full and minal dh integration;
+      - get-orig-source uscan based target which downloads the currently
+        packaged upstream tarball and repacks it;
+      - default target which basically queries package status with uscan
+        -- output in DEHS format;
+    - debian/gap-float.install, install float.so module within debian
+      architecture hierarchy wrt GAP 4r7p5-1 new policy;
+  * Fixes, enhancements, request for a better autotools machinery support
+    (more rational, passing the `make distcheck' test) and bug reports has
+    been submitted to the upstream maintainer.
+
+ -- Jerome Benoit <calculus at rezozer.net>  Tue, 19 Aug 2014 18:54:25 +0000
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..4770146
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,28 @@
+Source: gap-float
+Section: math
+Priority: optional
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Jerome Benoit <calculus at rezozer.net>
+Build-Depends:
+ debhelper (>= 9), autotools-dev, libtool, dh-autoreconf, autoconf-archive,
+ gap (>=4r7p5), gap-dev (>=4r7p5), gap-gapdoc,
+ libgmp-dev, libmpfr-dev, libmpc-dev, libmpfi-dev,
+# libfplll-dev,
+# libcxsc-dev,
+ texlive-latex-recommended, texlive-fonts-recommended, texlive-latex-extra
+Standards-Version: 3.9.5
+Homepage: http://www.gap-system.org/Packages/float.html
+Vcs-Git: git://anonscm.debian.org/debian-science/packages/gap-float.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/gap-float.git
+
+Package: gap-float
+Provides: gap-pkg-float
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, gap (>=4r7p5)
+Description: multi-precision floating-point computation for GAP
+ GAP is a system for computational discrete algebra with particular
+ emphasis on computational group theory, but which has already proved
+ useful also in other areas.
+ .
+ This GAP package brings to GAP floating-point numbers with arbitrary
+ precision; it is based on MPFR, MPFI, MPC, CXSC, and FPLLL.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..062a339
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,39 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
+Upstream-Name: float package for GAP
+Upstream-Contact: Laurent Bartholdi <laurent.bartholdi at gmail.com>
+Source: http://www.gap-system.org/Packages/float.html
+X-Source: https://github.com/laurentbartholdi/float
+X-Source-Downloaded-From: http://www.uni-math.gwdg.de/laurent/archive/
+##X-Source-Downloaded-From: https://github.com/laurentbartholdi/float/releases
+X-Upstream-Vcs: git clone https://github.com/laurentbartholdi/float.git
+X-Upstream-Bugs: https://github.com/laurentbartholdi/float/issues
+Comment:
+ The upstream source tarball is repacked to drop off the regenarated
+ material, mainly the documentation, to gain substantial weight.
+
+Files: *
+Copyright:
+ 2007-2014 Laurent Bartholdi <laurent.bartholdi at gmail.com>
+License: GPL-3+
+
+Files: debian/*
+Copyright:
+ 2014 Jerome Benoit <calculus at rezozer.net>
+License: GPL-3+
+
+License: GPL-3+
+ 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 3 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 package. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/float.map b/debian/float.map
new file mode 100644
index 0000000..7902388
--- /dev/null
+++ b/debian/float.map
@@ -0,0 +1,24 @@
+GAP_PKG_FLOAT {
+	global:
+		FLOAT_INFINITY_STRING;
+		FLOAT_NINFINITY_STRING;
+		FLOAT_EMPTYSET_STRING;
+		FLOAT_REAL_STRING;
+		FLOAT_I_STRING;
+		MPZ_LONGINT;
+		mpz_MPZ;
+		INT_mpz;
+		NEW_MPFR;
+		GET_MPFR;
+		PRINT_MPFR;
+		InitMPFRKernel;
+		InitMPFRLibrary;
+		InitMPFIKernel;
+		InitMPFILibrary;
+		InitMPCKernel;
+		InitMPCLibrary;
+		InitFPLLLKernel;
+		InitFPLLLLibrary;
+		Init__Dynamic;
+	local: *;
+};
diff --git a/debian/gap-float.dir b/debian/gap-float.dir
new file mode 100644
index 0000000..a6e47e9
--- /dev/null
+++ b/debian/gap-float.dir
@@ -0,0 +1,5 @@
+usr/share/gap/pkg/float
+usr/share/gap/pkg/float/gap
+usr/share/gap/pkg/float/tst
+usr/share/gap/pkg/float/doc
+usr/share/gap/pkg/float/example
diff --git a/debian/gap-float.install b/debian/gap-float.install
new file mode 100644
index 0000000..afe8cdf
--- /dev/null
+++ b/debian/gap-float.install
@@ -0,0 +1,2 @@
+usr/lib/*/gap/pkg/float/bin/float.so
+usr/share/gap/pkg/float/* usr/share/gap/pkg/float
diff --git a/debian/patches/debianization.patch b/debian/patches/debianization.patch
new file mode 100644
index 0000000..e1bcdaa
--- /dev/null
+++ b/debian/patches/debianization.patch
@@ -0,0 +1,38 @@
+Description: debianization
+ Meant to maintain a minimal debian/rules, to fix warnings,
+ to address Debian specific stuff in general.
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-08-17
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,7 +14,8 @@
+ 	dist-bzip2 \
+ 	std-options
+ 
+-#AM_DISTCHECK_CONFIGURE_FLAGS =
++AM_DISTCHECK_CONFIGURE_FLAGS ?= \
++	--with-cxsc=no
+ 
+ SUBDIRS = src lib tst doc
+ 
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -6,14 +6,14 @@
+ ##
+ #############################################################################
+ 
+-libdir = $(GAPROOT)/pkg/$(PACKAGE)/bin/$(GAPARCH)
++gaplibdir = $(libdir)/gap/pkg/$(PACKAGE)/bin
+ 
+-lib_LTLIBRARIES = float.la
++gaplib_LTLIBRARIES = float.la
+ 
+ float_la_SOURCES = floatconfig.h floattypes.h float.c
+ float_la_CPPFLAGS = $(GAP_CPPFLAGS)
+ float_la_CFLAGS =
+-float_la_LDFLAGS = -avoid-version -module
++float_la_LDFLAGS = -avoid-version -module -Wl,--version-script,$(top_srcdir)/debian/float.map
+ float_la_LIBADD =
+ if WITH_MPFR_IS_YES
+ float_la_SOURCES += mpfr.c
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1237ddb
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+upstream-autotoolization-cleanup.patch
+upstream-update-m4_ac_find_gap_m4.patch
+upstream-autotoolization-doc.patch
+debianization.patch
diff --git a/debian/patches/upstream-autotoolization-cleanup.patch b/debian/patches/upstream-autotoolization-cleanup.patch
new file mode 100644
index 0000000..6505a6e
--- /dev/null
+++ b/debian/patches/upstream-autotoolization-cleanup.patch
@@ -0,0 +1,96 @@
+Description: cleanup autotools machinery
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-08-19
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,7 +8,7 @@
+ 
+ AC_PREREQ(2.65)
+ LT_PREREQ([2.4.2])
+-AC_INIT([float],[0.5.18],[laurent.bartholdi at gmail.com])
++AC_INIT([float],[0.6.0],[laurent.bartholdi at gmail.com])
+ AC_CONFIG_SRCDIR([src/float.c])
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+@@ -54,7 +54,7 @@
+ ################################################################
+ # generate files
+ 
+-mkdir -p bin/$GAPARCH
++##mkdir -p bin/$GAPARCH
+ ##mkdir -p extern
+ ##CONFIG_STATUS=bin/$GAPARCH/config.status
+ ##
+@@ -67,6 +67,8 @@
+ AC_CONFIG_FILES([
+ 	Makefile
+ 	src/Makefile
++	lib/Makefile
++	tst/Makefile
+ 	doc/Makefile
+ 	])
+ AC_OUTPUT
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -16,49 +16,20 @@
+ 
+ #AM_DISTCHECK_CONFIGURE_FLAGS =
+ 
+-SUBDIRS = src doc
++SUBDIRS = src lib tst doc
+ 
+-EXTRA_DIST =
++pkgdatadir = @datadir@/gap/pkg/@PACKAGE@
+ 
+-export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+-
+-VERSION:=$(shell grep '^Version :=' PackageInfo.g | cut -f2 -d'"')
++pkgdata_DATA = \
++	PackageInfo.g \
++	init.g \
++	read.g
+ 
+-LOCALBIN=bin/@GAPARCH@
++EXTRA_DIST = \
++	$(pkgdata_DATA)
+ 
+-Changelog:
+-	gitlog-to-changelog > $@
++export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+ 
+-tarball: Changelog doc
+-	mkdir float-$(VERSION)
+-	COPYFILE_DISABLE=true tar -c -f - --exclude float-$(VERSION) --exclude 'float-*gz*' --exclude '*~' --exclude '.[a-z]*' --exclude '*.l[ao]' --exclude 'stamp-*' --exclude config.log --exclude Makefile --exclude autom4te.cache --exclude bin --exclude extern . | (cd float-$(VERSION); tar xf -)
+-	COPYFILE_DISABLE=true tar -c -z -f float-$(VERSION).tar.gz float-$(VERSION)
+-	rm -rf float-$(VERSION)
+-	gpg --default-key 184873BE --armor --detach-sign --yes float-$(VERSION).tar.gz
+-	scp float-$(VERSION).tar.gz* rlaurent.uni-math.gwdg.de:public_html/archive/
+-
+-doc: doc/chap0.html
+-
+-doc/chap0.html: doc/float.xml doc/floatbib.xml lib/float.gd
+-	echo 'LoadPackage("float"); DOC at FLOAT();' | @GAP_EXEC@ -r -q -T -l ";$(PWDUU)"
+-
+-checkblocks:
+-	grep '<#GAPDoc' PackageInfo.g lib/*d | awk -F'"' '{print $$2}' | sort > @@-blocks
+-	grep '<#Include' doc/float.xml | awk -F'"' '{print $$2}' | sort > @@-in
+-	comm -3 @@-blocks @@-in
+-	@rm @@-blocks @@-in
+-
+-wwwdir: doc
+-	git tag -f $(VERSION)
+-	git push origin :refs/tags/$(VERSION)
+-	git push --tags
+-	cp PackageInfo.g doc/
+-	cp README doc/README.float
+-	(cd doc; git add *.html manual.pdf manual.css PackageInfo.g README.float; git commit -m 'New html files'; git push github master:gh-pages --force)
+-	rm doc/PackageInfo.g doc/README.float
+-
+-all: all-recursive
+-	mkdir -p bin/@GAPARCH@
+-	cp src/.libs/float.so bin/@GAPARCH@/
++VERSION:=$(shell grep '^Version :=' PackageInfo.g | cut -f2 -d'"')
+ 
+ #E Makefile.am . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
diff --git a/debian/patches/upstream-autotoolization-doc.patch b/debian/patches/upstream-autotoolization-doc.patch
new file mode 100644
index 0000000..f3254ab
--- /dev/null
+++ b/debian/patches/upstream-autotoolization-doc.patch
@@ -0,0 +1,59 @@
+Description: documentation autotools machinery enhancement
+ Oververride of the upstream documentation autotools machinery
+ that avoids the load of the involved GAP package.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-08-19
+
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -6,23 +6,28 @@
+ ##
+ #############################################################################
+ 
+-docdir = $(GAPROOT)/pkg/$(PACKAGE)/doc
++docdir = @datadir@/gap/pkg/@PACKAGE@/doc
+ 
+-all-local: doc
++doc_DATA = \
++	chapInd.txt chap0.txt chap1.txt chap2.txt chap3.txt chap4.txt \
++	chapInd.html chap0.html chap1.html chap2.html chap3.html chap4.html \
++	chooser.html \
++	manual.css manual.js \
++	manual.six \
++	manual.pdf \
++	manual.lab
+ 
+-doc: manual.six
++$(doc_DATA): float.xml floatbib.xml
++	cd $(top_srcdir) && cat makedoc.g | $(CGAP) -A -q -T
+ 
+-manual.six: float.xml floatbib.xml
+-	cd $(top_srcdir) && echo 'LoadPackage("float"); DOC at FLOAT();' | $(CGAP) -A -q -T
++clean-local:
++	rm -f float.tex
++	rm -f float.aux float.idx float.bbl float.ind float.out float.toc float.pnr
++	rm -f float.log float.blg float.ilg
+ 
+ distclean-local:
+-	rm -f chap*.txt chap*.html index.html chooser.html
+ 	rm -f lefttoc.css ragged.css times.css toggless.css nocolorprompt.css
+ 	rm -f rainbow.js toggless.js
+-	rm -f manual.six manual.css manual.js manual.lab
+-	rm -f manual.pdf
+-	rm -f float.tex
+-	rm -f float.aux float.idx float.bbl float.ind float.out float.toc float.pnr
+-	rm -f float.log float.blg float.ilg
++	rm -f $(doc_DATA)
+ 
+ #E doc/Makefile.am . . . . . . . . . . . . . . . . . . . . . . . . . ends here
+--- /dev/null
++++ b/makedoc.g
+@@ -0,0 +1,7 @@
++SetPackagePath("float",".");
++LoadPackage("GAPDoc");
++##LoadPackage("float");
++MakeGAPDocDoc("./doc","float",["../lib/float.gd","../PackageInfo.g"],"float");;
++CopyHTMLStyleFiles("doc");
++GAPDocManualLab("Float");
++QUIT;
diff --git a/debian/patches/upstream-update-m4_ac_find_gap_m4.patch b/debian/patches/upstream-update-m4_ac_find_gap_m4.patch
new file mode 100644
index 0000000..f4c30d6
--- /dev/null
+++ b/debian/patches/upstream-update-m4_ac_find_gap_m4.patch
@@ -0,0 +1,197 @@
+Description: update AC_FIND_GAP m4 macro
+ Import m4/ac_find_gap.m4 from the gap-io GitHub git repository
+ and add material to find the GAP command-line interface wrt
+ the adopted style and customary naminf scheme.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-08-19
+
+--- a/m4/ac_find_gap.m4
++++ b/m4/ac_find_gap.m4
+@@ -6,7 +6,7 @@
+ AC_DEFUN([AC_FIND_GAP],
+ [
+   AC_LANG_PUSH([C])
+-  
++
+   # Make sure CDPATH is portably set to a sensible value
+   CDPATH=${ZSH_VERSION+.}:
+ 
+@@ -19,31 +19,27 @@
+     variable empty for GAP versions < 4.5.])
+   if test "x$CONFIGNAME" = "x"; then
+     SYSINFO="sysinfo.gap"
+-    GAP_MAKEFILE="Makefile"
+-    GAP_EXEC="gap.sh"
+     AC_MSG_RESULT([none])
+   else
+     SYSINFO="sysinfo.gap-$CONFIGNAME"
+-    GAP_MAKEFILE="Makefile-$CONFIGNAME"
+-    GAP_EXEC="gap-$CONFIGNAME.sh"
+     AC_MSG_RESULT([$CONFIGNAME])
+   fi
+ 
+   ######################################
+-  # Find the GAP root directory by 
+-  # checking for the sysinfo.gap file 
++  # Find the GAP root directory by
++  # checking for the sysinfo.gap file
+   AC_MSG_CHECKING([for GAP root directory])
+-  DEFAULT_GAPROOTS="../.. /usr/local/src/gap /usr/local/gap4r5"
+-  
++  DEFAULT_GAPROOTS="../.."
++
+   #Allow the user to specify the location of GAP
+   #
+-  AC_ARG_WITH(gaproot, 
++  AC_ARG_WITH(gaproot,
+     [AC_HELP_STRING([--with-gaproot=<path>], [specify root of GAP installation])],
+     [DEFAULT_GAPROOTS="$withval"])
+-  
++
+   havesysinfo=0
+   # Otherwise try likely directories
+-  for GAPROOT in ${DEFAULT_GAPROOTS} 
++  for GAPROOT in ${DEFAULT_GAPROOTS}
+   do
+     # Convert the path to absolute
+     GAPROOT=`cd $GAPROOT > /dev/null 2>&1 && pwd`
+@@ -52,12 +48,12 @@
+       break
+     fi
+   done
+-    
++
+   if test "x$havesysinfo" = "x1"; then
+     AC_MSG_RESULT([${GAPROOT}])
+   else
+     AC_MSG_RESULT([Not found])
+-    
++
+     echo ""
+     echo "********************************************************************"
+     echo "  ERROR"
+@@ -70,13 +66,13 @@
+     echo "  src/ and bin/."
+     echo "********************************************************************"
+     echo ""
+-    
++
+     AC_MSG_ERROR([Unable to find GAP root directory])
+   fi
+-        
++
+   #####################################
+   # Now find the architecture
+-        
++
+   AC_MSG_CHECKING([for GAP architecture])
+   GAPARCH="Unknown"
+   . $GAPROOT/$SYSINFO
+@@ -84,11 +80,11 @@
+     GAPARCH=$GAParch
+   fi
+ 
+-  AC_ARG_WITH(gaparch, 
++  AC_ARG_WITH(gaparch,
+     [AC_HELP_STRING([--with-gaparch=<path>], [override GAP architecture string])],
+     [GAPARCH=$withval])
+   AC_MSG_RESULT([${GAPARCH}])
+- 
++
+   if test "x$GAPARCH" = "xUnknown" -o ! -d $GAPROOT/bin/$GAPARCH ; then
+     echo ""
+     echo "********************************************************************"
+@@ -102,17 +98,11 @@
+     echo "  GAP installation."
+     echo "********************************************************************"
+     echo ""
+-    
+-    AC_MSG_ERROR([Unable to find plausible GAParch information.])
+-  fi  
+ 
+-  GAPARCH_SYSTEM_GUESS="`$ac_aux_dir/config.guess`-$CC-`echo $GAPARCH | sed 's/.*-//'`"
+-  if test "$GAPARCH_SYSTEM_GUESS" != "$GAParch_system"; then
+-    echo "********************************************************************"
+-    AC_WARN([The guessed target $GAPARCH_SYSTEM_GUESS is not the gap target $GAParch_system. Cross your fingers])
+-    echo "********************************************************************"
++    AC_MSG_ERROR([Unable to find plausible GAParch information.])
+   fi
+ 
++
+   #####################################
+   # Now check for the GAP header files
+ 
+@@ -145,7 +135,7 @@
+     echo "  in particular the files"
+     echo "      <gaproot>/sysinfo.gap"
+     echo "      <gaproot>/src/<includes>"
+-    echo "  and <gaproot>/bin/<architecture>/bin/config.h." 
++    echo "  and <gaproot>/bin/<architecture>/bin/config.h."
+     echo "  Please make sure that your GAP root directory structure"
+     echo "  conforms to this layout, or give the correct GAP root using"
+     echo "  --with-gaproot=<path>"
+@@ -153,31 +143,39 @@
+     echo ""
+     AC_MSG_ERROR([Unable to find GAP include files in /src subdirectory])
+   fi
+-  
++
+   ARCHPATH=$GAPROOT/bin/$GAPARCH
+   GAP_CPPFLAGS="-I$GAPROOT -I$ARCHPATH"
+ 
+   AC_MSG_CHECKING([for GAP's gmp.h location])
+   if test -r "$ARCHPATH/extern/gmp/include/gmp.h"; then
+     GAP_CPPFLAGS="$GAP_CPPFLAGS -I$ARCHPATH/extern/gmp/include"
+-    GMP_ROOT="$ARCHPATH/extern/gmp"
+     AC_MSG_RESULT([$ARCHPATH/extern/gmp/include/gmp.h])
+-  elif `grep -q 'define USE_GMP 1' $ARCHPATH/config.h`; then
+-    eval `grep '^GMP_CFLAGS=' $GAPROOT/$GAP_MAKEFILE`
+-    GAP_CPPFLAGS="$GAP_CPPFLAGS $GMP_CFLAGS"
+-    GMP_ROOT=`echo "$GMP_CFLAGS" | cut -c3- | sed 's,/include$,,'`
+-    AC_MSG_RESULT([$GMP_ROOT/include/gmp.h])
+   else
+     AC_MSG_RESULT([not found, GAP was compiled without GMP])
+-  fi
++  fi;
+ 
+-  GMP_WITH="--with-gmp=$GMP_ROOT"
+-  GAP_EXEC="$GAPROOT/bin/$GAP_EXEC"
+   AC_SUBST(GAPARCH)
+   AC_SUBST(GAPROOT)
+   AC_SUBST(GAP_CPPFLAGS)
+-  AC_SUBST(GAP_EXEC) 
+-  AC_SUBST(GMP_ROOT)
+-  AC_SUBST(GMP_WITH)
++
+   AC_LANG_POP([C])
++
++  ###############################################
++  # Now check for the GAP command-line interface
++
++	CGAPPATH=$PATH
++	AC_PATH_PROG([CGAP],[gap$SHEXT],Unknown,[$CGAPPATH])
++	if test "x$CGAP" = "xUnknown" ; then
++    echo ""
++    echo "********************************************************************"
++    echo "  ERROR"
++    echo ""
++    echo "  Failed to find the GAP command-line interface in the list of"
++    echo "  paths $CGAPPATH"
++    echo "********************************************************************"
++    echo ""
++    AC_MSG_ERROR([Unable to find GAP command-line interface])
++	fi
++
+ ])
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -13,7 +13,7 @@
+ doc: manual.six
+ 
+ manual.six: float.xml floatbib.xml
+-	cd $(top_srcdir) && echo 'LoadPackage("float"); DOC at FLOAT();' | $(GAP_EXEC) -A -q -T
++	cd $(top_srcdir) && echo 'LoadPackage("float"); DOC at FLOAT();' | $(CGAP) -A -q -T
+ 
+ distclean-local:
+ 	rm -f chap*.txt chap*.html index.html chooser.html
diff --git a/debian/repack b/debian/repack
new file mode 100755
index 0000000..8ca162d
--- /dev/null
+++ b/debian/repack
@@ -0,0 +1,140 @@
+#!/bin/bash
+
+PACKAGE_NAME=gap-float
+
+set -e
+set -u
+
+usage() {
+	echo "Usage: repack --upstream-version <ver> <downloaded file>"
+	exit 1
+	}
+
+if [ "$#" != "3" ]; then
+	usage
+fi
+if [ "$1" != "--upstream-version" ]; then
+	usage
+fi
+if [ ! -f "$3" ]; then
+	if [ -n "$3" ]; then
+		echo "$3 doesn't exist"
+	fi
+	usage
+fi
+UPSTREAM_VERSION="$2"
+UPSTREAM_TARBALLZZ="$3"
+
+DEBIAN_SUFFIX="+ds"
+####DEBIAN_ENCAPSULATEDFOLDERNAME="${PACKAGE_NAME}-usrc"
+
+DEBIAN_UVERSION=${UPSTREAM_VERSION}${DEBIAN_SUFFIX}
+DEBIAN_ROOTFOLDERNAME="${PACKAGE_NAME}-${DEBIAN_UVERSION}.orig"
+DEBIAN_TARBALLXZ="$(dirname $UPSTREAM_TARBALLZZ)/${PACKAGE_NAME}_${DEBIAN_UVERSION}.orig.tar.xz"
+
+REPACK_TMPDIR=`mktemp -d ./repackXXXXXX`
+REPACK_TMPDIR=$(readlink -f "$REPACK_TMPDIR")
+trap "/bin/rm -rf \"$REPACK_TMPDIR\"" QUIT INT EXIT
+
+message() {
+	echo
+	echo "-- -- $1"
+	echo
+	}
+
+message "Repackaging $UPSTREAM_TARBALLZZ"
+
+UPSTREAM_ROOTFOLDER="${REPACK_TMPDIR}/unpacked"
+mkdir "${UPSTREAM_ROOTFOLDER}"
+tar -C "${UPSTREAM_ROOTFOLDER}" -xf "${UPSTREAM_TARBALLZZ}" || unzip -d "${UPSTREAM_ROOTFOLDER}" "${UPSTREAM_TARBALLZZ}"
+if [ `ls -1 "${UPSTREAM_ROOTFOLDER}" | wc -l` -eq 1 ]; then
+	UPSTREAM_ROOTFOLDER="${UPSTREAM_ROOTFOLDER}/`ls -1 "${UPSTREAM_ROOTFOLDER}"`"
+fi
+
+DEBIAN_ROOTFOLDER="${REPACK_TMPDIR}/${DEBIAN_ROOTFOLDERNAME}"
+## repack
+####set -f
+REPACK_WORKING_FOLDER=$(pwd)
+cd "${UPSTREAM_ROOTFOLDER}"
+
+####. "${REPACK_WORKING_FOLDER}/debian/repack.local"
+## wipe out
+####rm --verbose --force -- makefile.basic
+## mimic autoreconf clean up
+rm --verbose --force -- m4/ax_cc_maxopt.m4
+rm --verbose --force -- m4/ax_check_compile_flag.m4
+rm --verbose --force -- m4/ax_compiler_vendor.m4
+rm --verbose --force -- m4/ax_gcc_archflag.m4
+rm --verbose --force -- m4/ax_gcc_x86_cpuid.m4
+rm --verbose --force -- m4/lt~obsolete.m4
+rm --verbose --force -- m4/ltsugar.m4
+rm --verbose --force -- m4/ltoptions.m4
+rm --verbose --force -- m4/ltversion.m4
+rm --verbose --force -- m4/libtool.m4
+rm --verbose --force -- build-aux/compile
+rm --verbose --force -- build-aux/depcomp
+rm --verbose --force -- build-aux/ltmain.sh
+rm --verbose --force -- build-aux/missing
+rm --verbose --force -- build-aux/config.guess
+rm --verbose --force -- build-aux/config.sub
+rm --verbose --force -- build-aux/install-sh
+rmdir --verbose -- build-aux
+rm --verbose --force -- src/floatconfig.h
+rm --verbose --force -- src/Makefile.in
+rm --verbose --force -- doc/Makefile.in
+rm --verbose --force -- lib/Makefile.in
+rm --verbose --force -- tst/Makefile.in
+rm --verbose --force -- Makefile.in
+rm --verbose --force -- config.h.in
+rm --verbose --force -- config.status
+rm --verbose --force -- configure
+rm --verbose --force -- libtool
+rm --verbose --force -- aclocal.m4
+## mimic make clean up
+rm --verbose --force -- doc/chap*.txt
+rm --verbose --force -- doc/chap*.html
+rm --verbose --force -- doc/chooser.html
+rm --verbose --force -- doc/index.html
+rm --verbose --force -- doc/float.{tex,aux,toc,log,bbl,blg,ind,idx,ilg,out}
+rm --verbose --force -- doc/float.pnr
+rm --verbose --force -- doc/manual.{pdf,six,lab,css}
+rm --verbose --force -- doc/lefttoc.css
+rm --verbose --force -- doc/manual.{css,js}
+rm --verbose --force -- doc/nocolorprompt.css
+rm --verbose --force -- doc/ragged.css
+rm --verbose --force -- doc/rainbow.js
+rm --verbose --force -- doc/times.css
+rm --verbose --force -- doc/toggless.{css,js}
+#:
+
+cd ${REPACK_WORKING_FOLDER}
+set +f
+## end
+####if [ -n "${DEBIAN_ENCAPSULATEDFOLDERNAME}" ]; then
+####	mkdir "${DEBIAN_ROOTFOLDER}"
+####	mv "${UPSTREAM_ROOTFOLDER}" "${DEBIAN_ROOTFOLDER}/${DEBIAN_ENCAPSULATEDFOLDERNAME}"
+####else
+	mv "${UPSTREAM_ROOTFOLDER}" "${DEBIAN_ROOTFOLDER}"
+####fi
+
+REPACK_TARBALL="${REPACK_TMPDIR}/repacked.tar"
+REPACK_TARBALLXZ="${REPACK_TARBALL}.xz"
+( cd "${REPACK_TMPDIR}" && \
+	find -L "${DEBIAN_ROOTFOLDERNAME}" -xdev -type f -print | sort | \
+	tar -T-  --owner=root --group=root --mode=a+rX --create --file "${REPACK_TARBALL}" \
+	)
+xz -9e < "${REPACK_TARBALL}" > "${REPACK_TARBALLXZ}"
+mv "${REPACK_TARBALLXZ}" "${DEBIAN_TARBALLXZ}"
+
+message "Testing ${DEBIAN_TARBALLXZ}"
+
+xz --verbose --test "${DEBIAN_TARBALLXZ}"
+
+message "Printing information about ${DEBIAN_TARBALLXZ}"
+
+xz --verbose --list "${DEBIAN_TARBALLXZ}"
+
+message "Quitting"
+
+##
+## eos
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..21fd5f3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+
+CGAP = /usr/bin/gap
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_GAP_INFO_ARCH ?= $(shell echo 'Print(GAPInfo.Architecture);' | $(CGAP) -A -q -T)
+
+default:
+	@uscan --no-conf --dehs --report || true
+
+%:
+	dh $@ --with autoreconf
+
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		--with-gaproot=/usr/lib/gap \
+		--with-mpfr=yes \
+		--with-mpc=yes \
+		--with-mpfi=yes \
+		--with-fplll=no \
+		--with-cxsc=no
+
+override_dh_auto_install:
+	dh_auto_install --destdir debian/tmp/
+
+override_dh_link:
+	dh_link -p gap-float \
+		/usr/lib/$(DEB_BUILD_GNU_TYPE)/gap/pkg/float/bin /usr/lib/gap/pkg/float/bin/$(DEB_BUILD_GAP_INFO_ARCH) \
+		/usr/lib/gap/pkg/float/bin /usr/share/gap/pkg/float/bin \
+		/usr/share/gap/pkg/float/doc /usr/share/doc/gap-float/doc
+
+get-orig-source:
+	uscan --no-conf --download-current-version --verbose
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 0000000..a610508
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1 @@
+debian/upstream/signing-key.pgp
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..22a4de9
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,2 @@
+compression = xz
+compression-level = 9
diff --git a/debian/upstream/signing-key.pgp b/debian/upstream/signing-key.pgp
new file mode 100644
index 0000000..b83f2c2
Binary files /dev/null and b/debian/upstream/signing-key.pgp differ
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ade7df7
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts=dversionmangle=s/\+ds//,pgpsigurlmangle=s/$/.asc/ \
+http://www.uni-math.gwdg.de/laurent/archive/float-([\d\.]+)\.tar\.(?:gz|bz2|xz) \
+debian bash debian/repack

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gap-float.git



More information about the debian-science-commits mailing list