Import stockfish_8-3.debian.tar.xz
authorMilan Zamazal <pdm@debian.org>
Sat, 12 Nov 2016 17:55:54 +0000 (17:55 +0000)
committerMilan Zamazal <pdm@debian.org>
Sat, 12 Nov 2016 17:55:54 +0000 (17:55 +0000)
[dgit import tarball stockfish 8-3 stockfish_8-3.debian.tar.xz]

15 files changed:
README.source [new file with mode: 0644]
changelog [new file with mode: 0644]
compat [new file with mode: 0644]
control [new file with mode: 0644]
copyright [new file with mode: 0644]
dirs [new file with mode: 0644]
docs [new file with mode: 0644]
engine-interface.txt [new file with mode: 0644]
install [new file with mode: 0644]
patches/cxxflags.patch [new file with mode: 0644]
patches/series [new file with mode: 0644]
rules [new file with mode: 0755]
source/format [new file with mode: 0644]
stockfish.6 [new file with mode: 0644]
watch [new file with mode: 0644]

diff --git a/README.source b/README.source
new file mode 100644 (file)
index 0000000..de95ff3
--- /dev/null
@@ -0,0 +1,3 @@
+This package uses quilt for handling any changes to the source files, 
+please refer to: /usr/share/doc/quilt/README.source for any further 
+instructions.
diff --git a/changelog b/changelog
new file mode 100644 (file)
index 0000000..adab4ec
--- /dev/null
+++ b/changelog
@@ -0,0 +1,367 @@
+stockfish (8-3) unstable; urgency=low
+
+  * Set architecture bits from dpkg-architecture.
+  * Patch to exclude -m$(bits) compiler flag; thanks to Sven Joachim.
+  * Old unused patches removed.
+
+ -- Milan Zamazal <pdm@debian.org>  Sat, 12 Nov 2016 18:55:54 +0100
+
+stockfish (8-2) unstable; urgency=low
+
+  * Build with ARCH=general-64 by default.
+
+ -- Milan Zamazal <pdm@debian.org>  Thu, 10 Nov 2016 21:05:09 +0100
+
+stockfish (8-1) unstable; urgency=low
+
+  * New upstream version; closes: #843696.
+  * Enable parallel build.
+
+ -- Milan Zamazal <pdm@debian.org>  Wed, 09 Nov 2016 19:45:41 +0100
+
+stockfish (7-1) unstable; urgency=medium
+
+  * New maintainer; closes: #835314.
+  * Standards 3.9.8 (no real changes).
+
+ -- Milan Zamazal <pdm@debian.org>  Mon, 17 Oct 2016 21:28:24 +0200
+
+stockfish (7-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release 7 (Closes: #759003)
+    - this bug was already fixed in version 6.
+  * Bump std-version to 3.9.6, no changes required.
+  * Update copyright file.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 08 Jan 2016 19:04:47 +0100
+
+stockfish (6-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release 6 (Closes: #797327)
+    - Closes: #699309 (fixed in 5.0 according to bug comment #17)
+  * Drop quilt.
+  * Update watch file.
+  * Use quilt format.
+  * Update copyright file.
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 12 Oct 2015 14:46:27 +0200
+
+stockfish (5.0.dd+git20140823-1) unstable; urgency=low
+
+  * New Upstream Version 5 (Closes: #756546)
+  * No polyglot.ini in the sources anymore, patch removed
+  * I am considering moving to the sources with Syzygy tablebases. If 
+    anybody has an opinion on that matter file a bug with explanation.
+
+ -- Oliver Korff <ok@xynyx.de>  Sat, 23 Aug 2014 16:43:44 +0200
+
+stockfish (4.0.dd+git20140122-1) unstable; urgency=low
+
+  * New Upstream Version 4 (Closes: #730504)
+  * Removed makefile_patch_02 not needed anymore 
+  * Upgraded to Standards-Version 3.9.5, no package changes
+  * Changed the binary path in polyglot.ini to /usr/games/stockfish 
+    Thx to Francesco Poli for filing the bug (Closes: #728920)
+  * Changes to the watchfile, but this will not help scanning for new 
+    Versions. 
+
+ -- Oliver Korff <ok@xynyx.de>  Thu, 20 Feb 2014 22:31:10 +0100
+
+stockfish (3.0.0+git20130508-2) unstable; urgency=low
+
+  * Upstream version 3.(Closes: #706554) 
+  * After fighting with the chroot environment on merulo I solved the 
+    build problem on ia64 and added a target for the arch to the rules file: 
+    profile-build ARCH=general-64 optimize=no (Closes: #679174)
+
+ -- Oliver Korff <ok@xynyx.de>  Sun, 09 Jun 2013 21:07:19 +0200
+
+stockfish (3.0.0+git20130508-1) unstable; urgency=low
+
+  * New Upstream version. (Closes: #706554)
+  * The prefetch behaviour is now changed by upstream, so the 
+    makefile_patch_03 is not needed anymore.
+
+ -- Oliver Korff <ok@xynyx.de>  Sat, 08 Jun 2013 16:34:32 +0200
+
+stockfish (2.3.1+git20121008-2) unstable; urgency=low
+
+  * FTBFS on various archs due to a Makefile target change. This is fixed 
+    now by changing the prefetch behaviour. 
+
+ -- Oliver Korff <ok@xynyx.de>  Fri, 12 Oct 2012 02:23:09 +0200
+
+stockfish (2.3.1+git20121008-1) unstable; urgency=low
+
+  * New Upstream version.
+  * Updated to Standards-Version 3.9.4. No package changes.
+  * Use dh_auto_build in rules (instead of make directly) and compat 
+    level 9 instead of 7. This sets the hardening build flags by 
+    default. 
+    The controlfile had to be ajusted to debhelper (>= 9). And the 
+    patch makefile_patch_02 is intrduced to make the hardening 
+    environment CXXFLAGS and LDFLAGS visible to the makefile.
+
+
+ -- Oliver Korff <ok@xynyx.de>  Thu, 11 Oct 2012 17:05:55 +0200
+
+stockfish (2.2.2+git20120201-1) unstable; urgency=low
+
+  * New Upstream version.
+
+ -- Oliver Korff <ok@xynyx.de>  Thu, 02 Feb 2012 00:01:04 +0100
+
+stockfish (2.2.1+git20120109-1) unstable; urgency=low
+
+  * New Upstream version.
+  * Removed debian/patches/add-lgov-linker.patch: makes build fail on debian,
+    the upstream Makefile now includes lgcov.
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 09 Jan 2012 23:30:22 +0100
+
+stockfish (2.1.1+git20111006-2) unstable; urgency=low
+
+  * debian/patches/add-lgov-linker.patch: Add -lgcov library linker to fixing
+    FTBFS ld no-add-needed. (LP: #832862) Thanks to Mahyuddin Susanto.
+
+ -- Oliver Korff <ok@xynyx.de>  Tue, 08 Nov 2011 10:16:52 +0100
+
+stockfish (2.1.1+git20111006-1) unstable; urgency=low
+
+  * Upstream has now moved to git. 
+    https://github.com/mcostalba/Stockfish.git
+    All changes are said to be code cleanups and no feature changes.
+  * Debian specific update to support m86k. 
+  * Basic support for DEB_BUILD_OPTIONS. The option nocheck will drop
+    the testsuite and noopts will at least drop the profiling.
+  * Adjusted download location in copyright.
+
+ -- Oliver Korff <ok@xynyx.de>  Thu, 15 Sep 2011 00:12:59 +0200
+
+stockfish (2.1.1-1) unstable; urgency=low
+
+  * New Upstream version. Its a maintenance release.
+  * Repack of the source distribution due to the included binary files. Removed: 
+    stockfish-211-64-ja stockfish-211-32-ja stockfish-211-64-ja.exe 
+    stockfish-211-32-ja.exe stockfish-211-android-ja
+  * Removed build dependency to g++-4.4 (>= 4.4.5), maybe we don't need this 
+    anymore. Lets see, if the other architectures will build fine...
+  * Updated to Standards-Version 3.9.2. No package changes.
+  * Removed duplicat Homepage field from contreol.
+
+ -- Oliver Korff <ok@xynyx.de>  Tue, 10 May 2011 09:29:35 +0200
+
+stockfish (2.0.1-2) unstable; urgency=low
+
+  * Upload to unstable.
+  * For sparc there is no profiling anymore, because I never received more 
+    info on the bugreport. (Closes: #599979)
+  * Added a Homepage: field to control file. 
+
+ -- Oliver Korff <ok@xynyx.de>  Thu, 24 Feb 2011 16:28:14 +0100
+
+stockfish (2.0.1-1) experimental; urgency=low
+
+  * New Upstream version.
+  * Upstream uses now the RKISS random generator for hash keys (courtesy of 
+    Heinz van Saanen) instead of mersenne, so I adjusted the copyright notice.
+
+ -- Oliver Korff <ok@xynyx.de>  Tue, 11 Jan 2011 09:31:01 +0100
+
+stockfish (1.9.1-3) experimental; urgency=low
+
+  * The build problems on sparc are still present due to the old 
+    installed new gcc packages. In my opinion the right way to deal with 
+    that is to adjust the builddepends to the g++-4.4 (>= 4.4.5-1~) version, 
+    that is working on the the porter-boxes. This version is also the current 
+    in testing and unstable. The build systems on lebrun should be updated.
+  * On ia64 the build fails with an: "internal compiler error" To prevent this 
+    I will disable the profiling there. The g++ is now current here. The 
+    behavior is different on the porterbox merulo. The plan is to report 
+    upstream and test profiling in experimental next release again.
+
+ -- Oliver Korff <ok@xynyx.de>  Sun, 07 Nov 2010 14:14:39 +0100
+
+stockfish (1.9.1-2) experimental; urgency=low
+
+  * The encountered build problems on sparc and ia64 should now be solved 
+    by the installed new gcc packages. Old gcc/g++ versions broke 
+    optimization and profile build. The corresponding bugs No. 599979 
+    and 599977. Will be closed after successful builds.
+
+ -- Oliver Korff <ok@xynyx.de>  Sat, 16 Oct 2010 23:18:55 +0200
+
+stockfish (1.9.1-1) experimental; urgency=low
+
+  * New Upstream Version.
+  * Repack removed the linux binaries and adjusted the source dir.
+  * Updated to Standards Version 3.9.1
+  * Fixed a typo in debian/control
+  * Introduced debian/source/format, with 1.0 entry, I see no reason 
+    for switching to quilt ATM
+  * I switched from: Recomments: polyglot, xboard | scid to Suggests,
+    This solves a problem, that Adrian Petrescu has, maybe it is more
+    convenient, and solves the ubuntu bug Nr. 652772.
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 11 Oct 2010 15:20:04 +0200
+
+stockfish (1.8.0-5) unreleased; urgency=low
+
+  * Joona Kiiski found a problem in the Makefile, that might affect 
+    the proper building of the sources. This is fixed with the 
+    makefile_patch.  
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 05 Jul 2010 20:52:08 +0200
+
+stockfish (1.8.0-4) unstable; urgency=low
+
+  * Upstream suggested to add a testrun to the buildprocess to ensure,
+    the binaries are fully functional.
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 05 Jul 2010 17:26:52 +0200
+
+stockfish (1.8.0-3) unstable; urgency=low
+
+  * alpha is not building, so the profiling is disabled
+  * removed a typo in rules file
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 05 Jul 2010 16:32:36 +0200
+
+stockfish (1.8.0-2) unstable; urgency=low
+
+  * Building a profiled stockfish on armel, powerpc and hppa fails, 
+    Solution: turn off the profiling, until this is further inspected.
+  * Updated to standards version 3.8.4, without any changes
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 05 Jul 2010 10:05:13 +0200
+
+stockfish (1.8.0-1) unstable; urgency=low
+
+  * New Upstream Release
+  * Removed the binarys in Linux subdir 
+  * Adjusted the copyright to point to www.stockfishchess.com
+  * Added arch specific targets in rules file
+  * No more patches, I will remove quilt dependency, if it stays this way
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 05 Jul 2010 00:35:01 +0200
+
+stockfish (1.7.1JA-2) unstable; urgency=low
+
+  * a faulty mips compile workaround with -DBIGENDIAN broke the mipsel
+    compile. Reset of this should make this work again.
+
+ -- Oliver Korff <ok@xynyx.de>  Sun, 16 May 2010 11:44:51 +0200
+
+stockfish (1.7.1JA-1) unstable; urgency=low
+
+  * New Upstream bugfix Release
+  * Removed the binarys in Linux and Windows subdir
+  * mips compile was not working, added -DBIGENDIAN
+  * Set UCI option for zugzwang detection to "on" by default
+
+ -- Oliver Korff <ok@xynyx.de>  Thu, 15 Apr 2010 15:30:22 +0200
+
+stockfish (1.7.0JA-2) unstable; urgency=low
+
+  * The stockfish bin segfaults on hppa, powerpc, s390, sparc, so a 
+    -DBIGENDIAN was added on these archs.
+
+ -- Oliver Korff <ok@xynyx.de>  Sun, 11 Apr 2010 23:11:14 +0200
+
+stockfish (1.7.0JA-1) unstable; urgency=low
+
+  * New Upstream Release
+  * Removed the binarys in Linux and Windows subdir
+  * Adjusted the copyright to match the current status, added Joona Kiiski
+  * Renewed the msse-removal patch, to work on the new source 
+
+ -- Oliver Korff <ok@xynyx.de>  Sat, 10 Apr 2010 14:40:58 +0200
+
+stockfish (1.6.3JA-2) unstable; urgency=low
+
+  * rules: "make clean" compiles a .depend with -msse. This fails on 
+    architectures other than i386. With this fix it is ensured that 
+    the .depend exists even if the quilt patches are not applied. 
+    Thanks to Christoph Berg for finding the problem. (Closes: #570665)
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 22 Feb 2010 10:17:50 +0100
+
+stockfish (1.6.3JA-1) unstable; urgency=low
+
+  * Ńew upstream version. This is a bugfix version. It contains the patches, 
+    which were already in 1.6.2 and addresses some multi threading bugs. No 
+    enhancement in playing strength.
+  * Updated to standards version 3.8.4, there was nothing todo.
+  * Included a watchfile for documentation purpose only.
+  * Added a description to the msse patch.
+
+ -- Oliver Korff <ok@xynyx.de>  Fri, 05 Feb 2010 00:41:18 +0100
+
+stockfish (1.6.2JA-3) unstable; urgency=low
+
+  * The bugfix patch contained an irritating bug itself. On commandline 
+    after "go infinite", and "stop" there is no bestmove prited out. The 
+    problem and fix was reported by Joona Kiiski, thanks.
+
+ -- Oliver Korff <ok@xynyx.de>  Fri, 15 Jan 2010 21:27:36 +0100
+
+stockfish (1.6.2JA-2) unstable; urgency=low
+
+  * "Search until stop command bug" fixed. This is only necessary 
+    for GUIs like scid and was fixed by Marco Costelba. Patch was 
+    Released in the http://talkchess.com forum.
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 11 Jan 2010 14:44:12 +0100
+
+stockfish (1.6.2JA-1) unstable; urgency=low
+
+  * New upstream version.
+  * This version still uses the SSE extensions. These are not usable 
+  for debian. I decided to use the quilt patch system to work with resulting 
+  patch for the makefile and tt.cpp.
+  * Renewed the rules file to use the new dh standards
+
+ -- Oliver Korff <ok@xynyx.de>  Wed, 06 Jan 2010 13:26:08 +0100
+
+stockfish (1.5.1JA-3) unstable; urgency=low
+
+  * Thanks to Joona Kiiski I could remove the -msse option from the 
+  gcc flags and stockfish might now build on other architectures.
+  Problem was the include of xmmintrin.h, that holds the SSE extensions.
+  Marc Costelba: "in any case is only a speed optimization, not a 
+  functional change."
+  * Change of Architecture: any in debian control 
+
+ -- Oliver Korff <ok@xynyx.de>  Wed, 16 Dec 2009 00:07:49 +0100
+
+stockfish (1.5.1JA-2) unstable; urgency=low
+
+  * FTBS Bug: I had to find out, that stockfish uses architecture 
+    specific SSE extensions. At the moment I counter this by specifying 
+    the architectures, that are known to work: i386 amd64 kfreebsd-amd64 
+    kfreebsd-i386 kfreebsd-amd64. This matter will be discussed with 
+    upstream. (Closes: 559724)
+  * Removed knights from Recommends: field, the package is not up to date
+  * Adjusted the description slightly
+
+ -- Oliver Korff <ok@xynyx.de>  Mon, 07 Dec 2009 16:19:46 +0100
+
+stockfish (1.5.1JA-1) unstable; urgency=low
+
+  * New Upstream Release
+  * The source was downloaded from mediafire.com
+  * It came as .zip file and was repackaged, the files stockfish_151_ja.exe 
+    stockfish_151_win98.exe and stockfish_151_x64_ja.exe have been removed. 
+    The source has been kept unchanged.
+  * Initial official release (Closes: #550566)  
+
+ -- Oliver Korff <ok@xynyx.de>  Sat, 10 Oct 2009 16:32:08 +0200
+
+stockfish (1.4.1JA-1) unofficial; urgency=low
+
+  * Initial unofficial release 
+  * The source came as .rar file it had to be repackaged
+
+ -- Oliver Korff <ok@xynyx.de>  Tue, 11 Aug 2009 18:57:23 +0200
diff --git a/compat b/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+9
diff --git a/control b/control
new file mode 100644 (file)
index 0000000..289733d
--- /dev/null
+++ b/control
@@ -0,0 +1,20 @@
+Source: stockfish
+Section: games
+Priority: optional
+Maintainer: Milan Zamazal <pdm@debian.org>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.8
+Homepage: http://www.stockfishchess.com
+
+Package: stockfish
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: polyglot, xboard | scid
+Description: strong chess engine, to play chess against
+ free chess engine derived from Glaurung 2.1. It is a chess engine, so it 
+ requires an UCI (universal chess interface) compatible GUI like XBoard 
+ (with PolyGlot), eboard, Jose, Arena or scid in order to be used comfortably. 
+ It is the strongest open source chess engine by october 2009 in the 
+ "computer chess rating list" CCRL. Written in C++ it uses multiple threads 
+ and cores. It is capable of Chess960 and has experimental support for polyglot 
+ opening books.
diff --git a/copyright b/copyright
new file mode 100644 (file)
index 0000000..20c8c8b
--- /dev/null
+++ b/copyright
@@ -0,0 +1,49 @@
+This package was debianized by:
+
+    Oliver Korff <ok@xynyx.de> on Tue, 11 Aug 2009 18:57:23 +0200
+
+It was downloaded from:
+
+    Version 1.5.1: http://www.mediafire.com/?5jx12zdyygw
+    Version 1.4.1: http://www.mediafire.com/?mihzcymwhlg   
+    Version 1.6.3: http://www.mediafire.com/?ywtum2tmwi5
+    Later versions came from http://www.stockfishchess.com 
+    ATM I clone the git repository at: https://github.com/mcostalba/Stockfish.git
+    Now the official git repository has moved to https://github.com/official-stockfish/Stockfish
+
+Upstream Authors:
+
+    Tord Romstad <tord@glaurungchess.com>
+    Marco Costalba <mcostalba@gmail.com>
+    Joona Kiiski <joona.kiiski@gmail.com>
+
+Copyright:
+
+    Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
+    Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
+    Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+    The copyright holder of parts of rkiss.h is Heinz van Saanen
+
+Licenses:
+
+    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 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 program.  If not, see <http://www.gnu.org/licenses/>.
+
+On Debian systems, the complete text of the GNU General
+Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'.
+
+The Debian packaging is:
+
+    Copyright (C) 2009-2014 Oliver Korff <ok@xynyx.de>
+
+and is licensed under the GPL version 3, see above.
diff --git a/dirs b/dirs
new file mode 100644 (file)
index 0000000..33359b8
--- /dev/null
+++ b/dirs
@@ -0,0 +1 @@
+usr/games
diff --git a/docs b/docs
new file mode 100644 (file)
index 0000000..ff6c8b4
--- /dev/null
+++ b/docs
@@ -0,0 +1,2 @@
+Readme.md
+debian/engine-interface.txt
diff --git a/engine-interface.txt b/engine-interface.txt
new file mode 100644 (file)
index 0000000..7b6e697
--- /dev/null
@@ -0,0 +1,544 @@
+\r
+\r
+Description of the universal chess interface (UCI)    April  2006\r
+=================================================================\r
+\r
+* The specification is independent of the operating system. For Windows,\r
+  the engine is a normal exe file, either a console or "real" windows application.\r
+\r
+* all communication is done via standard input and output with text commands,\r
+\r
+* The engine should boot and wait for input from the GUI,\r
+  the engine should wait for the "isready" or "setoption" command to set up its internal parameters\r
+  as the boot process should be as quick as possible.\r
+\r
+* the engine must always be able to process input from stdin, even while thinking.\r
+\r
+* all command strings the engine receives will end with '\n',\r
+  also all commands the GUI receives should end with '\n',\r
+  Note: '\n' can be 0x0d or 0x0a0d or any combination depending on your OS.\r
+  If you use Engine and GUI in the same OS this should be no problem if you communicate in text mode,\r
+  but be aware of this when for example running a Linux engine in a Windows GUI.\r
+\r
+* arbitrary white space between tokens is allowed\r
+  Example: "debug on\n" and  "   debug     on  \n" and "\t  debug \t  \t\ton\t  \n"\r
+  all set the debug mode of the engine on.\r
+\r
+* The engine will always be in forced mode which means it should never start calculating\r
+  or pondering without receiving a "go" command first.\r
+\r
+* Before the engine is asked to search on a position, there will always be a position command\r
+  to tell the engine about the current position.\r
+\r
+* by default all the opening book handling is done by the GUI,\r
+  but there is an option for the engine to use its own book ("OwnBook" option, see below)\r
+\r
+* if the engine or the GUI receives an unknown command or token it should just ignore it and try to\r
+  parse the rest of the string in this line.\r
+  Examples: "joho debug on\n" should switch the debug mode on given that joho is not defined,\r
+            "debug joho on\n" will be undefined however.\r
+\r
+* if the engine receives a command which is not supposed to come, for example "stop" when the engine is\r
+  not calculating, it should also just ignore it.\r
+  \r
+\r
+Move format:\r
+------------\r
+\r
+The move format is in long algebraic notation.\r
+A nullmove from the Engine to the GUI should be sent as 0000.\r
+Examples:  e2e4, e7e5, e1g1 (white short castling), e7e8q (for promotion)\r
+\r
+\r
+\r
+GUI to engine:\r
+--------------\r
+\r
+These are all the command the engine gets from the interface.\r
+\r
+* uci\r
+       tell engine to use the uci (universal chess interface),\r
+       this will be sent once as a first command after program boot\r
+       to tell the engine to switch to uci mode.\r
+       After receiving the uci command the engine must identify itself with the "id" command\r
+       and send the "option" commands to tell the GUI which engine settings the engine supports if any.\r
+       After that the engine should send "uciok" to acknowledge the uci mode.\r
+       If no uciok is sent within a certain time period, the engine task will be killed by the GUI.\r
+\r
+* debug [ on | off ]\r
+       switch the debug mode of the engine on and off.\r
+       In debug mode the engine should send additional infos to the GUI, e.g. with the "info string" command,\r
+       to help debugging, e.g. the commands that the engine has received etc.\r
+       This mode should be switched off by default and this command can be sent\r
+       any time, also when the engine is thinking.\r
+\r
+* isready\r
+       this is used to synchronize the engine with the GUI. When the GUI has sent a command or\r
+       multiple commands that can take some time to complete,\r
+       this command can be used to wait for the engine to be ready again or\r
+       to ping the engine to find out if it is still alive.\r
+       E.g. this should be sent after setting the path to the tablebases as this can take some time.\r
+       This command is also required once before the engine is asked to do any search\r
+       to wait for the engine to finish initializing.\r
+       This command must always be answered with "readyok" and can be sent also when the engine is calculating\r
+       in which case the engine should also immediately answer with "readyok" without stopping the search.\r
+\r
+* setoption name <id> [value <x>]\r
+       this is sent to the engine when the user wants to change the internal parameters\r
+       of the engine. For the "button" type no value is needed.\r
+       One string will be sent for each parameter and this will only be sent when the engine is waiting.\r
+       The name and value of the option in <id> should not be case sensitive and can inlude spaces.\r
+       The substrings "value" and "name" should be avoided in <id> and <x> to allow unambiguous parsing,\r
+       for example do not use <name> = "draw value".\r
+       Here are some strings for the example below:\r
+          "setoption name Nullmove value true\n"\r
+      "setoption name Selectivity value 3\n"\r
+          "setoption name Style value Risky\n"\r
+          "setoption name Clear Hash\n"\r
+          "setoption name NalimovPath value c:\chess\tb\4;c:\chess\tb\5\n"\r
+\r
+* register\r
+       this is the command to try to register an engine or to tell the engine that registration\r
+       will be done later. This command should always be sent if the engine    has sent "registration error"\r
+       at program startup.\r
+       The following tokens are allowed:\r
+       * later\r
+          the user doesn't want to register the engine now.\r
+       * name <x>\r
+          the engine should be registered with the name <x>\r
+       * code <y>\r
+          the engine should be registered with the code <y>\r
+       Example:\r
+          "register later"\r
+          "register name Stefan MK code 4359874324"\r
+\r
+* ucinewgame\r
+   this is sent to the engine when the next search (started with "position" and "go") will be from\r
+   a different game. This can be a new game the engine should play or a new game it should analyse but\r
+   also the next position from a testsuite with positions only.\r
+   If the GUI hasn't sent a "ucinewgame" before the first "position" command, the engine shouldn't\r
+   expect any further ucinewgame commands as the GUI is probably not supporting the ucinewgame command.\r
+   So the engine should not rely on this command even though all new GUIs should support it.\r
+   As the engine's reaction to "ucinewgame" can take some time the GUI should always send "isready"\r
+   after "ucinewgame" to wait for the engine to finish its operation.\r
+   \r
+* position [fen <fenstring> | startpos ]  moves <move1> .... <movei>\r
+       set up the position described in fenstring on the internal board and\r
+       play the moves on the internal chess board.\r
+       if the game was played  from the start position the string "startpos" will be sent\r
+       Note: no "new" command is needed. However, if this position is from a different game than\r
+       the last position sent to the engine, the GUI should have sent a "ucinewgame" inbetween.\r
+\r
+* go\r
+       start calculating on the current position set up with the "position" command.\r
+       There are a number of commands that can follow this command, all will be sent in the same string.\r
+       If one command is not sent its value should be interpreted as it would not influence the search.\r
+       * searchmoves <move1> .... <movei>\r
+               restrict search to this moves only\r
+               Example: After "position startpos" and "go infinite searchmoves e2e4 d2d4"\r
+               the engine should only search the two moves e2e4 and d2d4 in the initial position.\r
+       * ponder\r
+               start searching in pondering mode.\r
+               Do not exit the search in ponder mode, even if it's mate!\r
+               This means that the last move sent in in the position string is the ponder move.\r
+               The engine can do what it wants to do, but after a "ponderhit" command\r
+               it should execute the suggested move to ponder on. This means that the ponder move sent by\r
+               the GUI can be interpreted as a recommendation about which move to ponder. However, if the\r
+               engine decides to ponder on a different move, it should not display any mainlines as they are\r
+               likely to be misinterpreted by the GUI because the GUI expects the engine to ponder\r
+          on the suggested move.\r
+       * wtime <x>\r
+               white has x msec left on the clock\r
+       * btime <x>\r
+               black has x msec left on the clock\r
+       * winc <x>\r
+               white increment per move in mseconds if x > 0\r
+       * binc <x>\r
+               black increment per move in mseconds if x > 0\r
+       * movestogo <x>\r
+      there are x moves to the next time control,\r
+               this will only be sent if x > 0,\r
+               if you don't get this and get the wtime and btime it's sudden death\r
+       * depth <x>\r
+               search x plies only.\r
+       * nodes <x>\r
+          search x nodes only,\r
+       * mate <x>\r
+               search for a mate in x moves\r
+       * movetime <x>\r
+               search exactly x mseconds\r
+       * infinite\r
+               search until the "stop" command. Do not exit the search without being told so in this mode!\r
+    \r
+* stop\r
+       stop calculating as soon as possible,\r
+       don't forget the "bestmove" and possibly the "ponder" token when finishing the search\r
+\r
+* ponderhit\r
+       the user has played the expected move. This will be sent if the engine was told to ponder on the same move\r
+       the user has played. The engine should continue searching but switch from pondering to normal search.\r
+\r
+* quit\r
+       quit the program as soon as possible\r
+\r
+\r
+Engine to GUI:\r
+--------------\r
+\r
+* id\r
+       * name <x>\r
+               this must be sent after receiving the "uci" command to identify the engine,\r
+               e.g. "id name Shredder X.Y\n"\r
+       * author <x>\r
+               this must be sent after receiving the "uci" command to identify the engine,\r
+               e.g. "id author Stefan MK\n"\r
+\r
+* uciok\r
+       Must be sent after the id and optional options to tell the GUI that the engine\r
+       has sent all infos and is ready in uci mode.\r
+\r
+* readyok\r
+       This must be sent when the engine has received an "isready" command and has\r
+       processed all input and is ready to accept new commands now.\r
+       It is usually sent after a command that can take some time to be able to wait for the engine,\r
+       but it can be used anytime, even when the engine is searching,\r
+       and must always be answered with "isready".\r
+\r
+* bestmove <move1> [ ponder <move2> ]\r
+       the engine has stopped searching and found the move <move> best in this position.\r
+       the engine can send the move it likes to ponder on. The engine must not start pondering automatically.\r
+       this command must always be sent if the engine stops searching, also in pondering mode if there is a\r
+       "stop" command, so for every "go" command a "bestmove" command is needed!\r
+       Directly before that the engine should send a final "info" command with the final search information,\r
+       the the GUI has the complete statistics about the last search.\r
+\r
+* copyprotection\r
+       this is needed for copyprotected engines. After the uciok command the engine can tell the GUI,\r
+       that it will check the copy protection now. This is done by "copyprotection checking".\r
+       If the check is ok the engine should send "copyprotection ok", otherwise "copyprotection error".\r
+       If there is an error the engine should not function properly but should not quit alone.\r
+       If the engine reports "copyprotection error" the GUI should not use this engine\r
+       and display an error message instead!\r
+       The code in the engine can look like this\r
+      TellGUI("copyprotection checking\n");\r
+          // ... check the copy protection here ...\r
+          if(ok)\r
+             TellGUI("copyprotection ok\n");\r
+      else\r
+         TellGUI("copyprotection error\n");\r
+         \r
+* registration\r
+       this is needed for engines that need a username and/or a code to function with all features.\r
+       Analog to the "copyprotection" command the engine can send "registration checking"\r
+       after the uciok command followed by either "registration ok" or "registration error".\r
+       Also after every attempt to register the engine it should answer with "registration checking"\r
+       and then either "registration ok" or "registration error".\r
+       In contrast to the "copyprotection" command, the GUI can use the engine after the engine has\r
+       reported an error, but should inform the user that the engine is not properly registered\r
+       and might not use all its features.\r
+       In addition the GUI should offer to open a dialog to\r
+       enable registration of the engine. To try to register an engine the GUI can send\r
+       the "register" command.\r
+       The GUI has to always answer with the "register" command        if the engine sends "registration error"\r
+       at engine startup (this can also be done with "register later")\r
+       and tell the user somehow that the engine is not registered.\r
+       This way the engine knows that the GUI can deal with the registration procedure and the user\r
+       will be informed that the engine is not properly registered.\r
+             \r
+* info\r
+       the engine wants to send information to the GUI. This should be done whenever one of the info has changed.\r
+       The engine can send only selected infos or multiple infos with one info command,\r
+       e.g. "info currmove e2e4 currmovenumber 1" or\r
+            "info depth 12 nodes 123456 nps 100000".\r
+       Also all infos belonging to the pv should be sent together\r
+       e.g. "info depth 2 score cp 214 time 1242 nodes 2124 nps 34928 pv e2e4 e7e5 g1f3"\r
+       I suggest to start sending "currmove", "currmovenumber", "currline" and "refutation" only after one second\r
+       to avoid too much traffic.\r
+       Additional info:\r
+       * depth <x>\r
+               search depth in plies\r
+       * seldepth <x>\r
+               selective search depth in plies,\r
+               if the engine sends seldepth there must also be a "depth" present in the same string.\r
+       * time <x>\r
+               the time searched in ms, this should be sent together with the pv.\r
+       * nodes <x>\r
+               x nodes searched, the engine should send this info regularly\r
+       * pv <move1> ... <movei>\r
+               the best line found\r
+       * multipv <num>\r
+               this for the multi pv mode.\r
+               for the best move/pv add "multipv 1" in the string when you send the pv.\r
+               in k-best mode always send all k variants in k strings together.\r
+       * score\r
+               * cp <x>\r
+                       the score from the engine's point of view in centipawns.\r
+               * mate <y>\r
+                       mate in y moves, not plies.\r
+                       If the engine is getting mated use negative values for y.\r
+               * lowerbound\r
+             the score is just a lower bound.\r
+               * upperbound\r
+                  the score is just an upper bound.\r
+       * currmove <move>\r
+               currently searching this move\r
+       * currmovenumber <x>\r
+               currently searching move number x, for the first move x should be 1 not 0.\r
+       * hashfull <x>\r
+               the hash is x permill full, the engine should send this info regularly\r
+       * nps <x>\r
+               x nodes per second searched, the engine should send this info regularly\r
+       * tbhits <x>\r
+               x positions where found in the endgame table bases\r
+       * sbhits <x>\r
+               x positions where found in the shredder endgame databases\r
+       * cpuload <x>\r
+               the cpu usage of the engine is x permill.\r
+       * string <str>\r
+               any string str which will be displayed be the engine,\r
+               if there is a string command the rest of the line will be interpreted as <str>.\r
+       * refutation <move1> <move2> ... <movei>\r
+          move <move1> is refuted by the line <move2> ... <movei>, i can be any number >= 1.\r
+          Example: after move d1h5 is searched, the engine can send\r
+          "info refutation d1h5 g6h5"\r
+          if g6h5 is the best answer after d1h5 or if g6h5 refutes the move d1h5.\r
+          if there is no refutation for d1h5 found, the engine should just send\r
+          "info refutation d1h5"\r
+               The engine should only send this if the option "UCI_ShowRefutations" is set to true.\r
+       * currline <cpunr> <move1> ... <movei>\r
+          this is the current line the engine is calculating. <cpunr> is the number of the cpu if\r
+          the engine is running on more than one cpu. <cpunr> = 1,2,3....\r
+          if the engine is just using one cpu, <cpunr> can be omitted.\r
+          If <cpunr> is greater than 1, always send all k lines in k strings together.\r
+               The engine should only send this if the option "UCI_ShowCurrLine" is set to true.\r
+       \r
+\r
+* option\r
+       This command tells the GUI which parameters can be changed in the engine.\r
+       This should be sent once at engine startup after the "uci" and the "id" commands\r
+       if any parameter can be changed in the engine.\r
+       The GUI should parse this and build a dialog for the user to change the settings.\r
+       Note that not every option needs to appear in this dialog as some options like\r
+       "Ponder", "UCI_AnalyseMode", etc. are better handled elsewhere or are set automatically.\r
+       If the user wants to change some settings, the GUI will send a "setoption" command to the engine.\r
+       Note that the GUI need not send the setoption command when starting the engine for every option if\r
+       it doesn't want to change the default value.\r
+       For all allowed combinations see the examples below,\r
+       as some combinations of this tokens don't make sense.\r
+       One string will be sent for each parameter.\r
+       * name <id>\r
+               The option has the name id.\r
+               Certain options have a fixed value for <id>, which means that the semantics of this option is fixed.\r
+               Usually those options should not be displayed in the normal engine options window of the GUI but\r
+               get a special treatment. "Pondering" for example should be set automatically when pondering is\r
+               enabled or disabled in the GUI options. The same for "UCI_AnalyseMode" which should also be set\r
+               automatically by the GUI. All those certain options have the prefix "UCI_" except for the\r
+               first 6 options below. If the GUI gets an unknown Option with the prefix "UCI_", it should just\r
+               ignore it and not display it in the engine's options dialog.\r
+               * <id> = Hash, type is spin\r
+                       the value in MB for memory for hash tables can be changed,\r
+                       this should be answered with the first "setoptions" command at program boot\r
+                       if the engine has sent the appropriate "option name Hash" command,\r
+                       which should be supported by all engines!\r
+                       So the engine should use a very small hash first as default.\r
+               * <id> = NalimovPath, type string\r
+                       this is the path on the hard disk to the Nalimov compressed format.\r
+                       Multiple directories can be concatenated with ";"\r
+               * <id> = NalimovCache, type spin\r
+                       this is the size in MB for the cache for the nalimov table bases\r
+                       These last two options should also be present in the initial options exchange dialog\r
+                       when the engine is booted if the engine supports it\r
+               * <id> = Ponder, type check\r
+                       this means that the engine is able to ponder.\r
+                       The GUI will send this whenever pondering is possible or not.\r
+                       Note: The engine should not start pondering on its own if this is enabled, this option is only\r
+                       needed because the engine might change its time management algorithm when pondering is allowed.\r
+               * <id> = OwnBook, type check\r
+                       this means that the engine has its own book which is accessed by the engine itself.\r
+                       if this is set, the engine takes care of the opening book and the GUI will never\r
+                       execute a move out of its book for the engine. If this is set to false by the GUI,\r
+                       the engine should not access its own book.\r
+               * <id> = MultiPV, type spin\r
+                       the engine supports multi best line or k-best mode. the default value is 1\r
+               * <id> = UCI_ShowCurrLine, type check, should be false by default,\r
+                       the engine can show the current line it is calculating. see "info currline" above.\r
+               * <id> = UCI_ShowRefutations, type check, should be false by default,\r
+                       the engine can show a move and its refutation in a line. see "info refutations" above.\r
+               * <id> = UCI_LimitStrength, type check, should be false by default,\r
+                       The engine is able to limit its strength to a specific Elo number,\r
+                  This should always be implemented together with "UCI_Elo".\r
+               * <id> = UCI_Elo, type spin\r
+                       The engine can limit its strength in Elo within this interval.\r
+                       If UCI_LimitStrength is set to false, this value should be ignored.\r
+                       If UCI_LimitStrength is set to true, the engine should play with this specific strength.\r
+                  This should always be implemented together with "UCI_LimitStrength".\r
+               * <id> = UCI_AnalyseMode, type check\r
+                  The engine wants to behave differently when analysing or playing a game.\r
+                  For example when playing it can use some kind of learning.\r
+                  This is set to false if the engine is playing a game, otherwise it is true.\r
+                * <id> = UCI_Opponent, type string\r
+                  With this command the GUI can send the name, title, elo and if the engine is playing a human\r
+                  or computer to the engine.\r
+                  The format of the string has to be [GM|IM|FM|WGM|WIM|none] [<elo>|none] [computer|human] <name>\r
+                  Examples:\r
+                  "setoption name UCI_Opponent value GM 2800 human Gary Kasparov"\r
+                  "setoption name UCI_Opponent value none none computer Shredder"\r
+                * <id> = UCI_EngineAbout, type string\r
+                  With this command, the engine tells the GUI information about itself, for example a license text,\r
+                  usually it doesn't make sense that the GUI changes this text with the setoption command.\r
+                  Example:\r
+                       "option name UCI_EngineAbout type string default Shredder by Stefan Meyer-Kahlen, see www.shredderchess.com"\r
+               * <id> = UCI_ShredderbasesPath, type string\r
+                       this is either the path to the folder on the hard disk containing the Shredder endgame databases or\r
+                       the path and filename of one Shredder endgame datbase.\r
+          * <id> = UCI_SetPositionValue, type string\r
+             the GUI can send this to the engine to tell the engine to use a certain value in centipawns from white's\r
+             point of view if evaluating this specifix position. \r
+             The string can have the formats:\r
+             <value> + <fen> | clear + <fen> | clearall\r
+                       \r
+       * type <t>\r
+               The option has type t.\r
+               There are 5 different types of options the engine can send\r
+               * check\r
+                       a checkbox that can either be true or false\r
+               * spin\r
+                       a spin wheel that can be an integer in a certain range\r
+               * combo\r
+                       a combo box that can have different predefined strings as a value\r
+               * button\r
+                       a button that can be pressed to send a command to the engine\r
+               * string\r
+                       a text field that has a string as a value,\r
+                       an empty string has the value "<empty>"\r
+       * default <x>\r
+               the default value of this parameter is x\r
+       * min <x>\r
+               the minimum value of this parameter is x\r
+       * max <x>\r
+               the maximum value of this parameter is x\r
+       * var <x>\r
+               a predefined value of this parameter is x\r
+       Examples:\r
+    Here are 5 strings for each of the 5 possible types of options\r
+          "option name Nullmove type check default true\n"\r
+      "option name Selectivity type spin default 2 min 0 max 4\n"\r
+          "option name Style type combo default Normal var Solid var Normal var Risky\n"\r
+          "option name NalimovPath type string default c:\\n"\r
+          "option name Clear Hash type button\n"\r
+\r
+\r
+\r
+Examples:\r
+---------\r
+\r
+This is how the communication when the engine boots can look like:\r
+\r
+GUI     engine\r
+\r
+// tell the engine to switch to UCI mode\r
+uci\r
+\r
+// engine identify  \r
+      id name Shredder\r
+               id author Stefan MK\r
+\r
+// engine sends the options it can change\r
+// the engine can change the hash size from 1 to 128 MB\r
+               option name Hash type spin default 1 min 1 max 128\r
+\r
+// the engine supports Nalimov endgame tablebases\r
+               option name NalimovPath type string default <empty>\r
+               option name NalimovCache type spin default 1 min 1 max 32\r
+\r
+// the engine can switch off Nullmove and set the playing style\r
+          option name Nullmove type check default true\r
+               option name Style type combo default Normal var Solid var Normal var Risky\r
+\r
+// the engine has sent all parameters and is ready\r
+               uciok\r
+\r
+// Note: here the GUI can already send a "quit" command if it just wants to find out\r
+//       details about the engine, so the engine should not initialize its internal\r
+//       parameters before here.\r
+// now the GUI sets some values in the engine\r
+// set hash to 32 MB\r
+setoption name Hash value 32\r
+\r
+// init tbs\r
+setoption name NalimovCache value 1\r
+setoption name NalimovPath value d:\tb;c\tb\r
+\r
+// waiting for the engine to finish initializing\r
+// this command and the answer is required here!\r
+isready\r
+\r
+// engine has finished setting up the internal values\r
+               readyok\r
+\r
+// now we are ready to go\r
+\r
+// if the GUI is supporting it, tell the engine that is is\r
+// searching on a game that it hasn't searched on before\r
+ucinewgame\r
+\r
+// if the engine supports the "UCI_AnalyseMode" option and the next search is supposed to\r
+// be an analysis, the GUI should set "UCI_AnalyseMode" to true if it is currently\r
+// set to false with this engine\r
+setoption name UCI_AnalyseMode value true\r
+\r
+// tell the engine to search infinite from the start position after 1.e4 e5\r
+position startpos moves e2e4 e7e5\r
+go infinite\r
+\r
+// the engine starts sending infos about the search to the GUI\r
+// (only some examples are given)\r
+\r
+\r
+               info depth 1 seldepth 0\r
+               info score cp 13  depth 1 nodes 13 time 15 pv f1b5 \r
+               info depth 2 seldepth 2\r
+               info nps 15937\r
+               info score cp 14  depth 2 nodes 255 time 15 pv f1c4 f8c5 \r
+               info depth 2 seldepth 7 nodes 255\r
+               info depth 3 seldepth 7\r
+               info nps 26437\r
+               info score cp 20  depth 3 nodes 423 time 15 pv f1c4 g8f6 b1c3 \r
+               info nps 41562\r
+               ....\r
+\r
+\r
+// here the user has seen enough and asks to stop the searching\r
+stop\r
+\r
+// the engine has finished searching and is sending the bestmove command\r
+// which is needed for every "go" command sent to tell the GUI\r
+// that the engine is ready again\r
+               bestmove g1f3 ponder d8f6\r
+\r
+\r
+\r
+Chess960\r
+========\r
+\r
+UCI could easily be extended to support Chess960 (also known as Fischer Random Chess).\r
+\r
+The engine has to tell the GUI that it is capable of playing Chess960 and the GUI has to tell\r
+the engine that is should play according to the Chess960 rules.\r
+This is done by the special engine option UCI_Chess960. If the engine knows about Chess960\r
+it should send the command 'option name UCI_Chess960 type check default false'\r
+to the GUI at program startup.\r
+Whenever a Chess960 game is played, the GUI should set this engine option to 'true'.\r
+\r
+Castling is different in Chess960 and the white king move when castling short is not always e1g1.\r
+A king move could both be the castling king move or just a normal king move.\r
+This is why castling moves are sent in the form king "takes" his own rook.\r
+Example: e1h1 for the white short castle move in the normal chess start position.\r
+\r
+In EPD and FEN position strings specifying the castle rights with w and q is not enough as\r
+there could be more than one rook on the right or left side of the king.\r
+This is why the castle rights are specified with the letter of the castle rook's line.\r
+Upper case letters for white's and lower case letters for black's castling rights.\r
+Example: The normal chess position would be:\r
+rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w AHah -\r
+\r
diff --git a/install b/install
new file mode 100644 (file)
index 0000000..9553b26
--- /dev/null
+++ b/install
@@ -0,0 +1 @@
+src/stockfish usr/games/
diff --git a/patches/cxxflags.patch b/patches/cxxflags.patch
new file mode 100644 (file)
index 0000000..03bd612
--- /dev/null
@@ -0,0 +1,23 @@
+Description: Don't add -m32/-m64 to CXXFLAGS
+ Adding those is not only unnecessary, but actually breaks the build on
+ many architectures, since g++ does not recognize them when built without
+ multilib support.
+Author: Sven Joachim <svenjoac@gmx.de>
+Bug-Debian: https://bugs.debian.org/843922
+Last-Update: 2016-11-11
+
+---
+ src/Makefile |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -156,8 +156,6 @@ ifeq ($(COMP),gcc)
+               ifeq ($(OS),Android)
+                       CXXFLAGS += -m$(bits)
+               endif
+-      else
+-              CXXFLAGS += -m$(bits)
+       endif
+       ifneq ($(KERNEL),Darwin)
diff --git a/patches/series b/patches/series
new file mode 100644 (file)
index 0000000..a21784c
--- /dev/null
@@ -0,0 +1 @@
+cxxflags.patch
diff --git a/rules b/rules
new file mode 100755 (executable)
index 0000000..e35102e
--- /dev/null
+++ b/rules
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+
+TARGET := profile-build ARCH=general-$(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
+
+ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
+TARGET := profile-build ARCH=x86-32-old
+endif
+
+ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH)))
+TARGET := profile-build ARCH=x86-64
+endif
+
+# no compile on the first shot so building without profile
+ifneq (,$(findstring hppa,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+# no compile on the first shot
+ifneq (,$(findstring powerpc,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+ifneq (,$(findstring s390,$(DEB_BUILD_ARCH)))
+TARGET := profile-build ARCH=general-32
+endif
+
+ifneq (,$(findstring sparc,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+ifneq (,$(findstring mips,$(DEB_BUILD_ARCH)))
+TARGET := profile-build ARCH=general-32
+endif
+
+# Profiling fails due to compiler issues
+ifneq (,$(findstring mipsel,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+ifneq (,$(findstring alpha,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-64
+endif
+
+# no compile on the first shot
+ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+ifneq (,$(findstring armhf,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+ifneq (,$(findstring ia64,$(DEB_BUILD_ARCH)))
+TARGET := profile-build ARCH=general-64 optimize=no
+endif
+
+ifneq (,$(findstring m86k,$(DEB_BUILD_ARCH)))
+TARGET := build ARCH=general-32
+endif
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+TARGET2 := $(TARGET:profile-build=build)
+else
+TARGET2 := $(TARGET)
+endif
+
+
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+TESTCMD := 
+else
+TESTCMD := cd src && ./stockfish bench 32 1 10 default depth
+endif
+
+
+%:
+       dh $@ --sourcedirectory=src
+
+override_dh_auto_clean:
+       cd src && rm -rf *.gcda && touch .depend && make clean
+
+override_dh_auto_build:
+#      cd src && make $(TARGET2)
+       dh_auto_build --sourcedirectory=src --parallel -- $(TARGET2)
+
+override_dh_auto_test:
+       $(TESTCMD)
+
+override_dh_installman:
+       dh_installman debian/stockfish.6
diff --git a/source/format b/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/stockfish.6 b/stockfish.6
new file mode 100644 (file)
index 0000000..193618f
--- /dev/null
@@ -0,0 +1,61 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.\" Please adjust this date whenever revising the manpage.
+.\" 
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.TH "STOCKFISH" "6" "October  10, 2009" "" ""
+.SH "NAME"
+stockfish \- free UCI chess engine, to calculate chess moves
+.SH "SYNOPSIS"
+.B stockfish
+.SH "DESCRIPTION"
+This manual page documents the
+.B stockfish
+command.
+.PP 
+\fBstockfish\fP is an UCI chess engine, to calculate chess moves
+
+Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is
+not a complete chess program, but requires some UCI compatible GUI
+(like XBoard with PolyGlot, eboard, Jose, Arena, in order to be used 
+comfortably.  Read the documentation for your GUI of choice for information 
+about how to use Stockfish with your GUI.
+
+This version of Stockfish supports up to 8 CPUs, but has not been
+tested thoroughly with more than 2.  The program tries to detect the
+number of CPUs on your computer and set the number of search threads
+accordingly, but please be aware that the detection is not always
+correct.  It is therefore recommended to inspect the value of the
+"Threads" UCI parameter, and to make sure it equals the number of CPU
+cores on your computer. If you are using more than four threads, it
+is recommended to raise the value of "Minimum Split Depth" UCI parameter
+to 6.
+
+
+Opening book
+
+This version of stockfish has experimental support for PolyGlot opening
+books.  For information about how to create such books, consult the
+PolyGlot documentation.  
+
+.SH "OPTIONS"
+This program does NOT follow the usual GNU command line syntax, with long options starting with two dashes.
+.SH "SEE ALSO"
+Communication with UCI commands is documented by
+"The UCI Communication Protocol" in /usr/share/doc/stockfish/engine\-interface.txt.
+.SH "AUTHOR"
+stockfish was written by <Romstad Tord <tord@glaurungchess.com>> and Marco Costalba <mcostalba@gmail.com>.
+.PP 
+This manual page was written by Oliver Korff <ok@xynyx.de>,
+for the Debian project (but may be used by others).
diff --git a/watch b/watch
new file mode 100644 (file)
index 0000000..08a620f
--- /dev/null
+++ b/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/(\+|\.)dfsg$// \
+        https://github.com/official-stockfish/Stockfish/releases .*/sf_?(\d\S*)\.tar\.gz