[cohomcalg] 01/01: Initial attempt at Debian packaging.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sun Jan 8 15:57:05 UTC 2017


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

dtorrance-guest pushed a commit to branch master
in repository cohomcalg.

commit 3a6f943aecc4db9c22e94a16faee35ad79d4155e
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Sun Jan 8 10:38:37 2017 -0500

    Initial attempt at Debian packaging.
---
 debian/README.source                    | 11 ++++++
 debian/changelog                        |  5 +++
 debian/clean                            |  1 +
 debian/cohomcalg.1                      | 45 +++++++++++++++++++++++++
 debian/compat                           |  1 +
 debian/control                          | 25 ++++++++++++++
 debian/copyright                        | 60 +++++++++++++++++++++++++++++++++
 debian/doc-base                         | 10 ++++++
 debian/docs                             |  2 ++
 debian/examples                         |  1 +
 debian/install                          |  2 ++
 debian/manpages                         |  1 +
 debian/patches/hardening.patch          | 36 ++++++++++++++++++++
 debian/patches/link_polylib.patch       | 15 +++++++++
 debian/patches/reproducible_build.patch | 23 +++++++++++++
 debian/patches/series                   |  4 +++
 debian/patches/spelling.patch           | 59 ++++++++++++++++++++++++++++++++
 debian/rules                            |  6 ++++
 debian/source/format                    |  1 +
 debian/watch                            |  4 +++
 20 files changed, 312 insertions(+)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..35fb29d
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,11 @@
+We repack the upstream distribution file for several reasons:
+
+* Upstream uses .zip format, which is not supported by the Debian archive.
+* Upstream ships two Windows executable files, resulting in a
+  source-contains-prebuilt-windows-binary Lintian warning.
+* Upstream ships the source for the polylib library.  We remove it and use
+  the Debian polylib package instead.
+
+Note that this repacking is performed automatically by uscan.
+
+ -- Doug Torrance <dtorrance at piedmont.edu>, Sat,  7 Jan 2017 20:18:01 -0500
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..c05717c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+cohomcalg (0.31b+ds-1) unstable; urgency=medium
+
+  * Initial release (Closes: #850587).
+
+ -- Doug Torrance <dtorrance at piedmont.edu>  Thu, 05 Jan 2017 22:28:24 -0500
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..56d7443
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+bin/cohomcalg
diff --git a/debian/cohomcalg.1 b/debian/cohomcalg.1
new file mode 100644
index 0000000..0abb54a
--- /dev/null
+++ b/debian/cohomcalg.1
@@ -0,0 +1,45 @@
+.TH COHOMCALG "1" "January 2017" "0.31b"
+.SH NAME
+cohomcalg \- sheaf cohomology of line bundles on toric varieties
+.SH SYNOPSIS
+cohomcalg [\-\-option1] [\-\-option2] ... InputFileName [> OutputFileName]
+.SH OPTIONS
+.TP
+\fB\-\-in=\fR"..."
+Treats the text between parentheses like additional
+input data, i.e. like appended content of the input file.
+.TP
+\fB\-\-nomonomfile\fR
+Prohibits usage and generation of monomial file.
+.TP
+\fB\-\-checkserre\fR
+Computes the Serre dual cohomology for comparison.
+.TP
+\fB\-\-noreduction\fR
+Deactivates the Serre self\-duality reduction for ambiguous
+monomials (may increase computation time dramatically!)
+.TP
+\fB\-\-hideinput\fR
+Does not print the input data read from the input file.
+.TP
+\fB\-\-showtime\fR
+Shows timing stats even for application runs < 1 second.
+.TP
+\fB\-\-showbits\fR
+Prints the internally used bitmasks for debug output.
+.TP
+\fB\-\-mathematica\fR
+Gives formattet output for the Mathematica script version.
+.TP
+\fB\-\-integrated\fR
+Produces minimalistic output for application integration.
+.TP
+\fB\-\-verboseN\fR
+Provides debug output at level N=1..6, e.g. \fB\-\-verbose3\fR.
+.TP
+\fB\-\-maxX\fR=\fI\,N\/\fR
+Defines limits for X=verts,srgens,cohoms to N.
+.PP
+The order of options is irrelevant, but later commands always overwrite
+prior options, e.g. from '\-\-verbose4 \fB\-\-verbose1\fR' only the later one will
+have any effect.
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..9e9ab59
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,25 @@
+Source: cohomcalg
+Section: math
+Priority: optional
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Doug Torrance <dtorrance at piedmont.edu>
+Build-Depends: debhelper (>=9), libpolylib64-dev
+Standards-Version: 3.9.8
+Homepage: http://wwwth.mpp.mpg.de/members/bjurke/cohomcalg/
+Vcs-Browser: https://anonscm.debian.org/git/debian-science/packages/cohomcalg.git
+Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/cohomcalg.git
+
+Package: cohomcalg
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: sheaf cohomology of line bundles on toric varieties
+ The algorithm for the computation of sheaf cohomologies for line bundles on
+ toric varieties presented in "Cohomology of Line Bundles: A Computational
+ Algorithm" by Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, and Helmut
+ Roschy has been implemented in a convenient and high-performance C/C++
+ application called cohomCalg.
+ .
+ The optional cohomCalg Koszul extension serves as a Mathematica 7 frontend and
+ allows for the easy computation of hypersurface and complete intersection
+ cohomologies, following the material presented in "Cohomology of Line Bundles:
+ Applications" by the same authors.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..6d39a8d
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,60 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: comohcalg
+Source: http://wwwth.mpp.mpg.de/members/bjurke/cohomcalg/
+Files-Excluded: bin/*.exe source/polylib_mod
+
+Files: *
+Copyright: 2010–2012 Ralph Blumenhagen
+	   2010-2012 Benjamin Jurke
+	   2010-2012 Thorsten Rahn
+	   2010-2012 Helmut Roschy
+License: GPL-3+
+
+Files: source/tinythread.*
+Copyright: 2010 Marcus Geelnard
+License: Zlib
+
+Files: debian/*
+Copyright: 2017 Doug Torrance <dtorrance at piedmont.edu>
+License: GPL-3+
+
+License: GPL-3+
+ 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 of the License, 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 package; if not, see
+ <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
+
+License: Zlib
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+    1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+ .
+    2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+ .
+    3. This notice may not be removed or altered from any source
+    distribution.
diff --git a/debian/doc-base b/debian/doc-base
new file mode 100644
index 0000000..2a205f5
--- /dev/null
+++ b/debian/doc-base
@@ -0,0 +1,10 @@
+Document: cohomcalg
+Title: cohomCalg manual
+Author: Benjamin Jurke and Thorsten Rahn
+  in collaboration with Ralph Blumenhagen and Helmut Roschy
+Abstract: Manual for cohomCalg, an implementation of an algorithm for the
+ computation of sheaf cohomology of line bundles on toric varieties.
+Section: Science/Mathematics
+
+Format: PDF
+Files: /usr/share/doc/cohomcalg/manual-031.pdf.gz
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..4627dfe
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+Proper?Citation.txt
+manual-031.pdf
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..65985eb
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+bin/*.in
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..d7ef4ea
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+bin/cohomcalg usr/bin
+bin/cohomCalg?Koszul?extension?v0.3.nb usr/share/cohomcalg
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..ccf43fb
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/cohomcalg.1
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..5abab22
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,36 @@
+Description: Honor build flags from dpkg-buildflags for hardening.
+Author: Doug Torrance <dtorrance at piedmont.edu>
+Last-Update: 2017-01-07
+
+--- a/Makefile
++++ b/Makefile
+@@ -8,7 +8,6 @@
+ CC        := g++
+ CFLAGS    := -O3
+ LD        := g++
+-LDFLAGS   := 
+ # Note: (1) If you want to enforce 32-bit or 64-bit compilation, 
+ #           add "-m32" or "-m64" to both CFLAGS and LDFLAGS.
+ #       (2) If you want to enforce a static linking of all libraries 
+@@ -36,12 +35,12 @@
+ # macros for .c/.cpp dirs
+ define make-goal-cpp
+ $1/%.o: %.cpp
+-	$(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c $$< -o $$@
++	$(CC) $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c $$< -o $$@
+ endef
+ 
+ define make-goal-c
+ $1/%.o: %.c
+-	$(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c $$< -o $$@
++	$(CC) $(INCLUDES) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $$< -o $$@
+ endef
+ 
+ 
+@@ -63,4 +62,4 @@
+ 
+ 
+ $(eval $(call make-goal-c, build/polylib_mod))
+-$(eval $(call make-goal-cpp, build))
+\ No newline at end of file
++$(eval $(call make-goal-cpp, build))
diff --git a/debian/patches/link_polylib.patch b/debian/patches/link_polylib.patch
new file mode 100644
index 0000000..f630086
--- /dev/null
+++ b/debian/patches/link_polylib.patch
@@ -0,0 +1,15 @@
+Description: Link against system polylib
+Author: Doug Torrance <dtorrance at piedmont.edu>
+Last-Update: 2017-01-07
+
+--- a/Makefile
++++ b/Makefile
+@@ -50,7 +50,7 @@
+ all: checkdirs bin/cohomcalg
+ 
+ bin/cohomcalg: $(COHOMCALG_OBJ) $(POLYLIB_OBJ)
+-	$(LD) $^ $(LDFLAGS) -lpthread -o $@
++	$(LD) $^ $(LDFLAGS) -lpthread -lpolylib64 -o $@
+ #-static -lsource/polylib-5.22.5/.libs/libpolylib64.a
+ 
+ checkdirs: $(BUILD_DIR)
diff --git a/debian/patches/reproducible_build.patch b/debian/patches/reproducible_build.patch
new file mode 100644
index 0000000..f93478e
--- /dev/null
+++ b/debian/patches/reproducible_build.patch
@@ -0,0 +1,23 @@
+Description: Remove timestamp to allow reproducible builds.
+Author: Doug Torrance <dtorrance at piedmont.edu>
+Last-Update: 2017-01-08
+
+--- a/source/main.cpp
++++ b/source/main.cpp
+@@ -34,7 +34,6 @@
+ #define APP_NAME      "cohomCalg"
+ #define APP_VERSION   "0.31b"
+ #define APP_AUTHOR    "author: Benjamin Jurke (mail at benjaminjurke.net)" << std::endl << "    Based on the algorithm presented in arXiv:1003.5217"
+-#define APP_UPDATE    __DATE__ << " @ " << __TIME__
+ #define APP_PLATFORM  APP_TARGET_OS << " " << APP_ARCH
+ 
+ 
+@@ -420,7 +419,7 @@
+     stringstream ss;
+     ss << endl
+        << "    " << APP_NAME << " v" << APP_VERSION << endl
+-       << "    (compiled on " << APP_UPDATE <<" for " << APP_PLATFORM << ")" << endl
++       << "    (compiled for " << APP_PLATFORM << ")" << endl
+        << "    " << APP_AUTHOR << endl
+        << endl;
+     string strAppInfo = ss.str();
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cd2fc2b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+link_polylib.patch
+hardening.patch
+spelling.patch
+reproducible_build.patch
diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch
new file mode 100644
index 0000000..1261cc4
--- /dev/null
+++ b/debian/patches/spelling.patch
@@ -0,0 +1,59 @@
+Description: Fix spelling errors.
+Author: Doug Torrance <dtorrance at piedmont.edu>
+Last-Update: 2017-01-07
+
+--- a/sourcerationals.cpp
++++ b/source/rationals.cpp
+@@ -523,7 +523,7 @@
+ 	}
+ 	else
+ 	{
+-		WARN_OUT("Counting of the rationoms errorneous - is your input geometry valid?");
++		WARN_OUT("Counting of the rationoms erroneous - is your input geometry valid?");
+ 
+ 		// During a normal program run, we have the warning output, but in integration mode we treat this as a serious error
+ 		if (CCmdLineArguments::GetVerboseLevel() < -5)
+@@ -853,7 +853,7 @@
+     {
+         MSG_OUT("Verbose level 2: Serre dualization information:");
+         MSG_OUT("-----------------------------------------------");
+-        MSG_OUT("    Due to the ambiguous contributions to the requested cohomologies the following braching occured:");
++        MSG_OUT("    Due to the ambiguous contributions to the requested cohomologies the following braching occurred:");
+         MSG_OUT("    - \"normal\" configurations:   " << numcohoms << " (" << BytesToReadableSize(numcohoms * sizeof(ui32vec64)) << " memory)");
+         MSG_OUT("    - Serre-dual configurations: " << numdualcohoms << " (" << BytesToReadableSize(numdualcohoms * sizeof(ui32vec64)) << " memory)");
+         MSG_OUT("");
+--- a/source/main.cpp
++++ b/source/main.cpp
+@@ -218,10 +218,10 @@
+     CONSOLE_MSG_OUT("Syntax:  cohomcalg [--option1] [--option2] ... InputFileName [> OutputFileName]");
+     CONSOLE_MSG_OUT("");
+     CONSOLE_MSG_OUT("Command line options:");
+-    CONSOLE_MSG_OUT("  --in=\"...\"      Treats the text between paranthesis like additional");
++    CONSOLE_MSG_OUT("  --in=\"...\"      Treats the text between parentheses like additional");
+     CONSOLE_MSG_OUT("                  input data, i.e. like appended content of the input file.");
+     CONSOLE_MSG_OUT("  --nomonomfile   Prohibits usage and generation of monomial file.");
+-    CONSOLE_MSG_OUT("  --checkserre    Computes the Serre dual cohomology for comparision.");
++    CONSOLE_MSG_OUT("  --checkserre    Computes the Serre dual cohomology for comparison.");
+     CONSOLE_MSG_OUT("  --noreduction   Deactivates the Serre self-duality reduction for ambiguous");
+     CONSOLE_MSG_OUT("                  monomials (may increase computation time dramatically!)");
+     CONSOLE_MSG_OUT("  --hideinput     Does not print the input data read from the input file.");
+@@ -690,7 +690,7 @@
+     }
+ 
+     CONSOLE_MSG_OUT("");
+-    CONSOLE_MSG_OUT("    All done. Programm run successfully completed.");
++    CONSOLE_MSG_OUT("    All done. Program run successfully completed.");
+     CONSOLE_MSG_OUT("");
+ 
+     return 0;
+--- a/source/tokenizer.cpp
++++ b/source/tokenizer.cpp
+@@ -42,7 +42,7 @@
+ 
+ bool operator!=(const CToken &lhs, const CToken &rhs)
+ {
+-    /* The operator function handles the comparision of two tokens. We do NOT compare the
++    /* The operator function handles the comparison of two tokens. We do NOT compare the
+        InputOffset, i.e. just the data and type of the tokens has to be equal. */
+ 
+     if (lhs.tkType != rhs.tkType) return true;
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d8309f6
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+	dh $@
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/watch b/debian/watch
new file mode 100644
index 0000000..1872dc7
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="uversionmangle=s/0/0./,repacksuffix=+ds,dversionmangle=s/\+ds//" \
+http://wwwth.mppmu.mpg.de/members/bjurke/cohomcalg \
+content/cohomCalg at ANY_VERSION@@ARCHIVE_EXT@

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



More information about the debian-science-commits mailing list