[4ti2] 02/02: Imported (first) Debian patch 1.6.2+ds-1

Jerome Benoit calculus-guest at moszumanska.debian.org
Tue Dec 9 23:26:30 UTC 2014


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

calculus-guest pushed a commit to branch master
in repository 4ti2.

commit 5d86eece32e7df0b70081444bb0655aa5adcca32
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Tue Dec 9 21:39:46 2014 +0100

    Imported (first) Debian patch 1.6.2+ds-1
---
 debian/4ti2-doc.doc-base                           |   16 +
 debian/4ti2-doc.docs                               |    5 +
 debian/4ti2-doc.examples                           |    1 +
 debian/4ti2.install                                |    3 +
 debian/4ti2.links                                  |   16 +
 debian/4ti2.lintian-overrides                      |    1 +
 debian/4ti2.manpages                               |    1 +
 debian/adhoc/doc/4ti2_manual.bib                   |   82 ++
 debian/adhoc/doc/hplain.bst                        | 1121 ++++++++++++++++++++
 debian/adhoc/examples/tutorial/3x4x6-K_2_3.mod     |    9 +
 debian/adhoc/examples/tutorial/3x4x6.mod           |    6 +
 debian/adhoc/examples/tutorial/3x6.mod             |    5 +
 debian/adhoc/examples/tutorial/4coins.cost         |    2 +
 debian/adhoc/examples/tutorial/4coins.mat          |    3 +
 debian/adhoc/examples/tutorial/4coins.rhs          |    2 +
 debian/adhoc/examples/tutorial/4coins.sign         |    2 +
 debian/adhoc/examples/tutorial/4coins.zfeas        |    2 +
 debian/adhoc/examples/tutorial/4x4.mat             |    9 +
 debian/adhoc/examples/tutorial/magic3x3.mat        |    8 +
 debian/adhoc/examples/tutorial/ppi3.mat            |    2 +
 debian/adhoc/examples/tutorial/qsystem.mat         |    4 +
 debian/adhoc/examples/tutorial/qsystem.rel         |    2 +
 debian/adhoc/examples/tutorial/qsystem.rhs         |    2 +
 debian/adhoc/examples/tutorial/qsystem.sign        |    2 +
 debian/adhoc/examples/tutorial/zsystem.mat         |    1 +
 debian/adhoc/examples/tutorial/zsystem.rel         |    2 +
 debian/adhoc/examples/tutorial/zsystem.rhs         |    1 +
 debian/adhoc/examples/tutorial/zsystem.sign        |    1 +
 debian/adhoc/examples/www/333.mod                  |    6 +
 debian/adhoc/examples/www/334.mod                  |    6 +
 debian/adhoc/examples/www/335.mod                  |    6 +
 debian/adhoc/examples/www/344.mod                  |    6 +
 debian/adhoc/examples/www/345.mod                  |    6 +
 debian/adhoc/examples/www/355.mod                  |    6 +
 debian/adhoc/examples/www/444.mod                  |    6 +
 debian/adhoc/examples/www/magic3x3.mat             |    8 +
 debian/adhoc/examples/www/magic4x4.mat             |   10 +
 debian/adhoc/examples/www/magic5x5.mat             |   12 +
 debian/adhoc/examples/www/magic6x6.mat             |   14 +
 debian/changelog                                   |   38 +
 debian/compat                                      |    1 +
 debian/control                                     |   39 +
 debian/copyright                                   |   65 ++
 debian/man/4ti2.1                                  |   85 ++
 debian/patches/debianization-documentation.patch   |   51 +
 debian/patches/debianization-prefix.patch          |  449 ++++++++
 debian/patches/debianization.patch                 |   67 ++
 debian/patches/degnulibrarianization.patch         |   43 +
 debian/patches/series                              |    7 +
 ...eam-autotoolization-private_shared_scheme.patch |  271 +++++
 .../patches/upstream-autotoolization-shared.patch  |   42 +
 debian/patches/upstream-doc-typo.patch             |   16 +
 debian/repack                                      |  158 +++
 debian/rules                                       |   37 +
 debian/source/format                               |    1 +
 debian/source/lintian-overrides                    |    1 +
 debian/watch                                       |    4 +
 57 files changed, 2772 insertions(+)

