--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/dirs
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/docs
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/docs
@@ -0,0 +1,4 @@
+build-tree/gift-*/NEWS
+build-tree/gift-*/README
+build-tree/gift-*/THANKS
+build-tree/gift-*/AUTHORS
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/control
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/control
@@ -0,0 +1,206 @@
+Source: gnuift
+Section: graphics
+Priority: optional
+Maintainer: Robert Jordens
+Build-Depends: cdbs, dh-buildinfo, debhelper (>> 4.0.0), docbook-to-man,
+ autoconf (>= 2.52), automake1.7 | automake, pkg-config, libtool, m4,
+ flex,
+ libexpat1-dev, libsqlplus-dev, libmagick6-dev | libmagick5-dev | libmagick-dev,
+ perl, libperl-dev, libtext-iconv-perl, libxml-handler-trees-perl,
+ libxml-sax-expat-perl, libxml-sax-perl, libxml-libxml-perl,
+ libxml-parser-perl, libhtml-parser-perl, libxml-writer-perl,
+ libparse-yapp-perl, libxml-xql-perl, libxml-dom-perl, libwww-perl
+Build-Depends-Indep: doxygen, latex, tetex-extra, linuxdoc-tools,
+ linuxdoc-tools-info, linuxdoc-tools-latex, linuxdoc-tools-text,
+ ldp-docbook-dsssl
+Standards-Version: 3.6.1
+
+Package: gnuift
+Architecture: any
+Depends: ${shlibs:Depends}, gnuift-perl (= ${Source-Version})
+Suggests: gnuift-doc, kmrml
+Description: GNU Image Finding Tool - index and search images by content
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need to
+ annotate all images before querying the collection.
+ .
+ The GIFT comes with a tool which lets you index whole directory trees
+ containing images in one go. You then can use the GIFT server and its
+ client, to browse your own image collections.
+ .
+ The GIFT is an open framework. The developers explicitly have taken
+ into account the possibility of adding new ways of querying to the
+ framework. The communication protocol for client-server communication,
+ MRML, is XML based and fully documented (http://www.mrml.net). This
+ aims at promoting code reuse among researchers and application
+ developers.
+ .
+ The current version of the GIFT can be seen in action at
+ http://viper.unige.ch/demo/
+ .
+ The GIFT (ex Viper) is the result of a research effort at the Vision
+ Group at the CUI (computer science center) of the University of Geneva
+ (see http://vision.unige.ch/). This cutting-edge research has been the
+ subject of several publications and conference talks. Details can be
+ found at http://viper.unige.ch/.
+ .
+ To avoid a name clash with the "gift" package (a fasttrack filesharing
+ client), these packages have been named "gnuift" (also to stress that
+ gnuift is a GNU project).
+
+Package: gnuift-doc
+Architecture: all
+Description: Documentation for gnuift
+ This package includes gift-guide, configuring-and-hacking-the-gift and
+ the doxygen reference tree. The application is contained in the gnuift
+ package.
+ .
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need to
+ annotate all images before querying the collection.
+ .
+ The GIFT comes with a tool which lets you index whole directory trees
+ containing images in one go. You then can use the GIFT server and its
+ client, to browse your own image collections.
+ .
+ The GIFT is an open framework. The developers explicitly have taken
+ into account the possibility of adding new ways of querying to the
+ framework. The communication protocol for client-server communication,
+ MRML, is XML based and fully documented (http://www.mrml.net). This
+ aims at promoting code reuse among researchers and application
+ developers.
+ .
+ To avoid a name clash with the "gift" package (a fasttrack filesharing
+ client), these packages have been named "gnuift" (also to stress that
+ gnuift is a GNU project).
+
+Package: libgnuift0
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Suggests: libgnuift0-dev (= ${Source-Version}), gnuift, gnuift-doc
+Description: GNU Image Finding Tool - libraries
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need
+ to annotate all images before querying the collection.
+ .
+ The GIFT is an open framework. The communication protocol for
+ client-server communication, MRML, is XML based and fully documented
+ (http://www.mrml.net).
+ .
+ To avoid a name clash with the "gift" package (a fasttrack filesharing
+ client), these packages have been named "gnuift" (also to stress that
+ gnuift is a GNU project).
+ .
+ More information can be found at http://www.gnu.org/software/gift/.
+
+Package: libgnuift0-dev
+Architecture: any
+Provides: libgnuift-dev
+Conflicts: libgnuift-dev
+Section: libdevel
+Depends: libgnuift0 (= ${Source-Version}), libexpat1-dev, libmagick6-dev | libmagick5-dev | libmagick-dev
+Description: libgnuift development files
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need
+ to annotate all images before querying the collection.
+ .
+ The GIFT is an open framework. The communication protocol for
+ client-server communication, MRML, is XML based and fully documented
+ (http://www.mrml.net).
+ .
+ To avoid a name clash with the "gift" package (a fasttrack filesharing
+ client), these packages have been named "gnuift" (also to stress that
+ gnuift is a GNU project).
+ .
+ More information can be found at http://www.gnu.org/software/gift/.
+
+Package: libmrml0
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Suggests: gnuift, libmrml0-dev (= ${Source-Version})
+Description: Multimedia Retrieval Markup Language
+ MRML's aims are to unify access to multimedia retrieval and management
+ software component in order to extend their capabilities. The success
+ of such a context has already been demonstrated via the development of
+ the GNU Image Finding Tool (GIFT).
+ .
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need
+ to annotate all images before querying the collection.
+ .
+ The GIFT is an open framework. The communication protocol for
+ client-server communication, MRML, is XML based and fully documented.
+ .
+ More information can be found at http://www.mrml.net/ and
+ http://www.gnu.org/software/gift/.
+
+Package: libmrml0-dev
+Architecture: any
+Provides: libmrml-dev
+Conflicts: libmrml-dev
+Depends: ${shlibs:Depends}, libmrml0 (= ${Source-Version}), libexpat1-dev
+Section: libdevel
+Description: libmrml development files
+ MRML's aims are to unify access to multimedia retrieval and management
+ software component in order to extend their capabilities. The success
+ of such a context has already been demonstrated via the development of
+ the GNU Image Finding Tool (GIFT).
+ .
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need
+ to annotate all images before querying the collection.
+ .
+ The GIFT is an open framework. The communication protocol for
+ client-server communication, MRML, is XML based and fully documented.
+ .
+ For more information about the Multimedia Retrieval Markup Language
+ have look at http://www.mrml.net/.
+
+Package: gnuift-perl
+Architecture: all
+Depends: gnuift (= ${Source-Version}), ${perl:Depends}, imagemagick, libtext-iconv-perl, libxml-handler-trees-perl, libxml-sax-expat-perl, libxml-sax-perl, libxml-libxml-perl, libxml-parser-perl, libhtml-parser-perl, libxml-writer-perl, libparse-yapp-perl, libxml-xql-perl, libxml-dom-perl, libwww-perl
+Description: GNU Image Finding Tool - perl modules
+ Architecture independent perl modules of gnuift. The application is
+ contained in the gnuift package.
+ .
+ The GIFT (the GNU Image-Finding Tool) is a Content Based Image
+ Retrieval System (CBIRS). It enables you to do Query By Example on
+ images, giving you the opportunity to improve query results by
+ relevance feedback. For processing your queries the program relies
+ entirely on the content of the images, freeing you from the need to
+ annotate all images before querying the collection.
+ .
+ The GIFT comes with a tool which lets you index whole directory trees
+ containing images in one go. You then can use the GIFT server and its
+ client, to browse your own image collections.
+ .
+ The GIFT is an open framework. The developers explicitly have taken
+ into account the possibility of adding new ways of querying to the
+ framework. The communication protocol for client-server communication,
+ MRML, is XML based and fully documented (http://www.mrml.net). This
+ aims at promoting code reuse among researchers and application
+ developers.
+ .
+ To avoid a name clash with the "gift" package (a fasttrack filesharing
+ client), these packages have been named "gnuift" (also to stress that
+ gnuift is a GNU project).
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/libmrml0-dev.install
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/libmrml0-dev.install
@@ -0,0 +1,6 @@
+debian/tmp/usr/lib/libMRML*.a
+debian/tmp/usr/lib/libMRML*.la
+debian/tmp/usr/lib/libMRML*.so
+debian/tmp/usr/include/libMRML
+debian/tmp/usr/bin/libMRML-config
+
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/libmrml0.install
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/libmrml0.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/libMRML*.so.*
+debian/tmp/usr/share/* usr/share/libmrml0
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/libgnuift0-dev.install
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/libgnuift0-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/lib/libGIFT*.a
+debian/tmp/usr/lib/libGIFT*.la
+debian/tmp/usr/lib/libGIFT*.so
+debian/tmp/usr/include/libGIFT*
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/gnuift-perl.links
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/gnuift-perl.links
@@ -0,0 +1,10 @@
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-add-collection.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-diagnose-print-all-ADI.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-dtd-to-keywords.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-dtd-to-tex.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-mrml-client.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-old-to-new-url2fts.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-perl-example-server.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-remove-collection.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-start.pl.1.gz
+usr/share/man/man1/gnuift.1.gz usr/share/man/man1/gift-url-to-fts.pl.1.gz
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/rules
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/rules
@@ -0,0 +1,78 @@
+#!/usr/bin/make -f
+# rules
+#
+# Robert Jordens
+#
+# This software may be used and distributed according to the terms
+# of the GNU General Public License, incorporated herein by reference.
+#
+# $Id: rules 158 2003-09-15 14:53:01Z rj $
+#
+
+
+include /usr/share/cdbs/1/class/makefile.mk
+DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed 's/-[^-]*$$//')
+DEB_UPSTREAM_TARBALL_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/\+[^+]*$$//')
+DEB_TAR_SRCDIR := gift-$(DEB_UPSTREAM_TARBALL_VERSION)
+include /usr/share/cdbs/1/rules/tarball.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
+ PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \
+ sed -e 's/.*parallel=\([0-9]\+\).*/\1/')
+ ifeq ($(DEB_BUILD_OPTIONS),$(PARALLEL_JOBS))
+ PARALLEL_JOBS := $(shell if [ -f /proc/cpuinfo ]; \
+ then echo `cat /proc/cpuinfo | grep 'processor' | wc -l`; \
+ else echo 1; fi)
+ endif
+ NJOBS := -j$(PARALLEL_JOBS)
+endif
+DEB_MAKE_ENVVARS := MAKEFLAGS=$(NJOBS) LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib
+
+DEB_CONFIGURE_EXTRA_FLAGS := --enable-shared=yes --enable-static=yes \
+ --enable-set-web-publishing-directory=/var/www/gnuift \
+ --enable-set-web-publishing-location=http://localhost/gnuift \
+ --enable-bayesian --enable-multi-threading
+
+DEB_DH_MAKESHLIBS_ARGS := -V
+DEB_SHLIBDEPS_INCLUDE := debian/libgnuift0/usr/lib debian/libmrml0/usr/lib
+DEB_PERL_INCLUDE := debian/gnuift/usr/bin debian/gnuift-perl/usr/share/perl5/GIFT debian/gnuift-perl/usr/share/gnuift debian/gnuift/usr/share/gnuift
+
+DEB_INSTALL_DOCS_ALL := $(shell cat debian/docs)
+DEB_INSTALL_CHANGELOGS_ALL := $(DEB_BUILDDIR)/ChangeLog
+
+post-patches:: debian/stamp-autotools-maintregen-arch
+debian/stamp-autotools-maintregen-arch:
+ cd $(DEB_BUILDDIR); sh ./bootstrap-cvs.sh ; \
+ cp /usr/bin/libtool $(DEB_BUILDDIR); libtoolize --force
+ touch debian/stamp-autotools-maintregen-arch
+
+build/gnuift::
+ docbook-to-man debian/gnuift.sgml > debian/gnuift.1
+
+# after the directories are created but before dh_compress is run.
+common-binary-post-install-arch::
+ dh_buildinfo
+
+.PHONY: update-create-orig-tarball
+update-create-orig-tarball:
+ mkdir -p tmp-orig-tree/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
+ cp *.tar.* tmp-orig-tree/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
+ tar -C tmp-orig-tree -czvf \
+ ../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
+ $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
+
+.PHONY: update-clean
+update-clean:
+ rm -rf tmp-orig-tree
+
+clean:: update-clean
+
+clean::
+ -rm -f Doc/*.txt Doc/*.tex GIFTServer/gift-mrml-messages/*.mrml \
+ dtd/mrml-parsing-log debian/gnuift.1
+ -rm -rf Doc/autoDoc
+ -rm -f debian/stamp-autotools-maintregen-arch
+
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/watch
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/watch
@@ -0,0 +1,2 @@
+# Site Directory Pattern Version Script
+ftp.gnu.org /gnu/gift gift-(.*)\.tar\.gz debian uupdate
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/changelog
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/changelog
@@ -0,0 +1,95 @@
+gnuift (0.1.9+3epsilon+cvs030915-4) unstable; urgency=low
+
+ * debian/patches/06_look-for-so-0.diff: added, closes: Bug#216398
+
+ -- Robert Jordens Fri, 11 Jun 2004 17:30:28 +0200
+
+gnuift (0.1.9+3epsilon+cvs030915-3) unstable; urgency=low
+
+ * debian/control: (Build-)Depend on libmagick6-dev; closes: Bug#248222
+
+ -- Robert Jordens Mon, 10 May 2004 01:40:37 +0200
+
+gnuift (0.1.9+3epsilon+cvs030915-2) unstable; urgency=low
+
+ * debian/control: made all descriptions more descriptive; closes: Bug#213404
+
+ -- Robert Jordens Tue, 30 Sep 2003 10:31:50 +0200
+
+gnuift (0.1.9+3epsilon+cvs030915-1) unstable; urgency=low
+
+ * Built a new upstream tarball from CVS with the note about military use
+ removed; closes: Bug#210868
+ * debian/rules: uses tarball and simple-patchsys now
+
+ -- Robert Jordens Mon, 15 Sep 2003 14:15:42 +0200
+
+gnuift (0.1.9+3epsilon-3) unstable; urgency=low
+
+ * Doc/gift-guide.sgml: licensing problem resolved with Wolfgang Mueller
+ ; see the bug for details;
+ closes: Bug#210868
+ * changed Wolfgangs e-mail address accordingly.
+ * debian/gnuift.sgml is now GPL
+
+ -- Robert Jordens Sun, 14 Sep 2003 19:03:11 +0200
+
+gnuift (0.1.9+3epsilon-2) unstable; urgency=low
+
+ * debian/rules
+ + don't let binary/gnuift depend on binary/gnuift-perl; breaks
+ autobuilding.
+ + new format for parallel building via DEB_BUILD_OPTIONS
+
+ -- Robert Jordens Thu, 11 Sep 2003 09:18:38 +0200
+
+gnuift (0.1.9+3epsilon-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/rules:
+ + switched to cdbs
+ + use dh_buildinfo
+ + enabled parallel building if USE_NJOBS set in the
+ environment
+ * debian/control
+ + changed rjo@gmx.de to jordens@debian.org
+ + Build-Depends: libmysqlclient-dev, emacsen
+ + updated descriptions
+ + fixed lib*-dev Conflicts and Depends
+ + added Build-Depends-Indep to Build-Depends
+ + gnuift-perl contains all perl modules
+ + suggest kmrml
+ * libtoolized anew
+ * g++/gcc 3.3:
+ + a few header files: #include
+ + line-join multiline mysql-statements
+ * fixed web pubblishing locations
+ * doxygen headers added from CVS
+ * fixed DESTDIR in libMRML/include/Makefile.am
+ * debian/gnuift.sgml: written manpage
+
+ -- Robert Jordens Thu, 4 Sep 2003 12:42:29 +0200
+
+gnuift (0.1.9-2) unstable; urgency=low
+
+ * notes from Bart Schuller :
+ * fill libgnuift0
+ * don't run doxygen twice
+ * moved the definitions of the hardcoded paths to configure.in
+ * export LIBRARY_PATH=`pwd`/debian/tmp/usr/lib; befor install
+
+ -- Robert Jordens Tue, 2 Sep 2003 22:18:01 +0200
+
+gnuift (0.1.9-1) unstable; urgency=low
+
+ * Initial Release.
+ * renamed to gnuift to evade clash with a FastTrack client named "gift"
+ * work on ACX_PTHREAD
+ * killed rpath in libtool
+ * fhs compliance (perl modules, libraries, executables, dtds)
+ * split off the libraries
+ * made the documentation work
+ * upload to Debian, which closes: Bug#137472
+
+ -- Robert Jordens Sat, 16 Nov 2002 12:24:52 +0100
+
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/gnuift.examples
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/gnuift.examples
@@ -0,0 +1 @@
+debian/Client.php
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/gnuift-doc.manpages
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/gnuift-doc.manpages
@@ -0,0 +1 @@
+Doc/autoDoc/man/man3/*
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/gnuift-perl.install
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/gnuift-perl.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/bin/C*.pm usr/share/perl5/GIFT
+debian/tmp/usr/bin/C*.pl usr/share/gnuift
+debian/tmp/usr/bin/gift*.pl
+debian/tmp/usr/share/libmrml0/gift*.mrml
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/compat
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/compat
@@ -0,0 +1 @@
+4
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/gnuift-doc.doc-base.doxygen
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/gnuift-doc.doc-base.doxygen
@@ -0,0 +1,14 @@
+Document: gnuift-doxygen
+Title: Gnu Image Finding Tool - Doxygen source documentation
+Author: Wolfgang Mueller
+Section: Apps/Graphics
+Abstract: Doxygen source documentation for the GIFT
+ GIFT is a content based image retrieval system (CBIRS). It gives the
+ user the possibility to index and search images without having to
+ annotate them first. Indexing is done using image properties such as
+ color and texture.
+
+Format: HTML
+Index: /usr/share/doc/gnuift-doc/html/index.html
+Files: /usr/share/doc/gnuift-doc/html/*
+
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/Client.php
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/Client.php
@@ -0,0 +1,939 @@
+
+
+
+
+/********PHP CODE START HERE*******/
+// PHP MRML Client to the GIFT system written by Nicolas Chabloz
+// Copyright (C) 2002 CUI, University of Geneva
+//
+// 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 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+// 02111-1307 USA
+//***************VARIABLES****************
+
+$tmp=explode('/',$phpurl);
+$phpname=$tmp[count($tmp)-1];
+$phppath=substr($phpurl,0,strlen($phpurl)-strlen($phpname));
+
+// Do you want to allow image upload? ("yes" or "no")
+$allowUpload="no";
+
+//Images Sizes
+$ImgHeight=120;
+$ImgWidth=120;
+//Nb Return Images
+$NbReturnImages="10,20,50,100,140";
+//xml version
+$xml='';
+//mrml dtd path
+$mrmldtd='';
+//path for image upload:
+$ImagePath="image/";
+//images extension:
+$ImagesExtension="gif,jpeg,jpg,tiff,tif,png,pict,pcx,bmp,pgm,ppm";
+//***************VARIABLES****************
+//global variable
+$Depth=0;
+$Collection=array();
+$NbCollection=-1;
+$Algorithm=array();
+$NbAlgorithm=-1;
+$Property=array();
+$NbProperty=-1;
+$NbPropertyAlgo=array();
+$Parent=array();
+
+
+//Javascript functions
+//to submit the form in case of algorithm change
+
+ echo "
+
+ ";
+
+
+
+//***********SOCKET FUNCTIONS************
+//Open a socket
+function connection($server,$port) {
+ $socket = fsockopen ($server,$port, &$errno, &$errstr, 30);
+ if (!$socket) {die("$errstr ($errno) \n");}
+ return $socket;
+}
+
+//Make a request to the server and return the answer
+function request($socket,$request) {
+ fputs ($socket, $request);
+ $answer="";
+ while (!feof($socket)) {
+ $buf = fgets($socket,1);
+ $answer .=$buf;
+ }
+ return $answer;
+}
+
+//***********REQUEST FUNCTIONS************
+function MakeRandom() {
+ //global variables
+ global $xml,$mrmldtd;
+ global $Algorithm,$NbAlgorithm;
+ global $AlgorithmId,$CollectionId,$SessionId;
+ global $server,$port,$Return;
+
+ //find the Algorithm Type
+ for ($i=0;$i<=$NbAlgorithm;$i++){
+ if ($Algorithm[$i]["ALGORITHM-ID"]==$AlgorithmId) {$AlgorithmType=$Algorithm[$i]["ALGORITHM-TYPE"];}
+ }
+
+ //The MRML request to fetch a random set of images
+ $RandomRequest= $xml . $mrmldtd .
+ "
+
+
+
+
+
+ ";
+
+
+ //Make the request
+ $socket=connection($server,$port);
+ $answer=request($socket,$RandomRequest);
+ fclose($socket);
+
+ //Create a xml parser, Parse the answer and free the parser
+ $MRML_parser = xml_parser_create();
+ xml_set_element_handler($MRML_parser, "MRMLstart", "MRMLend");
+ xml_parse($MRML_parser, $answer);
+ xml_parser_free($MRML_parser);
+}
+
+//make a query
+function MakeQuery() {
+ //global variables
+ global $HTTP_POST_VARS,$HTTP_POST_FILES;
+ global $xml,$mrmldtd,$ImagePath,$phppath;
+ global $Algorithm,$NbAlgorithm,$ImgHeight,$ImgWidth;
+ global $AlgorithmId,$CollectionId,$SessionId,$OldCollectionId;
+ global $server,$port,$Return,$url,$SERVER_NAME,$DOCUMENT_ROOT;
+ global $Property,$NbProperty,$NbPropertyAlgo,$OldAlgorithm;
+ global $imageloc,$imagerel,$nbimage,$QueryImgNb,$QueryImgRelLoc;
+
+ //get the upload file name
+ $NameImgUpload=$HTTP_POST_FILES['UserImage']['name'];
+
+ //if there is a upload file...
+ if ($NameImgUpload!="") {
+ //check if file exist
+ if ($HTTP_POST_FILES['UserImage']['tmp_name']=="none") {
+ die("
file upload error: $NameImgUpload
");
+ }
+
+ //check file extension
+ CheckExtension($NameImgUpload);
+
+ //move the file to $ImagePath directory
+ $temp=explode(".",$NameImgUpload);
+ $desti1=$ImagePath.$NameImgUpload;
+ $desti2 = $ImagePath . $temp[0] . ".jpg";
+ if ($desti1==$desti2) {$desti2=$ImagePath . "Thumb_".$temp[0] . ".jpg";}
+
+ if (!move_uploaded_file($HTTP_POST_FILES['UserImage']['tmp_name'],$desti1)) {die ("error in transfert");}
+
+ //convert image to jpg with "convert"
+ $command=escapeShellCmd("./convert -geometry $ImgWidthx$ImgHeight $desti1 $desti2");
+ system($command);
+ }
+
+
+
+ //check if the url and his extension is valid.
+ if ($url!="") {
+ if (!@fopen($url,"rb")){
+ die("
Bad url: $url
");
+ }
+
+ //check file extension
+ CheckExtension($url);
+
+ //copy image from url
+ $urltmp=explode('/',$url);
+ $urltmp2=explode('.',$urltmp[count($urltmp)-1]);
+ $dest1=$ImagePath."tmp.".$urltmp2[1];
+ $dest2 = $ImagePath . $urltmp2[0] . ".jpg";
+ if (!($fp = fopen($url,"r"))) die("Could not open src");
+ if (!($fp2 = fopen($dest1,"w"))) die("Could not open dest");
+ while ($contents = fread( $fp,4096)) {
+ fwrite( $fp2, $contents);
+ }
+ fclose($fp);
+ fclose($fp2);
+
+ //convert image to jpg
+ $command=escapeShellCmd("./convert -geometry $ImgWidthx$ImgHeight $dest1 $dest2");
+ system($command);
+ }
+
+ //find the right algorithm
+ for ($i=0;$i<=$NbAlgorithm;$i++){
+ if ($Algorithm[$i]["ALGORITHM-ID"]==$AlgorithmId) {
+ $AlgorithmType=$Algorithm[$i]["ALGORITHM-TYPE"];
+ $algonum=$i;
+ }
+ }
+
+ $nbimage=0;
+ $nbrel=0;
+ $nbthumb=0;
+ //find image location,relevance and thumbnail location
+ while (list ($key, $val) = each ($HTTP_POST_VARS)) {
+ if (is_int(strpos($key,"image_"))){
+ $imageloc[$nbimage]=$val;
+ $nbimage++;
+ }
+ if (is_int(strpos($key,"rel_img_"))){
+ $imagerel[$nbrel]=$val;
+ $nbrel++;
+ }
+ if (is_int(strpos($key,"thumb_img_"))){
+ $imagethumb[$nbthumb]=$val;
+ $nbthumb++;
+ }
+
+ }
+
+ //find the query image
+ $QueryImgNb=0;
+ for ($i=0;$i<$nbimage;$i++){
+ if ($imagerel[$i]==-1 || $imagerel[$i]==1) {
+ $QueryImg[$QueryImgNb]=$imageloc[$i];
+ $QueryImgThumb[$QueryImgNb]=$imagethumb[$i];
+ $QueryImgRel[$QueryImgNb]=$imagerel[$i];
+ if ($imagerel[$i]==1) {
+ $QueryImgRelLoc[$QueryImg[$QueryImgNb]]=1;
+ }
+ $QueryImgNb++;
+ }
+ }
+
+ //The MRML request
+ $QueryRequest= $xml . $mrmldtd .
+ "
+
+
+
+ ";
+ //add the image location to the request
+ for ($i=0;$i<$nbimage;$i++){
+ $QueryRequest .= "\n";
+ }
+ //ad the image passed by url
+ if ($url!="") {
+ $QueryRequest .= "\n";
+ $QueryImg[$QueryImgNb]=$url;
+ $QueryImgThumb[$QueryImgNb]=$phppath.$dest2;
+ $QueryImgRel[$QueryImgNb]=1;
+ $QueryImgNb++;
+ }
+ //ad the image passed by file upload
+ if ($NameImgUpload!="") {
+ $NameImgUploadLoc= $phppath.$desti1;
+ $QueryRequest .= "\n";
+ $QueryImg[$QueryImgNb]=$NameImgUploadLoc;
+ $QueryImgThumb[$QueryImgNb]=$phppath.$desti2;
+ $QueryImgRel[$QueryImgNb]=1;
+ $QueryImgNb++;
+ }
+
+ $QueryRequest .= "
+ ";
+
+ //Display QueryImg
+ ShowQueryImg($QueryImgNb,$QueryImg,$QueryImgThumb,$QueryImgRel);
+
+ echo "
QueryRequest: $QueryRequest
";
+
+ echo "
Result:
";
+
+
+ //Make the request
+ $socket=connection($server,$port);
+ $answer=request($socket,$QueryRequest);
+ fclose($socket);
+
+ //Create a xml parser, Parse the answer and free the parser
+ $MRML_parser = xml_parser_create();
+ xml_set_element_handler($MRML_parser, "MRMLstart", "MRMLend");
+ xml_parse($MRML_parser, $answer);
+ xml_parser_free($MRML_parser);
+
+}
+
+//get info form server
+function GetInfo() {
+ global $xml,$mrmldtd,$allowUpload;
+ global $server,$port,$name;
+
+ //simple mrml request
+ $GetInfo= $xml . $mrmldtd .
+ "
+
+
+ ";
+
+ //Make the first request
+ $socket=connection($server,$port);
+ $answer=request($socket,$GetInfo);
+ fclose($socket);
+
+ //Create a xml parser, Parse the answer and free the parser
+ $MRML_parser = xml_parser_create();
+ xml_set_element_handler($MRML_parser, "MRMLstart", "MRMLend");
+ xml_parse($MRML_parser, $answer);
+ xml_parser_free($MRML_parser);
+
+ //show collections, algorithms and ...
+ echo "
Image uploading feature disabled";
+ ShowButtons();
+}
+
+//***********PARSING FUNCTIONS************
+function MRMLstart($parser, $name, $attrs) {
+ global $Collection,$NbCollection;
+ global $Algorithm,$NbAlgorithm;
+ global $Property,$NbProperty,$NbPropertyAlgo;
+ global $SessionId,$Submit,$Depth,$Parent;
+
+ //parse MRML tag
+ switch ($name) {
+ case "ACKNOWLEDGE-SESSION-OP":
+ //Get session id
+ if ($SessionId=="") {
+ $SessionId=$attrs["SESSION-ID"];
+ }
+
+ echo "";
+ break;
+
+ case "COLLECTION":
+ //Get Collection
+ $NbCollection++;
+ while (list ($key, $val) = each ($attrs)) {
+ $Collection[$NbCollection][$key]=$val;
+ }
+ break;
+
+ case "ALGORITHM":
+ //Get alorithm
+ if ($attrs["ALGORITHM-TYPE"]!="") {
+ $NbProperty=-1;
+ $Depth=0;
+ $NbAlgorithm++;
+ while (list ($key, $val) = each ($attrs)) {
+ $Algorithm[$NbAlgorithm][$key]=$val;
+ }
+ }
+ break;
+
+ case "PROPERTY-SHEET":
+ //Get alorithm property
+ if ($NbAlgorithm==-1) {$NbAlgorithm=0;}
+ $NbProperty++;
+ $NbPropertyAlgo[$NbAlgorithm]=$NbProperty;
+ while (list ($key, $val) = each ($attrs)) {
+ $Property[$NbAlgorithm][$NbProperty][$key]=$val;
+ }
+
+ //save Depth and parent from the property
+ $Property[$NbAlgorithm][$NbProperty]["DEPTH"]=$Depth;
+ $Property[$NbAlgorithm][$NbProperty]["PARENT"]=$Parent[$Depth];
+
+ //increase Depth
+ $Depth++;
+
+ $Parent[$Depth]=$NbProperty;
+
+ break;
+
+ case "QUERY-RESULT-ELEMENT":
+ //get image info
+ global $imageloc,$imagerel,$nbimage,$QueryImgRelLoc;
+ $ImgLoc=$attrs["IMAGE-LOCATION"];
+ $ImageThumb=$attrs["THUMBNAIL-LOCATION"];
+ $Similarity=$attrs["CALCULATED-SIMILARITY"];
+ //echo "ImgLoc: -$ImgLoc- , ImageThumb: -$ImageThumb- ";
+ if ($Submit=="Random") {ShowImage($ImgLoc,$ImageThumb,$Similarity,0);}
+ if ($Submit=="Query" && $QueryImgRelLoc[$ImgLoc]=="") {ShowImage($ImgLoc,$ImageThumb,$Similarity,0);}
+ if ($Submit=="Query" && $QueryImgRelLoc[$ImgLoc]!="") {ShowImage($ImgLoc,$ImageThumb,$Similarity,1);}
+
+ break;
+ }
+}
+
+function MRMLend($parser, $name) {
+ global $Depth;
+ switch ($name) {
+ case "PROPERTY-SHEET":
+ //decrease depth
+ $Depth--;
+ break;
+ }
+}
+
+//***********DISPLAY FUNCTIONS************
+
+
+//show the query images
+function ShowQueryImg($QueryImgNb,$QueryImg,$QueryImgThumb,$QueryImgRel) {
+ //global variable
+ global $SERVER_NAME,$DOCUMENT_ROOT,$ImgWidth,$ImgHeight;
+
+
+ $tr=0;
+ if ($QueryImgNb>0) {
+ echo "
Query:
";
+ for ($i=0;$i<$QueryImgNb;$i++) {
+
+ if ($tr%5==0) {echo "
";}
+
+ //get name of the image from his url
+ //and use it for the "alt" tag
+ $extmp=explode('/',$QueryImg[$i]);
+ $alt=$extmp[count($extmp)-1];
+
+ //get real path of the image location
+ $temp=substr($QueryImgThumb[$i], strlen($SERVER_NAME)+7, strlen($QueryImgThumb[$i]));
+ //get the size of this image
+ $size=@GetImageSize($DOCUMENT_ROOT . $temp);
+
+ //calculate the right proportion for the reduce image heigh and image width
+ if ($size[0]!="") {
+ if ($size[0]>=$size[1]) {
+ $TmpHeight=@(($size[1]*$ImgWidth)/$size[0]);
+ $TmpWidth=$ImgWidth;
+ }
+ else {
+ $TmpWidth=@(($size[0]*$ImgHeight)/$size[1]);
+ $TmpHeight=$ImgHeight;
+ }
+ }
+ else {
+ $TmpHeight=$ImgHeight;
+ $TmpWidth=$ImgWidth;
+ }
+
+ //display image and some info
+ echo "
";
+
+ $tr++;
+ if ($i==$QueryImgNb-1) {$tr=5;}
+ if ($tr%5==0) {echo "
";}
+
+ }
+ echo "
";
+ }
+}
+
+//same function but for result iamge
+function ShowImage($ImageLoc,$ImageThumb,$Similarity,$Rel) {
+ global $CollectionId,$QueryImgNb,$DOCUMENT_ROOT,$SERVER_NAME;
+ global $Return,$ImgWidth,$ImgHeight;
+ static $nbimage=0;
+ static $first=true;
+ static $tmp=0;
+
+ //get name of the image form his url
+ //and use it for the "alt" tag
+ $extmp=explode('/',$ImageLoc);
+ $alt=$extmp[count($extmp)-1];
+
+ if ($first) {$tmp=$QueryImgNb;$first=false;}
+ if ($nbimage==0) {echo "
";}
+ if ($nbimage%5==0) {echo "
";}
+
+ //get real path of the image location
+ $temp=substr($ImageThumb, strlen($SERVER_NAME)+7, strlen($ImageThumb));
+ //get the size of this image
+ $size=@GetImageSize($DOCUMENT_ROOT . $temp);
+ if ($size[0]>=$size[1]) {
+ $TmpHeight=@(($size[1]*$ImgWidth)/$size[0]);
+ $TmpWidth=$ImgWidth;
+ }
+ else {
+ $TmpWidth=@(($size[0]*$ImgHeight)/$size[1]);
+ $TmpHeight=$ImgHeight;
+ }
+
+ //display image and some info
+ echo '
+ Now you are ready to index a collection.
+@@ -231,7 +232,8 @@
+
+
+
+-
++
++Starting the server
+
When the indexing is done, you can start the GIFT server:
+ gift.
+ At the time of writing, gift will output tons of debugging output on
+@@ -251,6 +253,7 @@
+ to the GIFT, for example:
+ gift 12888 /usr/local/share/shared-gift-collections/
+
++
+
+
+ Getting started with the Charmer interface
+@@ -286,7 +289,6 @@
+ multiple of these images (they will get a green frame when clicked),
+ and send a query for them by clicking on the binoculars
+ button.
+-
+ Getting back your query result, you are able to
+ improve it. You can either click on some of the query results (thus
+ adding "positive" images to your query) or click the right mouse
+only in patch2:
+unchanged:
+--- gnuift-0.1.9+3epsilon+cvs030915.orig/Doc/configuring-and-hacking-the-gift.sgml
++++ gnuift-0.1.9+3epsilon+cvs030915/Doc/configuring-and-hacking-the-gift.sgml
+@@ -1,4 +1,4 @@
+-
++
+
+
+ Configuring and hacking the GIFT
--- gnuift-0.1.9+3epsilon+cvs030915.orig/debian/patches/05_add-doxy-header-and-footer.diff
+++ gnuift-0.1.9+3epsilon+cvs030915/debian/patches/05_add-doxy-header-and-footer.diff
@@ -0,0 +1,20 @@
+--- Doc/HTML/DoxygenFooter.html
++++ Doc/HTML/DoxygenFooter.html
+@@ -0,0 +1,5 @@
++
++
++ Need for discussion? Want to contribute? Contact help-gift@gnu.org Generated using Doxygen
++