--- gfaim-0.30.orig/debian/gfaim.desktop +++ gfaim-0.30/debian/gfaim.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Gfaim +Comment=Find any recipe you want +Exec=gfaim +Terminal=false +Type=Application +StartupNotify=true +MimeType=text/plain; +Icon=application-default-icon +Categories=GNOME;GTK;Application;Utility; --- gfaim-0.30.orig/debian/compat +++ gfaim-0.30/debian/compat @@ -0,0 +1 @@ +5 --- gfaim-0.30.orig/debian/gfaim.manpages +++ gfaim-0.30/debian/gfaim.manpages @@ -0,0 +1 @@ +debian/gfaim.1 --- gfaim-0.30.orig/debian/gfaim.install +++ gfaim-0.30/debian/gfaim.install @@ -0,0 +1,3 @@ +debian/tmp/usr/bin/gfaim +debian/tmp/usr/lib/gfaim/imprec +debian/gfaim.desktop usr/share/applications --- gfaim-0.30.orig/debian/gfaim-data.install +++ gfaim-0.30/debian/gfaim-data.install @@ -0,0 +1 @@ +debian/tmp/usr/share --- gfaim-0.30.orig/debian/copyright +++ gfaim-0.30/debian/copyright @@ -0,0 +1,39 @@ +This package was debianized by Albin Tonnerre on +Sun, 19 Nov 2006 11:46:23 +0100 + + +Copyright for gfaim +========================================================== +The source code is available on the homepage of the project +For further informations, please see http://freeperso.free.fr/gfaim.html + +Copyright (C) by Laurent CHRETIEN +Contributors: Alexandre POKALL for the recipes database + +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., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA. + +On Debian systems, the complete text of the GNU General Public +License can be found in '/usr/share/common-licenses/GPL'. + +Copyright for gfaim-data, the recipes database used by gfaim +============================================================ +Those recipes are only for private use. Any commercial use of one, several +or all those recipes is totally forbidden. +Please keep in mind that writing all those recipes - which are only a part of +all my recipes - took me about 750 hours + +For any commercial use of those recipes, please contact +Alexandre PUKALL --- gfaim-0.30.orig/debian/control +++ gfaim-0.30/debian/control @@ -0,0 +1,31 @@ +Source: gfaim +Section: misc +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Albin Tonnerre +Build-Depends: debhelper (>= 5.0.0), cdbs, libgtk2.0-dev +Standards-Version: 3.7.2 + +Package: gfaim +Section: misc +Architecture: any +Depends: ${shlibs:Depends}, gfaim-data (= ${Source-Version}), enscript +Description: A small utility that allows you to find quickly a lot of recipes + Gfaim is a small utility written using GTK+ which allows you to find a lot of + recipes easily by typing the name of the ingredient you want. Its database + contains more then 10 000 recipes. Please note that those recipes are written + in French. + . + This package contains binaries for gfaim + +Package: gfaim-data +Section: misc +Architecture: all +Recommends: gfaim +Description: A utility that allows you to find lots of recipes written in French + Gfaim is a small utility written using GTK+ which allows you to find a lot of + recipes easily by typing the name of the ingredient you want. Its database + contains more then 10 000 recipes. Please note that those recipes are written + in French. + . + This package contains the recipe database for gfaim --- gfaim-0.30.orig/debian/gfaim.1 +++ gfaim-0.30/debian/gfaim.1 @@ -0,0 +1,22 @@ +.\"Created with GNOME Manpages Editor Wizard +.\"http://gmanedit.sourceforge.net +.\"Sergio Rua +.\" +.TH gfaim 1 "Nov 24, 2006" "gfaim" + +.SH NAME +gfaim \- a recipes database and search engine + +.SH DESCRIPTION +This manual page explains the +.B gfaim +program. +.PP +\fBgfaim\fP allows you to search into a database of about 10'000 recipes. Juste enter the keyword you want in the search box and gfaim finds the recipes matching your request. + +.SH BUGS +Please reports bugs on the Ubuntu Launchpad for gfaim bugs : +https://bugs.launchpad.net/ubuntu/+source/gfaim/+bugs + +.SH AUTHOR +This man page was written by Albin Tonnerre for the Ubuntu GNU/Linux system (but may be used by others). --- gfaim-0.30.orig/debian/changelog +++ gfaim-0.30/debian/changelog @@ -0,0 +1,27 @@ +gfaim (0.30-0ubuntu3) oneiric; urgency=low + + * Update 01_Makefile.patch to use -D_GNU_SOURCE, removing implicit + pointer conversion warning. Fixes FTBFS. (LP: #770941) + + -- Daniel T Chen Fri, 16 Sep 2011 08:41:23 -0400 + +gfaim (0.30-0ubuntu2) intrepid; urgency=low + + * Modify Maintainer value to match the DebianMaintainerField + specification. (LP: #230350) + + -- Andrea Colangelo Fri, 23 May 2008 10:11:30 +0200 + +gfaim (0.30-0ubuntu1) feisty; urgency=low + + * Initial Release + * Patch 01_gfaim.patch: fix compilation error and possible program segfault + Make the code use gtk+ functions, not old gtk1 broken ones + * Patch 02_Makefile.patch: fix data files install dir and add -Wall gcc flag + Make gfaim compile against libgtk2.0 + * Patch 03_lisezmoi.patch : update info as the binary is no longer in the + source tarball + * Remove the pre-compiled binary from the source tarball + * Add english license informations from upstream in the orig tarball + + -- Albin Tonnerre Sun, 19 Nov 2006 11:46:23 +0100 --- gfaim-0.30.orig/debian/rules +++ gfaim-0.30/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +DEB_MAKE_CLEAN_TARGET := clean +DEB_MAKE_BUILD_TARGET := gfaim +DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(CURDIR)/debian/tmp + +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk --- gfaim-0.30.orig/debian/patches/01_Makefile.patch +++ gfaim-0.30/debian/patches/01_Makefile.patch @@ -0,0 +1,33 @@ +diff -Nur -x '*.orig' -x '*~' gfaim-0.30//Makefile gfaim-0.30.new//Makefile +--- gfaim-0.30//Makefile 2000-11-21 06:35:22.000000000 -0500 ++++ gfaim-0.30.new//Makefile 2011-09-16 07:12:36.000000000 -0400 +@@ -1,18 +1,22 @@ + CC=gcc +-DATADIR=/usr/lib/gfaim ++DATADIR=/usr/share/gfaim ++IMPRECDIR=/usr/lib/gfaim + + gfaim: gfaim.c +- $(CC) -DDATADIR="\"$(DATADIR)\"" `gtk-config --cflags` gfaim.c -o gfaim `gtk-config --libs` ++ $(CC) -D_GNU_SOURCE -Wall -DIMPRECDIR="\"$(IMPRECDIR)"\" -DDATADIR="\"$(DATADIR)\"" `pkg-config --cflags gtk+-2.0` gfaim.c -o gfaim `pkg-config --libs gtk+-2.0` + + clean: + rm -f *.o gfaim + + install: +- install -g bin -m 755 gfaim /usr/bin +- install -g bin -m 755 imprec /usr/bin +- install -d $(DATADIR) +- install *.dat *.idx -m 644 $(DATADIR) +- install *.txt /usr/doc/gfaim ++ install -d $(DESTDIR)/usr/bin ++ install -d $(DESTDIR)/usr/lib/gfaim ++ install -g bin -m 755 gfaim $(DESTDIR)/usr/bin ++ install -g bin -m 755 imprec $(DESTDIR)/$(IMPRECDIR) ++ install -d $(DESTDIR)/$(DATADIR) ++ install -d $(DESTDIR)/usr/share/doc/gfaim ++ install *.dat *.idx -m 644 $(DESTDIR)/$(DATADIR) ++ install *.txt $(DESTDIR)/usr/share/doc/gfaim + + + --- gfaim-0.30.orig/debian/patches/02_gfaim.patch +++ gfaim-0.30/debian/patches/02_gfaim.patch @@ -0,0 +1,195 @@ +diff -Nur gfaim-0.30/gfaim.c gfaim-0.30.new/gfaim.c +--- gfaim-0.30/gfaim.c 2000-11-21 20:58:42.000000000 +0100 ++++ gfaim-0.30.new/gfaim.c 2007-01-10 10:05:08.000000000 +0100 +@@ -9,8 +9,9 @@ + GtkWidget *liste; + GtkWidget *entry1; + GtkWidget *scrolltexte; +- GtkWidget *texte; + GtkWidget *scrolllist; ++ GtkWidget *view; ++ GtkTextBuffer *buffer; + + /*icone du programme*/ + /* XPM */ +@@ -1042,62 +1043,51 @@ + char *renseigne; + + renseigne="\n\n\n Gfaim v0.3\n\nlogiciel de recherche pour la base de recettes d'Alexandre PUKALL\nGfaim est sous licence GPL mais la base de recettes d'alexandre PUKALL est en freeware elle ne doit pas servir pour un logiciel commercial"; +-/*bloque l'affichage du texte*/ +- gtk_text_freeze(GTK_TEXT(texte)); ++ ++ GtkTextIter iter1, iter2; + + /*pointe vers le debut du texte*/ +- gtk_text_set_point(GTK_TEXT(texte),0); ++ gtk_text_buffer_get_start_iter(buffer, &iter1); ++ gtk_text_buffer_get_end_iter(buffer, &iter2); + + /*efface tous*/ +- gtk_text_forward_delete(GTK_TEXT(texte),gtk_text_get_length(GTK_TEXT(texte))); +- ++ gtk_text_buffer_delete(buffer, &iter1, &iter2); ++ gtk_text_buffer_get_start_iter(buffer, &iter1); + /*copie la ligne dans la zone d'affichage*/ +- gtk_text_insert(GTK_TEXT(texte),NULL,NULL,NULL,renseigne,strlen(renseigne)); +- +-/*replace au debut de la recette*/ +- gtk_text_set_point(GTK_TEXT(texte),0); +- +-/*libere l'affichage du texte*/ +- gtk_text_thaw(GTK_TEXT(texte)); ++ gtk_text_buffer_insert(buffer,&iter1,renseigne,strlen(renseigne)); + } + + /*charge la recette d'aprés les indications binaire debut et fin*/ + void charge_recette(int debut,int fin) + { +- ++ GtkTextIter iter1, iter2; ++ gchar *utf8_buf; + /*buffer pour la lecture d'une ligne de recette*/ + char buf[BUFSIZE]; + + /*positionnement au debut du fichier*/ + fseek(fp,0,0); + +-/*bloque l'affichage du texte*/ +- gtk_text_freeze(GTK_TEXT(texte)); +- +-/*pointe vers le debut du texte*/ +- gtk_text_set_point(GTK_TEXT(texte),0); +- +-/*efface tous*/ +- gtk_text_forward_delete(GTK_TEXT(texte),gtk_text_get_length(GTK_TEXT(texte))); ++ gtk_text_buffer_get_start_iter(buffer, &iter1); ++ gtk_text_buffer_get_end_iter(buffer, &iter2); ++ gtk_text_buffer_delete(buffer, &iter1, &iter2); + + /*placement au debut du fichier*/ + fseek(fp,debut,0); +- ++ gsize bytes_read, bytes_written; ++ GIConv convert; + /*lecture de la recette*/ ++ convert = g_iconv_open("UTF8", "ISO8859-1"); + while (ftell(fp) < fin) + { + fgets(buf,BUFSIZE,fp); ++ utf8_buf = g_convert_with_iconv(buf, -1, convert, &bytes_read, &bytes_written, NULL); + + /*copie la ligne dans la zone d'affichage*/ +- gtk_text_insert(GTK_TEXT(texte),NULL,NULL,NULL,buf,strlen(buf)); ++ gtk_text_buffer_get_end_iter(buffer, &iter2); ++ gtk_text_buffer_insert(buffer, &iter2, utf8_buf, -1); + } +- +-/*replace au debut de la recette*/ +- gtk_text_set_point(GTK_TEXT(texte),0); +- +-/*libere l'affichage du texte*/ +- gtk_text_thaw(GTK_TEXT(texte)); +- ++ g_iconv_close(convert); + } + + +@@ -1168,27 +1158,26 @@ + int k; + int nbtrouve=0; + char *loc; +- char buf[61]; + int ligne =0; +- ++ char *buf; + /* le texte trouvé*/ + gchar *label; + + /* la copie pour la clist*/ + gchar *texte[1][1]; + gchar *c1,*c2; +- ++ + /*parcours le tableau*/ + for (k=0; k<10510; k++) + { + loc =NULL; +- ++ + /*copie d'un element du tableau*/ +- strcpy(buf,plist[k].libelle); ++ buf=strdup(plist[k].libelle); + + /*recherche de rlibelle dans buf*/ + +- (int *) loc = strcasestr(buf,rlibelle); ++ loc = (char *)strcasestr(buf,rlibelle); + + /* si c'est zero je passe*/ + if (loc != NULL) +@@ -1206,8 +1195,8 @@ + gtk_clist_set_row_data(GTK_CLIST(liste),ligne,(int *) plist[k].numero); + ligne++; + g_free(label); +- + } ++ free(buf); buf = NULL; + } + return; + } /*fin de la fonction recherche*/ +@@ -1245,7 +1234,7 @@ + int position; + + /* renseigne les variables de la position de la recette */ +- (int *) position=gtk_clist_get_row_data(GTK_CLIST(liste),row); ++ position=(int)gtk_clist_get_row_data(GTK_CLIST(liste),row); + vdebut=plist[position].rdebut; + vfin=plist[position].rfin; + +@@ -1279,12 +1268,16 @@ + } + + /*copie du texte de la rectte dans le fichier temporaire*/ +- tampon = gtk_editable_get_chars(GTK_EDITABLE(texte),0,-1); ++ GtkTextIter iter1, iter2; ++ gtk_text_buffer_get_start_iter(buffer, &iter1); ++ gtk_text_buffer_get_end_iter(buffer, &iter2); ++ ++ tampon = gtk_text_buffer_get_text(buffer, &iter1, &iter2, FALSE); + fwrite(tampon,strlen(tampon),1,ftemp); + fclose(ftemp); + + /* lance la routine d'impression */ +- system("imprec"); ++ system(IMPRECDIR"/imprec"); + + /*focus a la zone de saisie */ + gtk_widget_grab_focus(entry1); +@@ -1402,16 +1395,20 @@ + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolltexte), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); + +- texte = gtk_text_new (NULL, NULL); +- gtk_widget_ref (texte); +- gtk_object_set_data_full (GTK_OBJECT (fenetre1), "texte", texte, ++ view = gtk_text_view_new(); ++ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); ++ ++ gtk_widget_ref (view); ++ gtk_object_set_data_full (GTK_OBJECT (fenetre1), "texte", view, + (GtkDestroyNotify) gtk_widget_unref); +- gtk_text_set_word_wrap(GTK_TEXT(texte),TRUE); +- gtk_widget_show (texte); +- gtk_container_add (GTK_CONTAINER (scrolltexte), texte); ++ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); ++ gtk_widget_show (view); ++ gtk_container_add (GTK_CONTAINER (scrolltexte), view); + + /*la barre d'icone*/ +- bare_icone = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); ++ bare_icone = gtk_toolbar_new(); ++ gtk_toolbar_set_orientation(GTK_TOOLBAR(bare_icone), GTK_ORIENTATION_HORIZONTAL); ++ gtk_toolbar_set_style(GTK_TOOLBAR(bare_icone), GTK_TOOLBAR_BOTH); + gtk_widget_ref (bare_icone); + gtk_object_set_data_full (GTK_OBJECT (fenetre1), "bare_icone", bare_icone, + (GtkDestroyNotify) gtk_widget_unref);