diff --git a/debian/4ti2-doc.doc-base b/debian/4ti2-doc.doc-base
new file mode 100644
index 0000000..8a227da
--- /dev/null
+++ b/debian/4ti2-doc.doc-base
@@ -0,0 +1,16 @@
+Document: 4ti2
+Title: User's Guide for 4ti2 version 1.6
+Author: the 4ti2 team
+ Ralf Hemmecke
+ Raymond Hemmecke
+ Matthias Koeppe
+ Peter Malkin
+ Matthias Walter
+Abstract:
+ This document contains succinct information on using the 4ti2 tool suite,
+ mainly through numerous examples. 4ti2 is a mathematical software package
+ for algebraic, geometric and combinatorial problems on linear spaces.
+Section: Science/Mathematics
+
+Format: PDF
+Files: /usr/share/doc/4ti2-doc/4ti2_manual.pdf
diff --git a/debian/4ti2-doc.docs b/debian/4ti2-doc.docs
new file mode 100644
index 0000000..4a9aceb
--- /dev/null
+++ b/debian/4ti2-doc.docs
@@ -0,0 +1,5 @@
+AUTHORS
+THANKS
+TODO
+README
+_build/doc/4ti2_manual.pdf
diff --git a/debian/4ti2-doc.examples b/debian/4ti2-doc.examples
new file mode 100644
index 0000000..8c0890a
--- /dev/null
+++ b/debian/4ti2-doc.examples
@@ -0,0 +1 @@
+debian/adhoc/examples/*
diff --git a/debian/4ti2.install b/debian/4ti2.install
new file mode 100644
index 0000000..e824a14
--- /dev/null
+++ b/debian/4ti2.install
@@ -0,0 +1,3 @@
+usr/bin/*
+usr/lib/*/4ti2/bin/*
+usr/lib/*/4ti2/lib/lib*.so
diff --git a/debian/4ti2.links b/debian/4ti2.links
new file mode 100644
index 0000000..5f293d1
--- /dev/null
+++ b/debian/4ti2.links
@@ -0,0 +1,16 @@
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-circuits.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-genmodel.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-gensymm.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-graver.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-groebner.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-hilbert.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-markov.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-minimize.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-normalform.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-output.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-ppi.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-qsolve.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-rays.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-walk.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-zbasis.1.gz
+usr/share/man/man1/4ti2.1.gz usr/share/man/man1/4ti2-zsolve.1.gz
diff --git a/debian/4ti2.lintian-overrides b/debian/4ti2.lintian-overrides
new file mode 100644
index 0000000..2896fce
--- /dev/null
+++ b/debian/4ti2.lintian-overrides
@@ -0,0 +1 @@
+4ti2 binary: shlib-calls-exit
diff --git a/debian/4ti2.manpages b/debian/4ti2.manpages
new file mode 100644
index 0000000..19f429f
--- /dev/null
+++ b/debian/4ti2.manpages
@@ -0,0 +1 @@
+debian/man/*
diff --git a/debian/adhoc/doc/4ti2_manual.bib b/debian/adhoc/doc/4ti2_manual.bib
new file mode 100644
index 0000000..b71bfbd
--- /dev/null
+++ b/debian/adhoc/doc/4ti2_manual.bib
@@ -0,0 +1,82 @@
+%% origin: http://www.ams.org/mref
+ at book {deloera-hemmecke-koeppe:book,
+   MREFKEY = MR3024570,
+    AUTHOR = {De Loera, Jes{\'u}s A. and Hemmecke, Raymond and K{\"o}ppe,
+              Matthias},
+     TITLE = {Algebraic and geometric ideas in the theory of discrete
+              optimization},
+    SERIES = {MOS-SIAM Series on Optimization},
+    VOLUME = {14},
+ PUBLISHER = {Society for Industrial and Applied Mathematics (SIAM),
+              Philadelphia, PA; Mathematical Optimization Society,
+              Philadelphia, PA},
+      YEAR = {2013},
+     PAGES = {xx+322},
+      ISBN = {978-1-611972-43-6},
+   MRCLASS = {90-02 (13P10 52C07 90C10 90C27 90C52)},
+  MRNUMBER = {3024570},
+MRREVIEWER = {Alexander I. Barvinok},
+}
+
+%% origin: http://www.ams.org/mref
+ at preamble{
+   "\def\cprime{$'$} "
+}
+ at article {Haus+Koeppe+Weismantel,
+   MREFKEY = MR1993047,
+    AUTHOR = {Haus, Utz-Uwe and K{\"o}ppe, Matthias and Weismantel, Robert},
+     TITLE = {A primal all-integer algorithm based on irreducible solutions},
+      NOTE = {Algebraic and geometric methods in discrete optimization},
+   JOURNAL = {Math. Program.},
+  FJOURNAL = {Mathematical Programming. A Publication of the Mathematical
+              Programming Society},
+    VOLUME = {96},
+      YEAR = {2003},
+    NUMBER = {2, Ser. B},
+     PAGES = {205--246},
+      ISSN = {0025-5610},
+   MRCLASS = {90C10 (90C27)},
+  MRNUMBER = {1993047 (2004m:90092)},
+MRREVIEWER = {Victor P. Il{\cprime}ev},
+       DOI = {10.1007/s10107-003-0384-8},
+       URL = {http://dx.doi.org/10.1007/s10107-003-0384-8},
+}
+
+%% origin: http://www.ams.org/mref + by hand (EPRINT entry)
+ at incollection {Sturmfels:03,
+   MREFKEY = MR2104733,
+    AUTHOR = {Sturmfels, Bernd},
+     TITLE = {Algebraic recipes for integer programming},
+ BOOKTITLE = {Trends in optimization},
+    SERIES = {Proc. Sympos. Appl. Math.},
+    VOLUME = {61},
+     PAGES = {99--113},
+ PUBLISHER = {Amer. Math. Soc., Providence, RI},
+      YEAR = {2004},
+   MRCLASS = {90C10 (13P10 90C60)},
+  MRNUMBER = {2104733 (2005k:90084)},
+MRREVIEWER = {John Karlof},
+       DOI = {10.1090/psapm/061/2104733},
+       URL = {http://dx.doi.org/10.1090/psapm/061/2104733},
+    EPRINT = {\href{http://arxiv.org/abs/math/0310194}{arXiv:math.OC/0310194}}
+}
+
+%% origin: by hand
+ at phdthesis {Koeppe,
+  author = {Matthias K{\"o}ppe},
+   title = {Erzeugende {M}engen f{\"u}r gemischt-ganzzahlige {P}rogramme},
+	  type = {Dissertation},
+  school = {Otto-von-Guericke-Universit{\"a}t Magdeburg},
+    year = {1999},
+		 url = {http://www.math.ucdavis.edu/~mkoeppe/art/mkoeppe-diplom.ps},
+  eprint = {\url{http://www.math.ucdavis.edu/~mkoeppe/art/mkoeppe-diplom.ps}}
+}
+
+%% origin: by hand
+ at phdthesis {Urbaniak,
+  author = {Regina Urbaniak},
+   title = {Decomposition of Generating Sets and of Integer Programs},
+	  type = {Dissertation},
+  school = {Technische Universit{\"a}t Berlin},
+    year = {1998},
+}
diff --git a/debian/adhoc/doc/hplain.bst b/debian/adhoc/doc/hplain.bst
new file mode 100644
index 0000000..cd51dc5
--- /dev/null
+++ b/debian/adhoc/doc/hplain.bst
@@ -0,0 +1,1121 @@
+% hplain: adds eprint field (www-admin at xxx.lanl.gov)
+% an extension of:
+% BibTeX standard bibliography style `plain'
+	% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
+	% Copyright (C) 1985, all rights reserved.
+	% Copying of this file is authorized only if either
+	% (1) you make absolutely no changes to your copy, including name, or
+	% (2) if you do make changes, you name it something other than
+	% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
+	% This restriction helps ensure that all standard styles are identical.
+	% The file btxbst.doc has the documentation for this style.
+
+ENTRY
+  { address
+    author
+    booktitle
+    chapter
+    edition
+    editor
+    eprint
+    howpublished
+    institution
+    journal
+    key
+    month
+    note
+    number
+    organization
+    pages
+    publisher
+    school
+    series
+    title
+    type
+    volume
+    year
+  }
+  {}
+  { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+  #1 'mid.sentence :=
+  #2 'after.sentence :=
+  #3 'after.block :=
+}
+
+STRINGS { s t }
+
+FUNCTION {output.nonnull}
+{ 's :=
+  output.state mid.sentence =
+    { ", " * write$ }
+    { output.state after.block =
+	{ add.period$ write$
+	  newline$
+	  "\newblock " write$
+	}
+	{ output.state before.all =
+	    'write$
+	    { add.period$ " " * write$ }
+	  if$
+	}
+      if$
+      mid.sentence 'output.state :=
+    }
+  if$
+  s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+    'pop$
+    'output.nonnull
+  if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+  duplicate$ empty$
+    { pop$ "empty " t * " in " * cite$ * warning$ }
+    'output.nonnull
+  if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+  "\bibitem{" write$
+  cite$ write$
+  "}" write$
+  newline$
+  ""
+  before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+  write$
+  newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+    'skip$
+    { after.block 'output.state := }
+  if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+    'skip$
+    { output.state before.all =
+	'skip$
+	{ after.sentence 'output.state := }
+      if$
+    }
+  if$
+}
+
+FUNCTION {not}
+{   { #0 }
+    { #1 }
+  if$
+}
+
+FUNCTION {and}
+{   'skip$
+    { pop$ #0 }
+  if$
+}
+
+FUNCTION {or}
+{   { pop$ #1 }
+    'skip$
+  if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+    'skip$
+    'new.block
+  if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+  swap$ empty$
+  and
+    'skip$
+    'new.block
+  if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+    'skip$
+    'new.sentence
+  if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+  swap$ empty$
+  and
+    'skip$
+    'new.sentence
+  if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+    { pop$ "" }
+    'skip$
+  if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "{\em " swap$ * "}" * }
+  if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
+      nameptr #1 >
+	{ namesleft #1 >
+	    { ", " * t * }
+	    { numnames #2 >
+		{ "," * }
+		'skip$
+	      if$
+	      t "others" =
+		{ " et~al." * }
+		{ " and " * t * }
+	      if$
+	    }
+	  if$
+	}
+	't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+    { "" }
+    { author format.names }
+  if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+    { "" }
+    { editor format.names
+      editor num.names$ #1 >
+	{ ", editors" * }
+	{ ", editor" * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+    { "" }
+    { title "t" change.case$ }
+  if$
+}
+
+FUNCTION {format.eprint}
+{ eprint empty$
+    { "" }
+    { eprint }
+  if$
+}
+
+
+FUNCTION {n.dashify}
+{ 't :=
+  ""
+    { t empty$ not }
+    { t #1 #1 substring$ "-" =
+	{ t #1 #2 substring$ "--" = not
+	    { "--" *
+	      t #2 global.max$ substring$ 't :=
+	    }
+	    {   { t #1 #1 substring$ "-" = }
+		{ "-" *
+		  t #2 global.max$ substring$ 't :=
+		}
+	      while$
+	    }
+	  if$
+	}
+	{ t #1 #1 substring$ *
+	  t #2 global.max$ substring$ 't :=
+	}
+      if$
+    }
+  while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+    { month empty$
+	{ "" }
+	{ "there's a month but no year in " cite$ * warning$
+	  month
+	}
+      if$
+    }
+    { month empty$
+	'year
+	{ month " " * year * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.btitle}
+{ title emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+    { "~" }
+    { " " }
+  if$
+  swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+    'pop$
+    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+  if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+    { "" }
+    { "volume" volume tie.or.space.connect
+      series empty$
+	'skip$
+	{ " of " * series emphasize * }
+      if$
+      "volume and number" number either.or.check
+    }
+  if$
+}
+
+FUNCTION {format.number.series}
+{ volume empty$
+    { number empty$
+	{ series field.or.null }
+	{ output.state mid.sentence =
+	    { "number" }
+	    { "Number" }
+	  if$
+	  number tie.or.space.connect
+	  series empty$
+	    { "there's a number but no series in " cite$ * warning$ }
+	    { " in " * series * }
+	  if$
+	}
+      if$
+    }
+    { "" }
+  if$
+}
+
+FUNCTION {format.edition}
+{ edition empty$
+    { "" }
+    { output.state mid.sentence =
+	{ edition "l" change.case$ " edition" * }
+	{ edition "t" change.case$ " edition" * }
+      if$
+    }
+  if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+  #0 'multiresult :=
+    { multiresult not
+      t empty$ not
+      and
+    }
+    { t #1 #1 substring$
+      duplicate$ "-" =
+      swap$ duplicate$ "," =
+      swap$ "+" =
+      or or
+	{ #1 'multiresult := }
+	{ t #2 global.max$ substring$ 't := }
+      if$
+    }
+  while$
+  multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+    { "" }
+    { pages multi.page.check
+	{ "pages" pages n.dashify tie.or.space.connect }
+	{ "page" pages tie.or.space.connect }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+  number empty$
+    'skip$
+    { "(" number * ")" * *
+      volume empty$
+	{ "there's a number but no volume in " cite$ * warning$ }
+	'skip$
+      if$
+    }
+  if$
+  pages empty$
+    'skip$
+    { duplicate$ empty$
+	{ pop$ format.pages }
+	{ ":" * pages n.dashify * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+    'format.pages
+    { type empty$
+	{ "chapter" }
+	{ type "l" change.case$ }
+      if$
+      chapter tie.or.space.connect
+      pages empty$
+	'skip$
+	{ ", " * format.pages * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+    { "" }
+    { editor empty$
+	{ "In " booktitle emphasize * }
+	{ "In " format.editors * ", " * booktitle emphasize * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+  month empty$ year empty$ note empty$
+  and and and and and
+  key empty$ not and
+    { "all relevant fields are empty in " cite$ * warning$ }
+    'skip$
+  if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+    'skip$
+    { pop$
+      type "t" change.case$
+    }
+  if$
+}
+
+FUNCTION {format.tr.number}
+{ type empty$
+    { "Technical Report" }
+    'type
+  if$
+  number empty$
+    { "t" change.case$ }
+    { number tie.or.space.connect }
+  if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+    { journal empty$
+	{ "need key or journal for " cite$ * " to crossref " * crossref *
+	  warning$
+	  ""
+	}
+	{ "In {\em " journal * "\/}" * }
+      if$
+    }
+    { "In " key * }
+  if$
+  " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+  editor num.names$ duplicate$
+  #2 >
+    { pop$ " et~al." * }
+    { #2 <
+	'skip$
+	{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+	    { " et~al." * }
+	    { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+	  if$
+	}
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+      "In "
+    }
+    { "Volume" volume tie.or.space.connect
+      " of " *
+    }
+  if$
+  editor empty$
+  editor field.or.null author field.or.null =
+  or
+    { key empty$
+	{ series empty$
+	    { "need editor, key, or series for " cite$ * " to crossref " *
+	      crossref * warning$
+	      "" *
+	    }
+	    { "{\em " * series * "\/}" * }
+	  if$
+	}
+	{ key * }
+      if$
+    }
+    { format.crossref.editor * }
+  if$
+  " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+  editor field.or.null author field.or.null =
+  or
+    { key empty$
+	{ booktitle empty$
+	    { "need editor, key, or booktitle for " cite$ * " to crossref " *
+	      crossref * warning$
+	      ""
+	    }
+	    { "In {\em " booktitle * "\/}" * }
+	  if$
+	}
+	{ "In " key * }
+      if$
+    }
+    { "In " format.crossref.editor * }
+  if$
+  " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { journal emphasize "journal" output.check
+      format.vol.num.pages output
+      format.date "year" output.check
+    }
+    { format.article.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  format.eprint	output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check }
+    { format.authors output.nonnull
+      crossref missing$
+	{ "author and editor" editor either.or.check }
+	'skip$
+      if$
+    }
+  if$
+  new.block
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+      new.block
+      format.number.series output
+      new.sentence
+      publisher "publisher" output.check
+      address output
+    }
+    { new.block
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.edition output
+  format.date "year" output.check
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+  format.authors output
+  new.block
+  format.title "title" output.check
+  howpublished address new.block.checkb
+  howpublished output
+  address output
+  format.date output
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check }
+    { format.authors output.nonnull
+      crossref missing$
+	{ "author and editor" editor either.or.check }
+	'skip$
+      if$
+    }
+  if$
+  new.block
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+      format.chapter.pages "chapter and pages" output.check
+      new.block
+      format.number.series output
+      new.sentence
+      publisher "publisher" output.check
+      address output
+    }
+    { format.chapter.pages "chapter and pages" output.check
+      new.block
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.edition output
+  format.date "year" output.check
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { format.in.ed.booktitle "booktitle" output.check
+      format.bvolume output
+      format.number.series output
+      format.chapter.pages output
+      new.sentence
+      publisher "publisher" output.check
+      address output
+      format.edition output
+      format.date "year" output.check
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.chapter.pages output
+    }
+  if$
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {inproceedings}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.title "title" output.check
+  new.block
+  crossref missing$
+    { format.in.ed.booktitle "booktitle" output.check
+      format.bvolume output
+      format.number.series output
+      format.pages output
+      address empty$
+	{ organization publisher new.sentence.checkb
+	  organization output
+	  publisher output
+	  format.date "year" output.check
+	}
+	{ address output.nonnull
+	  format.date "year" output.check
+	  new.sentence
+	  organization output
+	  publisher output
+	}
+      if$
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {conference} { inproceedings }
+
+FUNCTION {manual}
+{ output.bibitem
+  author empty$
+    { organization empty$
+	'skip$
+	{ organization output.nonnull
+	  address output
+	}
+      if$
+    }
+    { format.authors output.nonnull }
+  if$
+  new.block
+  format.btitle "title" output.check
+  author empty$
+    { organization empty$
+	{ address new.block.checka
+	  address output
+	}
+	'skip$
+      if$
+    }
+    { organization address new.block.checkb
+      organization output
+      address output
+    }
+  if$
+  format.edition output
+  format.date output
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.title "title" output.check
+  new.block
+  "Master's thesis" format.thesis.type output.nonnull
+  school "school" output.check
+  address output
+  format.date "year" output.check
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+  format.authors output
+  title howpublished new.block.checkb
+  format.title output
+  howpublished new.block.checka
+  howpublished output
+  format.date output
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+  empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.btitle "title" output.check
+  new.block
+  "PhD thesis" format.thesis.type output.nonnull
+  school "school" output.check
+  address output
+  format.date "year" output.check
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+  editor empty$
+    { organization output }
+    { format.editors output.nonnull }
+  if$
+  new.block
+  format.btitle "title" output.check
+  format.bvolume output
+  format.number.series output
+  address empty$
+    { editor empty$
+	{ publisher new.sentence.checka }
+	{ organization publisher new.sentence.checkb
+	  organization output
+	}
+      if$
+      publisher output
+      format.date "year" output.check
+    }
+    { address output.nonnull
+      format.date "year" output.check
+      new.sentence
+      editor empty$
+	'skip$
+	{ organization output }
+      if$
+      publisher output
+    }
+  if$
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.title "title" output.check
+  new.block
+  format.tr.number output.nonnull
+  institution "institution" output.check
+  address output
+  format.date "year" output.check
+  format.eprint output
+  new.block
+  note output
+  fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+  format.authors "author" output.check
+  new.block
+  format.title "title" output.check
+  new.block
+  note "note" output.check
+  format.date output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+READ
+
+FUNCTION {sortify}
+{ purify$
+  "l" change.case$
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+  'len :=
+  s #1 len substring$ =
+    { s len #1 + global.max$ substring$ }
+    's
+  if$
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+  #1 'nameptr :=
+  ""
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { nameptr #1 >
+	{ "   " * }
+	'skip$
+      if$
+      s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
+      nameptr numnames = t "others" = and
+	{ "et al" * }
+	{ t sortify * }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+  "A " #2
+    "An " #3
+      "The " #4 t chop.word
+    chop.word
+  chop.word
+  sortify
+  #1 global.max$ substring$
+}
+
+FUNCTION {author.sort}
+{ author empty$
+    { key empty$
+	{ "to sort, need author or key in " cite$ * warning$
+	  ""
+	}
+	{ key sortify }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+
+FUNCTION {author.editor.sort}
+{ author empty$
+    { editor empty$
+	{ key empty$
+	    { "to sort, need author, editor, or key in " cite$ * warning$
+	      ""
+	    }
+	    { key sortify }
+	  if$
+	}
+	{ editor sort.format.names }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+
+FUNCTION {author.organization.sort}
+{ author empty$
+    { organization empty$
+	{ key empty$
+	    { "to sort, need author, organization, or key in " cite$ * warning$
+	      ""
+	    }
+	    { key sortify }
+	  if$
+	}
+	{ "The " #4 organization chop.word sortify }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+
+FUNCTION {editor.organization.sort}
+{ editor empty$
+    { organization empty$
+	{ key empty$
+	    { "to sort, need editor, organization, or key in " cite$ * warning$
+	      ""
+	    }
+	    { key sortify }
+	  if$
+	}
+	{ "The " #4 organization chop.word sortify }
+      if$
+    }
+    { editor sort.format.names }
+  if$
+}
+
+FUNCTION {presort}
+{ type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.sort
+    { type$ "proceedings" =
+	'editor.organization.sort
+	{ type$ "manual" =
+	    'author.organization.sort
+	    'author.sort
+	  if$
+	}
+      if$
+    }
+  if$
+  "    "
+  *
+  year field.or.null sortify
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+
+ITERATE {presort}
+
+SORT
+
+STRINGS { longest.label }
+
+INTEGERS { number.label longest.label.width }
+
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+  #1 'number.label :=
+  #0 'longest.label.width :=
+}
+
+FUNCTION {longest.label.pass}
+{ number.label int.to.str$ 'label :=
+  number.label #1 + 'number.label :=
+  label width$ longest.label.width >
+    { label 'longest.label :=
+      label width$ 'longest.label.width :=
+    }
+    'skip$
+  if$
+}
+
+EXECUTE {initialize.longest.label}
+
+ITERATE {longest.label.pass}
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+    'skip$
+    { preamble$ write$ newline$ }
+  if$
+  "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+  "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}
diff --git a/debian/adhoc/examples/tutorial/3x4x6-K_2_3.mod b/debian/adhoc/examples/tutorial/3x4x6-K_2_3.mod
new file mode 100644
index 0000000..b4b8f20
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/3x4x6-K_2_3.mod
@@ -0,0 +1,9 @@
+5
+2 2 2 2 2
+6
+2 1 3
+2 1 4
+2 1 5
+2 2 3
+2 2 4
+2 2 5
diff --git a/debian/adhoc/examples/tutorial/3x4x6.mod b/debian/adhoc/examples/tutorial/3x4x6.mod
new file mode 100644
index 0000000..b899583
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/3x4x6.mod
@@ -0,0 +1,6 @@
+3
+3 4 6
+3
+2 1 2
+2 2 3
+2 3 1
diff --git a/debian/adhoc/examples/tutorial/3x6.mod b/debian/adhoc/examples/tutorial/3x6.mod
new file mode 100644
index 0000000..95d77fb
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/3x6.mod
@@ -0,0 +1,5 @@
+3
+3 6
+2
+1 1
+1 2
diff --git a/debian/adhoc/examples/tutorial/4coins.cost b/debian/adhoc/examples/tutorial/4coins.cost
new file mode 100644
index 0000000..3ad342e
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/4coins.cost
@@ -0,0 +1,2 @@
+1 4
+ 0  1  0  1
diff --git a/debian/adhoc/examples/tutorial/4coins.mat b/debian/adhoc/examples/tutorial/4coins.mat
new file mode 100644
index 0000000..c51dd6b
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/4coins.mat
@@ -0,0 +1,3 @@
+2 4
+ 1  1   1   1
+ 1  5  10  25
diff --git a/debian/adhoc/examples/tutorial/4coins.rhs b/debian/adhoc/examples/tutorial/4coins.rhs
new file mode 100644
index 0000000..92aedf3
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/4coins.rhs
@@ -0,0 +1,2 @@
+1 2
+ 11  99
diff --git a/debian/adhoc/examples/tutorial/4coins.sign b/debian/adhoc/examples/tutorial/4coins.sign
new file mode 100644
index 0000000..c6947a8
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/4coins.sign
@@ -0,0 +1,2 @@
+1 4
+ 1  1  1  1
diff --git a/debian/adhoc/examples/tutorial/4coins.zfeas b/debian/adhoc/examples/tutorial/4coins.zfeas
new file mode 100644
index 0000000..2c93448
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/4coins.zfeas
@@ -0,0 +1,2 @@
+1 4
+ 4  4  0  3
diff --git a/debian/adhoc/examples/tutorial/4x4.mat b/debian/adhoc/examples/tutorial/4x4.mat
new file mode 100644
index 0000000..c749d57
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/4x4.mat
@@ -0,0 +1,9 @@
+8 16
+1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
+0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
+1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
+0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0
+0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0
+0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
diff --git a/debian/adhoc/examples/tutorial/magic3x3.mat b/debian/adhoc/examples/tutorial/magic3x3.mat
new file mode 100644
index 0000000..36bfc45
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/magic3x3.mat
@@ -0,0 +1,8 @@
+ 7 9
+ 1 1 1 -1 -1 -1  0  0  0
+ 1 1 1  0  0  0 -1 -1 -1
+ 0 1 1 -1  0  0 -1  0  0
+ 1 0 1  0 -1  0  0 -1  0
+ 1 1 0  0  0 -1  0  0 -1
+ 0 1 1  0 -1  0  0  0 -1
+ 1 1 0  0 -1  0 -1  0  0
diff --git a/debian/adhoc/examples/tutorial/ppi3.mat b/debian/adhoc/examples/tutorial/ppi3.mat
new file mode 100644
index 0000000..1d196e2
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/ppi3.mat
@@ -0,0 +1,2 @@
+1 3
+1 2 3
diff --git a/debian/adhoc/examples/tutorial/qsystem.mat b/debian/adhoc/examples/tutorial/qsystem.mat
new file mode 100644
index 0000000..d4cedb1
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/qsystem.mat
@@ -0,0 +1,4 @@
+3 2
+ 1 -1
+-3  1
+ 1  1
diff --git a/debian/adhoc/examples/tutorial/qsystem.rel b/debian/adhoc/examples/tutorial/qsystem.rel
new file mode 100644
index 0000000..fc9548c
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/qsystem.rel
@@ -0,0 +1,2 @@
+1 3
+ < < >
diff --git a/debian/adhoc/examples/tutorial/qsystem.rhs b/debian/adhoc/examples/tutorial/qsystem.rhs
new file mode 100644
index 0000000..f99b661
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/qsystem.rhs
@@ -0,0 +1,2 @@
+1 3
+ 2  1  1
diff --git a/debian/adhoc/examples/tutorial/qsystem.sign b/debian/adhoc/examples/tutorial/qsystem.sign
new file mode 100644
index 0000000..5f99e0b
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/qsystem.sign
@@ -0,0 +1,2 @@
+1 2
+ 0  1
diff --git a/debian/adhoc/examples/tutorial/zsystem.mat b/debian/adhoc/examples/tutorial/zsystem.mat
new file mode 120000
index 0000000..996d90d
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/zsystem.mat
@@ -0,0 +1 @@
+qsystem.mat
\ No newline at end of file
diff --git a/debian/adhoc/examples/tutorial/zsystem.rel b/debian/adhoc/examples/tutorial/zsystem.rel
new file mode 100644
index 0000000..93159c7
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/zsystem.rel
@@ -0,0 +1,2 @@
+1 3
+ < < =
diff --git a/debian/adhoc/examples/tutorial/zsystem.rhs b/debian/adhoc/examples/tutorial/zsystem.rhs
new file mode 120000
index 0000000..4d534d8
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/zsystem.rhs
@@ -0,0 +1 @@
+qsystem.rhs
\ No newline at end of file
diff --git a/debian/adhoc/examples/tutorial/zsystem.sign b/debian/adhoc/examples/tutorial/zsystem.sign
new file mode 120000
index 0000000..f8f4740
--- /dev/null
+++ b/debian/adhoc/examples/tutorial/zsystem.sign
@@ -0,0 +1 @@
+qsystem.sign
\ No newline at end of file
diff --git a/debian/adhoc/examples/www/333.mod b/debian/adhoc/examples/www/333.mod
new file mode 100644
index 0000000..f2f0ac3
--- /dev/null
+++ b/debian/adhoc/examples/www/333.mod
@@ -0,0 +1,6 @@
+3
+3 3 3
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/334.mod b/debian/adhoc/examples/www/334.mod
new file mode 100644
index 0000000..1488fa2
--- /dev/null
+++ b/debian/adhoc/examples/www/334.mod
@@ -0,0 +1,6 @@
+3
+3 3 4
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/335.mod b/debian/adhoc/examples/www/335.mod
new file mode 100644
index 0000000..3025996
--- /dev/null
+++ b/debian/adhoc/examples/www/335.mod
@@ -0,0 +1,6 @@
+3
+3 3 5
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/344.mod b/debian/adhoc/examples/www/344.mod
new file mode 100644
index 0000000..88d75ca
--- /dev/null
+++ b/debian/adhoc/examples/www/344.mod
@@ -0,0 +1,6 @@
+3
+3 4 4
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/345.mod b/debian/adhoc/examples/www/345.mod
new file mode 100644
index 0000000..9a92deb
--- /dev/null
+++ b/debian/adhoc/examples/www/345.mod
@@ -0,0 +1,6 @@
+3
+3 4 5
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/355.mod b/debian/adhoc/examples/www/355.mod
new file mode 100644
index 0000000..4b46c7d
--- /dev/null
+++ b/debian/adhoc/examples/www/355.mod
@@ -0,0 +1,6 @@
+3
+3 5 5
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/444.mod b/debian/adhoc/examples/www/444.mod
new file mode 100644
index 0000000..33edab6
--- /dev/null
+++ b/debian/adhoc/examples/www/444.mod
@@ -0,0 +1,6 @@
+3
+4 4 4
+3
+2 1 2
+2 1 3
+2 2 3
diff --git a/debian/adhoc/examples/www/magic3x3.mat b/debian/adhoc/examples/www/magic3x3.mat
new file mode 100644
index 0000000..4064d91
--- /dev/null
+++ b/debian/adhoc/examples/www/magic3x3.mat
@@ -0,0 +1,8 @@
+7 9
+1 1 1 -1 -1 -1  0  0  0
+1 1 1  0  0  0 -1 -1 -1
+0 1 1 -1  0  0 -1  0  0
+1 0 1  0 -1  0  0 -1  0
+1 1 0  0  0 -1  0  0 -1
+0 1 1  0 -1  0  0  0 -1
+1 1 0  0 -1  0 -1  0  0
diff --git a/debian/adhoc/examples/www/magic4x4.mat b/debian/adhoc/examples/www/magic4x4.mat
new file mode 100644
index 0000000..451f5ab
--- /dev/null
+++ b/debian/adhoc/examples/www/magic4x4.mat
@@ -0,0 +1,10 @@
+9 16
+1 1 1 1 -1 -1 -1 -1  0  0  0  0  0  0  0  0 
+1 1 1 1  0  0  0  0 -1 -1 -1 -1  0  0  0  0 
+1 1 1 1  0  0  0  0  0  0  0  0 -1 -1 -1 -1 
+0 1 1 1 -1  0  0  0 -1  0  0  0 -1  0  0  0 
+1 0 1 1  0 -1  0  0  0 -1  0  0  0 -1  0  0 
+1 1 0 1  0  0 -1  0  0  0 -1  0  0  0 -1  0 
+1 1 1 0  0  0  0 -1  0  0  0 -1  0  0  0 -1 
+0 1 1 1  0 -1  0  0  0  0 -1  0  0  0  0 -1 
+1 1 1 0  0  0 -1  0  0 -1  0  0 -1  0  0  0 
diff --git a/debian/adhoc/examples/www/magic5x5.mat b/debian/adhoc/examples/www/magic5x5.mat
new file mode 100644
index 0000000..ea5d7a1
--- /dev/null
+++ b/debian/adhoc/examples/www/magic5x5.mat
@@ -0,0 +1,12 @@
+11 25
+1 1 1 1 1 -1 -1 -1 -1 -1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 
+1 1 1 1 1  0  0  0  0  0 -1 -1 -1 -1 -1  0  0  0  0  0  0  0  0  0  0 
+1 1 1 1 1  0  0  0  0  0  0  0  0  0  0 -1 -1 -1 -1 -1  0  0  0  0  0 
+1 1 1 1 1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 -1 -1 -1 -1 -1 
+0 1 1 1 1 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 
+1 0 1 1 1  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0 
+1 1 0 1 1  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0 
+1 1 1 0 1  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0 
+1 1 1 1 0  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1 
+0 1 1 1 1  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1 
+1 1 1 1 0  0  0  0 -1  0  0  0 -1  0  0  0 -1  0  0  0 -1  0  0  0  0 
diff --git a/debian/adhoc/examples/www/magic6x6.mat b/debian/adhoc/examples/www/magic6x6.mat
new file mode 100644
index 0000000..e39bfc5
--- /dev/null
+++ b/debian/adhoc/examples/www/magic6x6.mat
@@ -0,0 +1,14 @@
+13 36
+1 1 1 1 1 1 -1 -1 -1 -1 -1 -1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 
+1 1 1 1 1 1  0  0  0  0  0  0 -1 -1 -1 -1 -1 -1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 
+1 1 1 1 1 1  0  0  0  0  0  0  0  0  0  0  0  0 -1 -1 -1 -1 -1 -1  0  0  0  0  0  0  0  0  0  0  0  0 
+1 1 1 1 1 1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 -1 -1 -1 -1 -1 -1  0  0  0  0  0  0 
+1 1 1 1 1 1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 -1 -1 -1 -1 -1 -1 
+0 1 1 1 1 1 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 
+1 0 1 1 1 1  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0 
+1 1 0 1 1 1  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0 
+1 1 1 0 1 1  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0 
+1 1 1 1 0 1  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0 
+1 1 1 1 1 0  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1  0  0  0  0  0 -1 
+0 1 1 1 1 1  0 -1  0  0  0  0  0  0 -1  0  0  0  0  0  0 -1  0  0  0  0  0  0 -1  0  0  0  0  0  0 -1 
+1 1 1 1 1 0  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0 -1  0  0  0  0  0 
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..3451a4c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,38 @@
+4ti2 (1.6.2+ds-1) unstable; urgency=medium
+
+  * Initial release. (Closes: #769997)
+  * Debianization:
+    - debian/copyright in DEP-5 format;
+    - debian/control:
+      - debhelper build-dep to >= 9;
+      - Standards Version 3.9.6;
+      - Vcs-* headers.
+    - debian/source, format 3.0 (quilt);
+    - build-arch/build-indep scheme, implement;
+    - debian/patches/ patches:
+      - in DEP-3 format;
+      - de-gnulib-rarianization;
+      - prepend 4ti2- to the name of the 4ti2 tools;
+      - enforce the implicitly private shared scheme already present
+        in the upstream source (what implicitly discard any development
+        material);
+      - make 4ti2{int32,int64,gmp} private wrt the private shared scheme;
+    - debian/watch file;
+    - debian/repack, repack script to clean up and gain weight;
+    - debian/rules:
+      - out of source building scheme to please git-buildpackage, please;
+      - autoreconf-iguration;
+      - full 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;
+    - default presicion set to arbitrary (gmp);
+    - manpage wrt to available but uncomplete upstream documentation, create;
+    - gpg-signature check support, neutralize;
+    - BibTeX bibliography, reverse by hand;
+    - `plain' BibTeX STyle with hypertex support, grab by hand;
+    - tutorial and WWW samples, provide.
+  * Fixes have been submitted to the upstream maintainers.
+
+ -- Jerome Benoit <calculus at rezozer.net>  Tue, 09 Dec 2014 23:04:26 +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..825ce23
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: 4ti2
+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, autoconf-archive, dh-autoreconf, libtool,
+ libgmp-dev,
+ libglpk-dev
+Build-Depends-Indep:
+ texlive-latex-base, texlive-latex-recommended, texlive-pictures
+Standards-Version: 3.9.6
+Homepage: http://www.4ti2.de/
+Vcs-Git: git://anonscm.debian.org/debian-science/packages/4ti2.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/4ti2.git
+
+Package: 4ti2
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: 4ti2-doc
+Description: mathematical tool suite for problems on linear spaces -- tools
+ 4ti2 is a mathematical software package for algebraic, geometric
+ and combinatorial problems on linear spaces.
+ .
+ This package provides the 4ti2 tool suite.
+
+Package: 4ti2-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Suggests: 4ti2 (=${binary:Version}), pdf-viewer
+Multi-Arch: foreign
+Description: mathematical tool suite for problems on linear spaces -- user guide
+ 4ti2 is a mathematical software package for algebraic, geometric
+ and combinatorial problems on linear spaces.
+ .
+ This package provides the user guide for the 4ti2 tool suite;
+ it also contains examples.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..d9ae9ac
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,65 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
+Upstream-Name: 4ti2
+Upstream-Contact: 4ti2 team
+Source: http://www.4ti2.de/
+Comment:
+ The upstream source tarball is repacked to drop off the regenerated material
+ (mainly gnulib, autotools and documentation related) to gain substantial weight.
+
+Files: *
+Copyright:
+ 2006-2013 the 4ti2 team
+   Ralf Hemmecke
+   Raymond Hemmecke
+   Matthias Koeppe
+   Peter Malkin
+   Matthias Walter
+License: GPL-2+
+
+Files: debian/*
+Copyright:
+ 2014 Jerome Benoit <calculus at rezozer.net>
+License: GPL-2+
+
+Files: debian/adhoc/examples/tutorial/*
+Copyright:
+ 2014 Jerome Benoit <calculus at rezozer.net>
+License: public-domain
+ These files are public domain and are not licensed under any copyright.
+
+Files: debian/adhoc/examples/www/*
+Copyright:
+ 2006-2013 the 4ti2 team
+License: public-domain
+ These files are public domain and are not licensed under any copyright.
+Comment:
+ These data files belong to the `example files' collection available at
+ http://www.4ti2.de/; they were grabbed as-is by hand and eventually renamed
+ to reflect the naming scheme used in ``User's Guide for 4ti2''.
+
+Files: debian/adhoc/doc/hplain.bst
+Copyright:
+ 1997 arXiv admin
+License: public-domain
+ This file is public domain and is not licensed under any copyright.
+Comment:
+ This BibTeX STyle file belongs to the bibstyles collection ball available
+ at http://arxiv.org/hypertex/bibstyles/ at the time of writing; it was
+ extracted as-is by hand.
+
+License: GPL-2+
+ 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 2 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 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/man/4ti2.1 b/debian/man/4ti2.1
new file mode 100644
index 0000000..5d3e583
--- /dev/null
+++ b/debian/man/4ti2.1
@@ -0,0 +1,85 @@
+.TH 4TI2 1 "November 2014" "Debian"
+.SH NAME
+4ti2 \- software package for algebraic, geometric and combinatorial problems on linear spaces
+.SH SYNOPSIS
+.B 4ti2-circuits
+.br
+.B 4ti2-genmodel [--quiet]
+.I foo.mod
+.br
+.B 4ti2-gensymm [--quiet] a b c d
+.I foo
+.br
+.B 4ti2-graver [--quiet]
+.I foo[|.mat|.lat]
+.br
+.B 4ti2-groebner [--quiet|-q] [--force|-f] [--saturation|-s] [--project-and-lift|-p] [--normal|-n] [--weighted|-w] [--gebauer-moeller|-g] [--auto-reduce-freq=N|-aN]
+.I foo
+.br
+.B 4ti2-hilbert [--quiet]
+.I foo
+.br
+.B 4ti2-markov [--quiet|-q]
+.I foo
+.br
+.B 4ti2-minimize [--quiet|-q]
+.I foo
+.br
+.B 4ti2-normalform
+.br
+.B 4ti2-output [--quiet] [--binomials] [--maple] [--0-1] [--transpose] [--degree [N]] [--positive] [--3way a b c]
+.I foo
+.br
+.B 4ti2-ppi
+.br
+.B 4ti2-qsolve
+.br
+.B 4ti2-rays
+.br
+.B 4ti2-walk
+.br
+.B 4ti2-zbasis
+.br
+.B 4ti2-zsolve
+.br
+.SH DESCRIPTION
+The software package 4ti2 is a suite of command-line tools for
+addressing algebraic, geometric and combinatorial problems on linear spaces.
+.SH DATA STRUCTURE
+The main concept of 4ti2 remains the same: a project is defined via a file
+.I foo[.mat]
+containing the problem matrix.
+Related sets such as Graver basis or Markov basis are put into
+.I foo.gra
+and
+.IR foo.mar ,
+respectively.
+
+Input files and output files usually contain a matrix or a list of vectors (written as a matrix) in a standard encoding
+such as
+.nf
+  2 4
+  1 1 1 1
+  1 2 3 4
+.fi
+
+There are only few exceptions, for example in a file
+.I foo.vars
+containing user specified variable names:
+.nf
+  3
+  a b x
+.fi
+.SH SEE ALSO
+.nf
+User's Guide for 4ti2
+http://www.4ti2.de/
+.fi
+.SH AUTHORS
+.nf
+Ralf Hemmecke
+Raymond Hemmecke
+Matthias Koeppe
+Peter Malkin
+Matthias Walter
+.fi
diff --git a/debian/patches/debianization-documentation.patch b/debian/patches/debianization-documentation.patch
new file mode 100644
index 0000000..ca803b1
--- /dev/null
+++ b/debian/patches/debianization-documentation.patch
@@ -0,0 +1,51 @@
+Description: debianization: documentation
+ Address Debian Policy requirements for documentation;
+ in particular silently regenerate the documentation
+ in native PDF format.
+ This is a Debian centric patch.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -1,7 +1,28 @@
++export TEXINPUTS = $(abs_top_srcdir)/doc:
++export BIBINPUTS = $(abs_top_srcdir)/debian/adhoc/doc
++export BSTINPUTS = $(BIBINPUTS)
++
++BIBTEX = bibtex
++PDFLATEX = pdflatex
++
+ docdir = $(pkgdatadir)/doc
+ 
+ doc_DATA = 4ti2_manual.pdf
+ 
++PDFLATEX_FLAGS = \
++	-no-shell-escape \
++	-interaction=batchmode
++
++BIBTEX_FLAGS = \
++	-terse
++
++4ti2_manual.pdf: 4ti2_manual.tex
++	$(PDFLATEX) $(PDFLATEX_FLAGS) -draftmode -jobname $(basename $(<F))-debian $<
++	$(BIBTEX) $(BIBTEX_FLAGS) $(basename $(<F))-debian
++	$(PDFLATEX) $(PDFLATEX_FLAGS) -draftmode -jobname $(basename $(<F))-debian $<
++	$(PDFLATEX) $(PDFLATEX_FLAGS) -jobname $(basename $(<F))-debian $<
++	mv $(basename $(<F))-debian.pdf $@
++
+ EXTRA_DIST =					\
+ 	3by3magic.eps				\
+ 	4ti2_manual.aux				\
+--- a/doc/4ti2_manual.tex
++++ b/doc/4ti2_manual.tex
+@@ -147,7 +147,7 @@
+ 
+ \clearpage
+ \addcontentsline{toc}{chapter}{Bibliography}
+-\bibliographystyle{plain}
++\bibliographystyle{hplain}
+ \bibliography{4ti2_manual}
+ 
+ \clearpage
diff --git a/debian/patches/debianization-prefix.patch b/debian/patches/debianization-prefix.patch
new file mode 100644
index 0000000..017ef25
--- /dev/null
+++ b/debian/patches/debianization-prefix.patch
@@ -0,0 +1,449 @@
+Description: debianization: 4ti2 tool suite prefix
+ Prepend 4ti2- to the names of the 4ti2 tools for preventing
+ from possible collisions.
+ This is a Debian centric patch.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/src/groebner/Makefile.am
++++ b/src/groebner/Makefile.am
+@@ -256,7 +256,7 @@
+ 	walk_main.h				\
+ 	zbasis_main.h
+ 
+-WRAPPERSCRIPTS =				\
++listof_function_WRAPPERSCRIPTS = \
+ 	circuits				\
+ 	groebner				\
+ 	markov					\
+@@ -267,6 +267,8 @@
+ 	walk					\
+ 	zbasis
+ 
++WRAPPERSCRIPTS = $(addprefix 4ti2-, $(listof_function_WRAPPERSCRIPTS))
++
+ nodist_bin_SCRIPTS = $(WRAPPERSCRIPTS)
+ DISTCLEANFILES = $(WRAPPERSCRIPTS)
+ 
+--- a/src/groebner/script.template.in
++++ b/src/groebner/script.template.in
+@@ -24,9 +24,12 @@
+ PKGLIBDIR=@libdir@/@PACKAGE@
+ 
+ # We locate where this script is so we can call the executables.
+-SCRIPT=`which "$0"`
+-SCRIPTDIR=`dirname "$SCRIPT"`
+-FUNCTION=`basename "$SCRIPT"`
++SCRIPT=${0}
++SCRIPTDIR=${SCRIPT%/*}
++
++# We deduce the function from the script name.
++FUNCTION=${SCRIPT##*/}
++FUNCTION=${FUNCTION#4ti2-}
+ 
+ # The default executable.
+ EXECUTABLE=@GROEBNER_DEFAULT_EXECUTABLE@
+@@ -34,7 +37,7 @@
+ # We look for options on the command line which indicate the level of precision
+ # required and we call the appropriate 4ti2 executable according to the required
+ # precision level. The short option is `-p' and the long option is
+-# `--precision', and the argument to either is one of 32, 64, or `arbitrary'.  
++# `--precision', and the argument to either is one of 32, 64, or `arbitrary'.
+ # The following regular expressions are not exactly correct since for example
+ # they allow misspellings of precision. However, they will match correctly
+ # formatted input and if the option is incorrectly formatted, the actual
+--- a/test/circuits/Makefile.am
++++ b/test/circuits/Makefile.am
+@@ -6,7 +6,7 @@
+ 	44 44.cir.chk
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/groebner/circuits -q -m
+-	@../check.template $(srcdir) "" src/groebner/circuits -q -s
++	@../check.template $(srcdir) "" src/groebner/4ti2-circuits -q -m
++	@../check.template $(srcdir) "" src/groebner/4ti2-circuits -q -s
+ 
+ CLEANFILES = .num_failures
+--- a/test/minimize/Makefile.am
++++ b/test/minimize/Makefile.am
+@@ -7,6 +7,6 @@
+ 	grin10900.5 grin10900.5.cost grin10900.5.mar grin10900.5.min.chk grin10900.5.opt grin10900.5.zsol
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/groebner/minimize -q
++	@../check.template $(srcdir) "" src/groebner/4ti2-minimize -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/groebner/Makefile.am
++++ b/test/groebner/Makefile.am
+@@ -25,11 +25,11 @@
+ 	grin10900.5 grin10900.5.cost grin10900.5.mar grin10900.5.zsol
+ 
+ 
+-check-fifo: 
+-	@../check.template $(srcdir) "-fifo" src/groebner/groebner -q -afifo
++check-fifo:
++	@../check.template $(srcdir) "-fifo" src/groebner/4ti2-groebner -q -afifo
+ 
+ check-weighted:
+-	@../check.template $(srcdir) "-weighted" src/groebner/groebner -q -aweighted
++	@../check.template $(srcdir) "-weighted" src/groebner/4ti2-groebner -q -aweighted
+ 
+ check-local: check-fifo check-weighted
+ 	@../flavorsum "-fifo" "-weighted"
+--- a/test/markov/Makefile.am
++++ b/test/markov/Makefile.am
+@@ -31,10 +31,10 @@
+ 	normalize-bug.lat normalize-bug.mar.chk
+ 
+ check-hybrid:
+-	@../check.template $(srcdir) "-hybrid" src/groebner/markov -q -ghybrid
++	@../check.template $(srcdir) "-hybrid" src/groebner/4ti2-markov -q -ghybrid
+ 
+ check-project-and-lift:
+-	@../check.template $(srcdir) "-project-and-lift" src/groebner/markov -q -gproject-and-lift
++	@../check.template $(srcdir) "-project-and-lift" src/groebner/4ti2-markov -q -gproject-and-lift
+ 
+ check-local: check-hybrid check-project-and-lift
+ 	@../flavorsum "-hybrid" "-project-and-lift"
+--- a/test/normalform/Makefile.am
++++ b/test/normalform/Makefile.am
+@@ -2,6 +2,6 @@
+ 	grin grin.cost grin.feas grin.gro grin.nf.chk
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/groebner/normalform -q 
++	@../check.template $(srcdir) "" src/groebner/4ti2-normalform -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/qsolve/Makefile.am
++++ b/test/qsolve/Makefile.am
+@@ -24,10 +24,10 @@
+ 	subspace2 subspace2.qfree.chk subspace2.qhom.chk subspace2.sign
+ 
+ check-maxcutoff:
+-	@../check.template $(srcdir) "-maxcutoff" src/groebner/qsolve -q -m -o maxcutoff
++	@../check.template $(srcdir) "-maxcutoff" src/groebner/4ti2-qsolve -q -m -o maxcutoff
+ 
+ check-maxinter:
+-	@../check.template $(srcdir) "-maxinter" src/groebner/qsolve -q -s -o maxinter 
++	@../check.template $(srcdir) "-maxinter" src/groebner/4ti2-qsolve -q -s -o maxinter
+ 
+ check-local: check-maxcutoff check-maxinter
+ 	@../flavorsum "-maxcutoff" "-maxinter"
+--- a/test/rays/Makefile.am
++++ b/test/rays/Makefile.am
+@@ -12,10 +12,10 @@
+ 	subspace2 subspace2.qfree.chk subspace2.ray.chk subspace2.sign
+ 
+ check-m:
+-	@../check.template $(srcdir) "-m" src/groebner/rays -q -m 
++	@../check.template $(srcdir) "-m" src/groebner/4ti2-rays -q -m
+ 
+ check-s:
+-	@../check.template $(srcdir) "-s" src/groebner/rays -q -s 
++	@../check.template $(srcdir) "-s" src/groebner/4ti2-rays -q -s
+ 
+ check-local: check-m check-s
+ 	@../flavorsum "-m" "-s"
+--- a/test/walk/Makefile.am
++++ b/test/walk/Makefile.am
+@@ -5,6 +5,6 @@
+ 	prob20 prob20.cost prob20.cost.start prob20.gro.chk prob20.gro.start prob20.lat prob20.sign
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/groebner/walk -q 
++	@../check.template $(srcdir) "" src/groebner/4ti2-walk -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/zbasis/Makefile.am
++++ b/test/zbasis/Makefile.am
+@@ -11,6 +11,6 @@
+ 	grin grin.lat.chk
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/groebner/zbasis -q 
++	@../check.template $(srcdir) "" src/groebner/4ti2-zbasis -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/groebner/gmp/Makefile.am
++++ b/test/groebner/gmp/Makefile.am
+@@ -6,10 +6,10 @@
+ 
+ 
+ check-fifo: 
+-	@../../check.template $(srcdir) "-fifo" src/groebner/groebner -q -p arb -afifo
++	@../../check.template $(srcdir) "-fifo" src/groebner/4ti2-groebner -q -p arb -afifo
+ 
+ check-weighted:
+-	@../../check.template $(srcdir) "-weighted" src/groebner/groebner -q -p arb -aweighted
++	@../../check.template $(srcdir) "-weighted" src/groebner/4ti2-groebner -q -p arb -aweighted
+ 
+ check-local: check-fifo check-weighted
+ 	@../../flavorsum "-fifo" "-weighted"
+--- a/test/markov/saturation/Makefile.am
++++ b/test/markov/saturation/Makefile.am
+@@ -18,6 +18,6 @@
+ 	prob20 prob20.mar.chk
+ 
+ check-local:
+-	@../../check.template $(srcdir) "" src/groebner/markov -q -gsaturation
++	@../../check.template $(srcdir) "" src/groebner/4ti2-markov -q -gsaturation
+ 
+ CLEANFILES = .num_failures
+--- a/test/markov/maxmin/Makefile.am
++++ b/test/markov/maxmin/Makefile.am
+@@ -5,6 +5,6 @@
+ 	cuww5 cuww5.mar.chk
+ 
+ check-local:
+-	@../../check.template $(srcdir) "" src/groebner/markov -q -gmax-min
++	@../../check.template $(srcdir) "" src/groebner/4ti2-markov -q -gmax-min
+ 
+ CLEANFILES = .num_failures
+--- a/test/markov/gmp/Makefile.am
++++ b/test/markov/gmp/Makefile.am
+@@ -6,10 +6,10 @@
+ 	prob06 prob06.lat prob06.mar.chk
+ 
+ check-hybrid:
+-	@../../check.template $(srcdir) "-hybrid" src/groebner/markov -q -p arb -ghybrid
++	@../../check.template $(srcdir) "-hybrid" src/groebner/4ti2-markov -q -p arb -ghybrid
+ 
+ check-project-and-lift:
+-	@../../check.template $(srcdir) "-project-and-lift" src/groebner/markov -q -p arb -gproject-and-lift
++	@../../check.template $(srcdir) "-project-and-lift" src/groebner/4ti2-markov -q -p arb -gproject-and-lift
+ 
+ check-local: check-hybrid check-project-and-lift
+ 	@../../flavorsum "-hybrid" "-project-and-lift"
+--- a/test/qsolve/gmp/Makefile.am
++++ b/test/qsolve/gmp/Makefile.am
+@@ -4,7 +4,7 @@
+ 	ppp.c ppp.c.qhom.chk ppp.c.sign
+ 
+ check-local:
+-	@../../check.template $(srcdir) "" src/groebner/qsolve -q -p arb
++	@../../check.template $(srcdir) "" src/groebner/4ti2-qsolve -q -p arb
+ 
+ CLEANFILES = .num_failures
+ 
+--- a/src/util/Makefile.am
++++ b/src/util/Makefile.am
+@@ -23,10 +23,10 @@
+ pkgliblibdir = $(pkglibdir)/lib
+ 
+ bin_PROGRAMS =					\
+-	genmodel				\
+-	gensymm					\
+-	output
+-#	normaliz_wrapper
++	4ti2-genmodel				\
++	4ti2-gensymm					\
++	4ti2-output
++#	4ti2-normaliz_wrapper
+ 
+ pkgliblib_LTLIBRARIES = lib4ti2util.la
+ 
+@@ -56,14 +56,14 @@
+ 	print.h					\
+ 	vector.h
+ 
+-genmodel_SOURCES = genmodel_main.c
+-genmodel_LDADD = lib4ti2util.la
++4ti2_genmodel_SOURCES = genmodel_main.c
++4ti2_genmodel_LDADD = lib4ti2util.la
+ 
+-gensymm_SOURCES = gensymm_main.c
+-gensymm_LDADD = lib4ti2util.la
++4ti2_gensymm_SOURCES = gensymm_main.c
++4ti2_gensymm_LDADD = lib4ti2util.la
+ 
+-output_SOURCES = output_main.c
+-output_LDADD = lib4ti2util.la
++4ti2_output_SOURCES = output_main.c
++4ti2_output_LDADD = lib4ti2util.la
+ 
+ # normaliz_wrapper_SOURCES = normaliz_wrapper.c
+ # normaliz_wrapper_LDADD = lib4ti2util.la
+--- a/test/output/binomials/Makefile.am
++++ b/test/output/binomials/Makefile.am
+@@ -2,6 +2,6 @@
+ 	cuww1.gro cuww1.gro.bin.chk cuww1.gro.vars
+ 
+ check-local:
+-	@../../check.template $(srcdir) "" src/util/output --binomials
++	@../../check.template $(srcdir) "" src/util/4ti2-output --binomials
+ 
+ CLEANFILES = .num_failures
+--- a/test/output/maple/Makefile.am
++++ b/test/output/maple/Makefile.am
+@@ -2,7 +2,7 @@
+ 	cuww1.gro cuww1.gro.maple.chk
+ 
+ check-local:
+-	@../../check.template $(srcdir) "" src/util/output --maple
++	@../../check.template $(srcdir) "" src/util/4ti2-output --maple
+ 
+ CLEANFILES = .num_failures
+ 
+--- a/test/output/positive/Makefile.am
++++ b/test/output/positive/Makefile.am
+@@ -2,6 +2,6 @@
+ 	cuww1.gro cuww1.gro.pos.chk
+ 
+ check-local:
+-	@../../check.template $(srcdir) "" src/util/output --positive
++	@../../check.template $(srcdir) "" src/util/4ti2-output --positive
+ 
+ CLEANFILES = .num_failures
+--- a/test/genmodel/Makefile.am
++++ b/test/genmodel/Makefile.am
+@@ -2,6 +2,6 @@
+ 	333.mod 333.mat.chk
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/util/genmodel -q
++	@../check.template $(srcdir) "" src/util/4ti2-genmodel -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/gensymm/Makefile.am
++++ b/test/gensymm/Makefile.am
+@@ -2,6 +2,6 @@
+ 	333.sym.chk
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/util/gensymm 3 3 3 1
++	@../check.template $(srcdir) "" src/util/4ti2-gensymm 3 3 3 1
+ 
+ CLEANFILES = .num_failures
+--- a/src/ppi/Makefile.am
++++ b/src/ppi/Makefile.am
+@@ -18,7 +18,7 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
+ 
+-bin_PROGRAMS = ppi
++bin_PROGRAMS = 4ti2-ppi
+ 
+-ppi_SOURCES = ppi.cpp
++4ti2_ppi_SOURCES = ppi.cpp
+ 
+--- a/test/ppi/Makefile.am
++++ b/test/ppi/Makefile.am
+@@ -4,6 +4,6 @@
+ 	ppi5.gra.chk
+ 
+ check-local:
+-	@./check-ppi $(srcdir) src/ppi/ppi
++	@./check-ppi $(srcdir) src/ppi/4ti2-ppi
+ 
+ CLEANFILES = .num_failures
+--- a/src/zsolve/Makefile.am
++++ b/src/zsolve/Makefile.am
+@@ -21,7 +21,7 @@
+ pkglibbindir = $(pkglibdir)/bin
+ pkgliblibdir = $(pkglibdir)/lib
+ 
+-bin_PROGRAMS = zsolve 
++bin_PROGRAMS = 4ti2-zsolve
+ 
+ pkgliblib_LTLIBRARIES = libzsolve.la
+ 
+@@ -79,27 +79,27 @@
+ #noinst_HEADERS = 
+ 
+ libzsolve_la_SOURCES = $(libzsolvesources)
+-zsolve_SOURCES = $(zsolvesources)
+-zsolve_LDADD = libzsolve.la
++4ti2_zsolve_SOURCES = $(zsolvesources)
++4ti2_zsolve_LDADD = libzsolve.la
+ libzsolve_la_CPPFLAGS =
+-zsolve_CPPFLAGS = 
++4ti2_zsolve_CPPFLAGS =
+ if HAVE_GMP_WITH_CXX
+ libzsolve_la_CPPFLAGS += ${GMP_CFLAGS}
+-zsolve_CPPFLAGS += ${GMP_CFLAGS}
+-zsolve_LDADD += ${GMP_LIBS}
++4ti2_zsolve_CPPFLAGS += ${GMP_CFLAGS}
++4ti2_zsolve_LDADD += ${GMP_LIBS}
+ endif
+ # Link in the "common" 4ti2 functions.
+ # -no-undefined declares that no undefined symbols will remain after linking all these libraries.
+ # (This is necessary to build shared libraries on Cygwin.)
+ libzsolve_la_LDFLAGS = -L../4ti2 -R$(pkgliblibdir) -l4ti2common -no-undefined -avoid-version
+ 
+-bin_SCRIPTS = hilbert graver
+-DISTCLEANFILES = hilbert graver
++bin_SCRIPTS = 4ti2-hilbert 4ti2-graver
++DISTCLEANFILES = $(bin_SCRIPTS)
+ 
+ EXTRA_DIST = hilbert.template graver.template
+ 
+-hilbert: hilbert.template
++4ti2-hilbert: hilbert.template
+ 	$(install_sh) -c -m 755 $< $@
+ 
+-graver: graver.template
++4ti2-graver: graver.template
+ 	$(install_sh) -c -m 755 $< $@
+--- a/test/hilbert/Makefile.am
++++ b/test/hilbert/Makefile.am
+@@ -11,6 +11,6 @@
+ 	zero-rows.hil.dont-chk zero-rows.mat zero-rows.sign zero-rows.zfree.dont-chk
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/zsolve/hilbert -q
++	@../check.template $(srcdir) "" src/zsolve/4ti2-hilbert -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/graver/Makefile.am
++++ b/test/graver/Makefile.am
+@@ -7,6 +7,6 @@
+ 
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/zsolve/graver -q 
++	@../check.template $(srcdir) "" src/zsolve/4ti2-graver -q
+ 
+ CLEANFILES = .num_failures
+--- a/test/zsolve/Makefile.am
++++ b/test/zsolve/Makefile.am
+@@ -13,6 +13,6 @@
+ 
+ 
+ check-local:
+-	@../check.template $(srcdir) "" src/zsolve/zsolve -q
++	@../check.template $(srcdir) "" src/zsolve/4ti2-zsolve -q
+ 
+ CLEANFILES = .num_failures
+--- a/src/zsolve/graver.template.in
++++ b/src/zsolve/graver.template.in
+@@ -5,9 +5,9 @@
+ 
+ # We locate where this script is so we can call the executable zsolve which
+ # should be in the same directory as this script.
+-SCRIPT=`which "$0"`
+-SCRIPTDIR=`dirname "$SCRIPT"`
+-EXECUTABLE=zsolve
++SCRIPT=${0}
++SCRIPTDIR=${SCRIPT%/*}
++EXECUTABLE=4ti2-zsolve
+ 
+ for DIR in "$SCRIPTDIR" "$PKGLIBDIR/bin"; do
+ 	if [ -x "$DIR/$EXECUTABLE" ]; then break; fi
+--- a/src/zsolve/hilbert.template.in
++++ b/src/zsolve/hilbert.template.in
+@@ -5,9 +5,9 @@
+ 
+ # We locate where this script is so we can call the executable zsolve which
+ # should be in the same directory as this script.
+-SCRIPT=`which "$0"`
+-SCRIPTDIR=`dirname "$SCRIPT"`
+-EXECUTABLE=zsolve
++SCRIPT=${0}
++SCRIPTDIR=${SCRIPT%/*}
++EXECUTABLE=4ti2-zsolve
+ 
+ for DIR in "$SCRIPTDIR" "$PKGLIBDIR/bin"; do
+ 	if [ -x "$DIR/$EXECUTABLE" ]; then break; fi
diff --git a/debian/patches/debianization.patch b/debian/patches/debianization.patch
new file mode 100644
index 0000000..51e5f09
--- /dev/null
+++ b/debian/patches/debianization.patch
@@ -0,0 +1,67 @@
+Description: debianization
+ Meant to maintain a minimal debian/rules, to fix warnings,
+ to address Debian specific stuff in general.
+ This is a Debian centric patch.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -103,7 +103,7 @@
+ # The reasons for the changed default is that the complexities of
+ # building shared libraries are avoided, and also that static build
+ # can result in faster code on some architectures.
+-AC_DISABLE_SHARED
++##AC_DISABLE_SHARED
+ # This triggers selection of some optimization flags (-g -O2), 
+ # so it should appear _after_ the AX_CXX_MAXOPT, AX_CC_MAXOPT calls.
+ AC_PROG_LIBTOOL
+@@ -207,7 +207,7 @@
+   CXXFLAGS="${save_CXXFLAGS}"
+ fi
+ 
+-GROEBNER_DEFAULT_EXECUTABLE=4ti2int64
++GROEBNER_DEFAULT_EXECUTABLE=4ti2gmp
+ dnl elif test -n "${GMP_HAVE_CXX}" ; then
+ dnl    GROEBNER_DEFAULT_EXECUTABLE=4ti2gmp
+ dnl else
+--- a/src/groebner/script.template.in
++++ b/src/groebner/script.template.in
+@@ -64,8 +64,4 @@
+     exit 1
+ fi
+ 
+-# We add the path $DIR to load shared libraries for the libglpk
+-# libgmp, and libgmpxx libraries.
+-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR
+-
+-"$DIR"/$EXECUTABLE $FUNCTION $@
++exec $DIR/$EXECUTABLE $FUNCTION $@
+--- a/src/zsolve/graver.template.in
++++ b/src/zsolve/graver.template.in
+@@ -21,4 +21,4 @@
+     exit 1
+ fi
+ 
+-"$DIR"/$EXECUTABLE -G $@
++exec $DIR/$EXECUTABLE -G $@
+--- a/src/zsolve/hilbert.template.in
++++ b/src/zsolve/hilbert.template.in
+@@ -21,4 +21,4 @@
+     exit 1
+ fi
+ 
+-"$DIR"/$EXECUTABLE -H $@
++exec $DIR/$EXECUTABLE -H $@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,7 +21,7 @@
+ 
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-SUBDIRS = src m4 doc test
++SUBDIRS = src m4 test #doc
+ if ENABLE_SWIG
+ SUBDIRS += swig
+ endif
diff --git a/debian/patches/degnulibrarianization.patch b/debian/patches/degnulibrarianization.patch
new file mode 100644
index 0000000..4686fad
--- /dev/null
+++ b/debian/patches/degnulibrarianization.patch
@@ -0,0 +1,43 @@
+Description: degnulibrarianization
+ Wipe out GNU Portability Library support as it only brings
+ getopt_long which is present in glibc.
+ This is a GCC centric patch.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -7,11 +7,10 @@
+ AM_INIT_AUTOMAKE(foreign)
+ AM_MAINTAINER_MODE
+ AC_CONFIG_FILES([Makefile src/Makefile src/4ti2/Makefile
+-		 src/groebner/Makefile src/util/Makefile 
++		 src/groebner/Makefile src/util/Makefile
+ 		 src/ppi/Makefile src/zsolve/Makefile
+ 		 src/fiber/Makefile
+ 		 doc/Makefile
+-		 lib/Makefile
+ 		 m4/Makefile])
+ 
+ AC_CONFIG_HEADERS([src/config.h src/4ti2/4ti2_config.h])
+@@ -64,8 +63,6 @@
+ 
+ ## Using the C compiler
+ AC_PROG_CC
+-gl_EARLY
+-gl_INIT
+ 
+ AX_COMPILER_VENDOR
+ AX_CC_MAXOPT
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,7 +21,7 @@
+ 
+ ACLOCAL_AMFLAGS = -I m4
+ 
+-SUBDIRS = src m4 lib doc test
++SUBDIRS = src m4 doc test
+ if ENABLE_SWIG
+ SUBDIRS += swig
+ endif
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a66bac0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+degnulibrarianization.patch
+upstream-doc-typo.patch
+upstream-autotoolization-shared.patch
+upstream-autotoolization-private_shared_scheme.patch
+debianization.patch
+debianization-prefix.patch
+debianization-documentation.patch
diff --git a/debian/patches/upstream-autotoolization-private_shared_scheme.patch b/debian/patches/upstream-autotoolization-private_shared_scheme.patch
new file mode 100644
index 0000000..cb45e32
--- /dev/null
+++ b/debian/patches/upstream-autotoolization-private_shared_scheme.patch
@@ -0,0 +1,271 @@
+Description: upstream autotool machinery: private share scheme
+ Enforce the implicitly private shared scheme already present.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/src/4ti2/Makefile.am
++++ b/src/4ti2/Makefile.am
+@@ -18,13 +18,16 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
+ 
++pkglibbindir = $(pkglibdir)/bin
++pkgliblibdir = $(pkglibdir)/lib
++
+ fortytwoincludedir = $(includedir)/4ti2
+ 
+ fortytwoinclude_HEADERS = 4ti2.h 4ti2xx.h 4ti2_config.h
+ 
+ BUILT_SOURCES = 4ti2_config.h
+ 
+-lib_LTLIBRARIES = lib4ti2common.la
++pkgliblib_LTLIBRARIES = lib4ti2common.la
+ 
+ # Allow accessing zsolve's header files as "zsolve/HEADER.h"
+ AM_CXXFLAGS = -I$(srcdir)/..
+@@ -36,5 +39,5 @@
+ AM_LDFLAGS = ${GMP_LIBS}
+ endif
+ 
+-lib4ti2common_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined
++lib4ti2common_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -avoid-version
+ 
+--- a/src/groebner/Makefile.am
++++ b/src/groebner/Makefile.am
+@@ -18,16 +18,18 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
+ 
+-bin_PROGRAMS = 
+-bin_PROGRAMS += 4ti2int32 4ti2int64
++pkglibbindir = $(pkglibdir)/bin
++pkgliblibdir = $(pkglibdir)/lib
++
++pkglibbin_PROGRAMS =
++pkglibbin_PROGRAMS += 4ti2int32 4ti2int64
+ if HAVE_GMP_WITH_CXX
+-bin_PROGRAMS += 4ti2gmp
++pkglibbin_PROGRAMS += 4ti2gmp
+ endif
+ 
+-lib_LTLIBRARIES = 
+-lib_LTLIBRARIES += lib4ti2int32.la lib4ti2int64.la
++pkgliblib_LTLIBRARIES = lib4ti2int32.la lib4ti2int64.la
+ if HAVE_GMP_WITH_CXX
+-lib_LTLIBRARIES += lib4ti2gmp.la
++pkgliblib_LTLIBRARIES += lib4ti2gmp.la
+ endif
+ 
+ # Allow accessing groebner's header files as "groebner/HEADER.h"
+@@ -268,7 +270,7 @@
+ nodist_bin_SCRIPTS = $(WRAPPERSCRIPTS)
+ DISTCLEANFILES = $(WRAPPERSCRIPTS)
+ 
+-AM_LDFLAGS = -L../4ti2 -R$(libdir) -l4ti2common -no-undefined
++AM_LDFLAGS = -L../4ti2 -R$(pkgliblibdir) -l4ti2common -no-undefined -avoid-version
+ 
+ # 16 bit precision flags.
+ # 4ti2int16_LDADD = lib4ti2int16.la
+--- a/src/util/Makefile.am
++++ b/src/util/Makefile.am
+@@ -19,15 +19,18 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
+ 
++pkglibbindir = $(pkglibdir)/bin
++pkgliblibdir = $(pkglibdir)/lib
++
+ bin_PROGRAMS =					\
+ 	genmodel				\
+ 	gensymm					\
+ 	output
+ #	normaliz_wrapper
+ 
+-lib_LTLIBRARIES = lib4ti2util.la
++pkgliblib_LTLIBRARIES = lib4ti2util.la
+ 
+-AM_LDFLAGS = -no-undefined
++AM_LDFLAGS = -no-undefined -avoid-version
+ 
+ # The output.c file contains C++-isms (or C99-isms), 
+ # so compile with the C++ compiler. --mkoeppe
+--- a/src/zsolve/Makefile.am
++++ b/src/zsolve/Makefile.am
+@@ -18,9 +18,12 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
+ 
++pkglibbindir = $(pkglibdir)/bin
++pkgliblibdir = $(pkglibdir)/lib
++
+ bin_PROGRAMS = zsolve 
+ 
+-lib_LTLIBRARIES = libzsolve.la
++pkgliblib_LTLIBRARIES = libzsolve.la
+ 
+ # Allow accessing zsolve's header files as "zsolve/HEADER.h"
+ AM_CXXFLAGS = -I$(srcdir)/..
+@@ -88,7 +91,7 @@
+ # Link in the "common" 4ti2 functions.
+ # -no-undefined declares that no undefined symbols will remain after linking all these libraries.
+ # (This is necessary to build shared libraries on Cygwin.)
+-libzsolve_la_LDFLAGS = -L../4ti2 -R$(libdir) -l4ti2common -no-undefined
++libzsolve_la_LDFLAGS = -L../4ti2 -R$(pkgliblibdir) -l4ti2common -no-undefined -avoid-version
+ 
+ bin_SCRIPTS = hilbert graver
+ DISTCLEANFILES = hilbert graver
+--- a/src/groebner/script.template.in
++++ b/src/groebner/script.template.in
+@@ -20,9 +20,12 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
+ 
++prefix=@prefix@
++PKGLIBDIR=@libdir@/@PACKAGE@
++
+ # We locate where this script is so we can call the executables.
+ SCRIPT=`which "$0"`
+-DIR=`dirname "$SCRIPT"`
++SCRIPTDIR=`dirname "$SCRIPT"`
+ FUNCTION=`basename "$SCRIPT"`
+ 
+ # The default executable.
+@@ -50,8 +53,12 @@
+     EXECUTABLE=4ti2gmp
+ fi
+ 
++for DIR in "$SCRIPTDIR" "$PKGLIBDIR/bin"; do
++	if [ -x "$DIR/@GROEBNER_DEFAULT_EXECUTABLE@" ]; then break; fi
++done
++
+ # We check whether the 4ti2 executable exists.
+-if [ ! -f "$DIR/$EXECUTABLE" ]
++if [ ! -x "$DIR/$EXECUTABLE" ]
+ then
+     echo "Error: Unable to find 4ti2 executable \`$EXECUTABLE'"
+     exit 1
+--- /dev/null
++++ b/src/zsolve/graver.template.in
+@@ -0,0 +1,24 @@
++#!/bin/sh
++
++prefix=@prefix@
++PKGLIBDIR=@libdir@/@PACKAGE@
++
++# We locate where this script is so we can call the executable zsolve which
++# should be in the same directory as this script.
++SCRIPT=`which "$0"`
++SCRIPTDIR=`dirname "$SCRIPT"`
++EXECUTABLE=zsolve
++
++for DIR in "$SCRIPTDIR" "$PKGLIBDIR/bin"; do
++	if [ -x "$DIR/$EXECUTABLE" ]; then break; fi
++done
++
++# Check if zsolve executable exists.
++if [ ! -f "$DIR/$EXECUTABLE" ]
++then
++    echo "Error: Unable to find the executable \`$EXECUTABLE'."
++    echo "Error: It should have been in the directory \`$DIR'."
++    exit 1
++fi
++
++"$DIR"/$EXECUTABLE -G $@
+--- /dev/null
++++ b/src/zsolve/hilbert.template.in
+@@ -0,0 +1,24 @@
++#!/bin/sh
++
++prefix=@prefix@
++PKGLIBDIR=@libdir@/@PACKAGE@
++
++# We locate where this script is so we can call the executable zsolve which
++# should be in the same directory as this script.
++SCRIPT=`which "$0"`
++SCRIPTDIR=`dirname "$SCRIPT"`
++EXECUTABLE=zsolve
++
++for DIR in "$SCRIPTDIR" "$PKGLIBDIR/bin"; do
++	if [ -x "$DIR/$EXECUTABLE" ]; then break; fi
++done
++
++# Check if zsolve executable exists.
++if [ ! -f "$DIR/$EXECUTABLE" ]
++then
++    echo "Error: Unable to find the executable \`$EXECUTABLE'."
++    echo "Error: It should have been in the directory \`$DIR'."
++    exit 1
++fi
++
++"$DIR"/$EXECUTABLE -H $@
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,6 +16,8 @@
+ AC_CONFIG_HEADERS([src/config.h src/4ti2/4ti2_config.h])
+ 
+ AC_CONFIG_FILES([src/groebner/script.template])
++AC_CONFIG_FILES([src/zsolve/graver.template])
++AC_CONFIG_FILES([src/zsolve/hilbert.template])
+ 
+ AC_CONFIG_FILES([test/Makefile])
+ AC_CONFIG_FILES([test/circuits/Makefile])
+--- a/swig/allegrocommonlisp/Makefile.am
++++ b/swig/allegrocommonlisp/Makefile.am
+@@ -19,7 +19,10 @@
+ 
+ # 4ti2 Makefile
+ 
+-lib_LTLIBRARIES=
++pkgliblibdir = $(libdir)/4ti2/lib
++pkglibswgdir = $(libdir)/4ti2/swig
++
++pkglibswg_LTLIBRARIES=
+ 
+ # Allegro Common Lisp interface
+ LISPFILES = 4ti2-package.lisp common-wrapper-macros.lisp 4ti2-base.lisp 4ti2.cl 
+@@ -32,10 +35,11 @@
+ 	4ti2.asd.in \
+ 	$(LISPFILES)
+ 
+-lib_LTLIBRARIES += liballegrocl-4ti2.la
++pkglibswg_LTLIBRARIES += liballegrocl-4ti2.la
+ liballegrocl_4ti2_la_SOURCES = allegrocl-4ti2.c
+ #liballegrocl_4ti2_la_LIBADD =
+-liballegrocl_4ti2_la_LDFLAGS = -L$(top_builddir)/../src/groebner -R$(libdir) -l4ti2int64 \
++liballegrocl_4ti2_la_LDFLAGS = \
++	-L$(top_builddir)/../src/groebner -R$(pkgliblibdir) -l4ti2int64 -no-undefined -avoid-version \
+ 	-L$(top_builddir)/../src/zsolve -lzsolve ${GMP_LIBS} \
+ 	-L$(top_builddir)/../src/4ti2 -l4ti2common
+ 
+--- a/swig/allegrocommonlisp/4ti2.asd.in
++++ b/swig/allegrocommonlisp/4ti2.asd.in
+@@ -4,7 +4,7 @@
+ #-asdf-component-shared-unix-library
+ (asdf:operate 'asdf:load-op :asdf-component-shared-unix-library)
+ 
+-;;(load "@prefix@/lib/liballegrocl-4ti2.so.0" :foreign t)
++;;(load "@PKGLIBDIR@/swig/liballegrocl-4ti2.so" :foreign t)
+ 
+ (defpackage #:4ti2.system
+   (:use #:cl
+@@ -17,7 +17,7 @@
+ (defsystem #:4ti2
+   :components (
+  	       (:shared-unix-library "liballegrocl-4ti2"
+- 				     :pathname "@prefix@/lib/liballegrocl-4ti2.so.0")
++ 				     :pathname "@PKGLIBDIR@/swig/liballegrocl-4ti2.so")
+ 	       (:file "common-wrapper-macros")
+ 	       (:file "4ti2-package" :depends-on ("common-wrapper-macros"))
+ 	       (:file "4ti2-base" :depends-on ("4ti2-package"))
+--- a/swig/configure.ac
++++ b/swig/configure.ac
+@@ -34,4 +34,8 @@
+ AM_CONDITIONAL(ENABLE_SWIG_ALLEGROCOMMONLISP, test x$enable_swig_allegrocommonlisp = xyes)
+ 
+ AC_CONFIG_FILES(allegrocommonlisp/4ti2.asd)
++
++PKGLIBDIR=$(eval echo ${libdir}/${PACKAGE%%-*})
++AC_SUBST([PKGLIBDIR])
++
+ AC_OUTPUT
diff --git a/debian/patches/upstream-autotoolization-shared.patch b/debian/patches/upstream-autotoolization-shared.patch
new file mode 100644
index 0000000..8a3cc12
--- /dev/null
+++ b/debian/patches/upstream-autotoolization-shared.patch
@@ -0,0 +1,42 @@
+Description: upstream autotool machinery: shared scheme fix
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/test/qsolve/api/Makefile.am
++++ b/test/qsolve/api/Makefile.am
+@@ -15,9 +15,17 @@
+ test_input_conversion_64_to_gmp_SOURCES = test_input_conversion_64.cpp
+ test_input_conversion_64_to_gmp_LDADD = $(top_builddir)/src/groebner/lib4ti2gmp.la $(top_builddir)/src/4ti2/lib4ti2common.la
+ 
++if HAVE_GMP_WITH_CXX
++test_input_conversion_64_to_gmp_LDADD += $(GMP_LIBS)
++endif
++
+ test_input_conversion_gmp_to_64_SOURCES = test_input_conversion_gmp.cpp
+ test_input_conversion_gmp_to_64_LDADD = $(top_builddir)/src/groebner/lib4ti2int64.la $(top_builddir)/src/4ti2/lib4ti2common.la
+ 
++if HAVE_GMP_WITH_CXX
++test_input_conversion_gmp_to_64_LDADD += $(GMP_LIBS)
++endif
++
+ TESTS = 
+ TESTS += qsolve_main 
+ #test_input_conversion_64_to_gmp.sh test_input_conversion_gmp_to_64.sh
+--- a/test/zsolve/api/Makefile.am
++++ b/test/zsolve/api/Makefile.am
+@@ -1,7 +1,7 @@
+ check_PROGRAMS = 
+ check_PROGRAMS += test_zsolve_api
+ 
+-LIBS = $(top_builddir)/src/zsolve/libzsolve.la 
++LIBS = $(top_builddir)/src/zsolve/libzsolve.la $(top_builddir)/src/4ti2/lib4ti2common.la
+ 
+ # Allow accessing groebner's header files as "groebner/HEADER.h"
+ AM_CXXFLAGS = -I$(top_srcdir)/src/
+@@ -16,4 +16,4 @@
+ TESTS =
+ TESTS += test_zsolve_api
+ 
+-$(TESTS): $(top_builddir)/src/zsolve/libzsolve.la
++$(TESTS): $(LIBS)
diff --git a/debian/patches/upstream-doc-typo.patch b/debian/patches/upstream-doc-typo.patch
new file mode 100644
index 0000000..72c92e8
--- /dev/null
+++ b/debian/patches/upstream-doc-typo.patch
@@ -0,0 +1,16 @@
+Description: upstream documentation: typo correction
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2014-11-25
+
+--- a/doc/4ti2_manual_beginner.tex
++++ b/doc/4ti2_manual_beginner.tex
+@@ -425,7 +425,7 @@
+ \hline
+     \text{ magic3x3.hil }\\
+ \hline
+-  $\begin{array}{rrrrrrrrrrr}& 4 & 9 &&&&&&&&\\
++  $\begin{array}{rrrrrrrrrrr}& 5 & 9 &&&&&&&&\\
+   & 0 & 2 & 1 & 2 & 1 & 0 & 1 & 0 & 2 & \\
+   & 1 & 2 & 0 & 0 & 1 & 2 & 2 & 0 & 1 & \\
+   & 2 & 0 & 1 & 0 & 1 & 2 & 1 & 2 & 0 & \\
diff --git a/debian/repack b/debian/repack
new file mode 100755
index 0000000..ca8e596
--- /dev/null
+++ b/debian/repack
@@ -0,0 +1,158 @@
+#!/bin/bash
+
+PACKAGE_NAME=4ti2
+
+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
+find . -name '._*' | xargs --no-run-if-empty rm --verbose --force
+rm --verbose --force -- snippet/arg-nonnull.h
+rm --verbose --force -- snippet/c++defs.h
+rm --verbose --force -- snippet/warn-on-use.h
+rmdir --verbose --ignore-fail-on-non-empty -- snippet
+rm --verbose --force -- lib/getopt1.c
+rm --verbose --force -- lib/getopt.c
+rm --verbose --force -- lib/getopt.in.h
+rm --verbose --force -- lib/getopt_int.h
+rm --verbose --force -- lib/gettext.h
+rm --verbose --force -- lib/stddef.in.h
+rm --verbose --force -- lib/sys_types.in.h
+rm --verbose --force -- lib/unistd.c
+rm --verbose --force -- lib/unistd.in.h
+rm --verbose --force -- lib/Makefile.am
+rmdir --verbose --ignore-fail-on-non-empty -- lib
+rm --verbose --force -- m4/00gnulib.m4
+rm --verbose --force -- m4/gnulib-common.m4
+rm --verbose --force -- m4/gnulib-comp.m4
+rm --verbose --force -- m4/gnulib-tool.m4
+rm --verbose --force -- m4/extensions.m4
+rm --verbose --force -- m4/extern-inline.m4
+rm --verbose --force -- m4/getopt.m4
+rm --verbose --force -- m4/include_next.m4
+rm --verbose --force -- m4/nocrash.m4
+rm --verbose --force -- m4/off_t.m4
+rm --verbose --force -- m4/onceonly.m4
+rm --verbose --force -- m4/ssize_t.m4
+rm --verbose --force -- m4/stddef_h.m4
+rm --verbose --force -- m4/sys_types_h.m4
+rm --verbose --force -- m4/trapv-check.m4
+rm --verbose --force -- m4/unistd_h.m4
+rm --verbose --force -- m4/warn-on-use.m4
+rm --verbose --force -- m4/wchar_t.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 -- test-driver
+rm --verbose --force -- depcomp
+rm --verbose --force -- compile
+rm --verbose --force -- install-sh
+rm --verbose --force -- ltmain.sh
+rm --verbose --force -- missing
+rm --verbose --force -- INSTALL
+rm --verbose --force -- config.sub
+rm --verbose --force -- config.guess
+##
+rm --verbose --force -- swig/allegrocommonlisp/4ti2.cl
+rm --verbose --force -- swig/allegrocommonlisp/allegrocl-4ti2.c
+rm --verbose --force -- src/groebner/script.template
+rm --verbose --force -- src/4ti2/4ti2_config.h
+rm --verbose --force -- src/config.h.in
+rm --verbose --force -- doc/3by3magic.eps
+rm --verbose --force -- doc/cubepicture.eps
+rm --verbose --force -- doc/magicsqs.eps
+rm --verbose --force -- doc/4ti2_manual.{aux,log,blg}
+rm --verbose --force -- doc/4ti2_manual.pdf
+find . -name 'Makefile.in' | xargs --no-run-if-empty rm --verbose --force
+rm --verbose --force -- swig/aclocal.m4
+rm --verbose --force -- swig/configure
+rm --verbose --force -- aclocal.m4
+rm --verbose --force -- configure
+#:
+
+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..96a1086
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,37 @@
+#!/usr/bin/make -f
+
+default:
+	@uscan --no-conf --dehs --report || true
+
+%:
+	dh $@ --with autoreconf --parallel
+
+override_dh_auto_configure:
+	dh_auto_configure -B _build -- --srcdir=..
+
+override_dh_auto_build-indep:
+	$(MAKE) -C _build/doc
+
+override_dh_auto_build-arch:
+	dh_auto_build -a -B _build
+
+override_dh_auto_test-indep:
+
+override_dh_auto_test-arch:
+	dh_auto_test -a -B _build
+
+override_dh_auto_install-arch:
+	dh_auto_install -a -B _build
+
+override_dh_installchangelogs:
+	dh_installchangelogs --keep NEWS
+
+override_dh_compress:
+	dh_compress -X.pdf -Xexamples
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf _build
+
+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/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..8b06cb1
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1 @@
+debian-watch-may-check-gpg-signature
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..047b1b8
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts=dversionmangle=s/\+ds// \
+http://www.4ti2.de/download_4ti2.html version_(?:\d[\d\.]*)/4ti2-(\d[\d\.]*)\.tar\.gz \
+debian bash debian/repack

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



More information about the debian-science-commits mailing list