--- xtranslate-0.2.orig/Makefile +++ xtranslate-0.2/Makefile @@ -6,16 +6,16 @@ all: xtranslate strip xtranslate - install -d $(WD)/usr/X11R6/bin - cp xtranslate $(WD)/usr/X11R6/bin + install -d $(WD)/usr/bin + cp xtranslate $(WD)/usr/bin xtranslate: xtranslate.c $(CC) -$(OFLAGS) xtranslate.c -o xtranslate -l$(LIBS) -L$(LIBDIR) install: xtranslate - install -d $(WD)/usr/X11R6/bin - cp xtranslate $(WD)/usr/X11R6/bin - cp menu.ex $(WD)/usr/lib/menu/xtranslate + install -d $(WD)/usr/bin + cp xtranslate $(WD)/usr/bin + cp menu.ex $(WD)/usr/share/menu/xtranslate clean: rm -f core *.o xtranslate *~ --- xtranslate-0.2.orig/menu.ex +++ xtranslate-0.2/menu.ex @@ -1,2 +1,2 @@ -?package(xtranslate):needs=X11 section=Apps/Tools\ - title="xtranslate" command="/usr/X11R6/bin/xtranslate" +?package(xtranslate):needs="X11" section="Apps/Tools"\ + title="xtranslate" command="/usr/bin/xtranslate" --- xtranslate-0.2.orig/xtranslate.c +++ xtranslate-0.2/xtranslate.c @@ -24,18 +24,22 @@ #include #include -void main(int argc, char *argv[]) +int main(int argc, char *argv[]) { Display *display = XOpenDisplay(""); char *string, *wort; int bytes,i; + if (!display) { + fprintf(stderr,"No DISPLAY environment variable set. Please set you DISPLAY environment properly!\n"); + exit(EXIT_FAILURE); + } XConvertSelection(display, XA_PRIMARY, XA_STRING, XA_CUT_BUFFER0, XDefaultRootWindow(display), CurrentTime); string = XFetchBytes(display, &bytes); - wort = malloc((char) "TRANSLATEWORD="); + wort = malloc(sizeof("TRANSLATE_WORD=")); strcpy(wort,"TRANSLATE_WORD="); for ( i=1; i < argc;i++) { @@ -59,4 +63,5 @@ unsetenv(wort); XFree(string); XCloseDisplay(display); + return(0); } --- xtranslate-0.2.orig/debian/control +++ xtranslate-0.2/debian/control @@ -0,0 +1,17 @@ +Source: xtranslate +Section: x11 +Priority: optional +Build-Depends: debmake, libx11-dev, x11proto-core-dev, libxext-dev +Maintainer: Anibal Monsalve Salazar +Standards-Version: 3.7.2 + +Package: xtranslate +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, translate, xbase-clients +Description: x11-version of translate which will translate the xclipboard + This is an X11-version of translate. It writes the contents of the + X-selection and the commandline-option in a temporary used + environment-variable, calls the script translate and pipes the results in + a xmessage window. It will install a menu entry for the debian menusystem. + It is possible to make a shortcut in some window managers to use it more + quickly. --- xtranslate-0.2.orig/debian/README.debian +++ xtranslate-0.2/debian/README.debian @@ -0,0 +1,11 @@ +xtranslate for DEBIAN +---------------------- + +xtranslate is a frontend for translate, wich allows a easily use of +translate with X11. + +You can make a menu entry or use a hotkey in your windowi manager and +xtranslate will look up in a dictionary for a translation of the +X-selection. + +Matthias Kabel , Tue, 25 May 1999 22:54:08 +0200 --- xtranslate-0.2.orig/debian/dirs +++ xtranslate-0.2/debian/dirs @@ -0,0 +1,4 @@ +usr/bin +usr/share/doc +usr/share/menu +usr/man/man1 --- xtranslate-0.2.orig/debian/copyright +++ xtranslate-0.2/debian/copyright @@ -0,0 +1,11 @@ +This package is currently maintained by +Anibal Monsalve Salazar + +It was created by Matthias Kabel mkabel@debian.org on +Tue, 25 May 1999 22:54:08 +0200. + +Copyright: + Copyright 1999 Matthias Kabel + Feel free to redistribute and/or modify. The program is + published under the GNU Public Licence GPL. + For the text of the GPL see /usr/share/common-licenses/GPL --- xtranslate-0.2.orig/debian/rules +++ xtranslate-0.2/debian/rules @@ -0,0 +1,50 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=xtranslate + +build: + $(checkdir) + + make CFLAGS="-O2 -Wall" + touch build + +clean: + $(checkdir) + -rm -f build + -make clean + -rm -f `find . -name "*~"` + -rm -rf debian/tmp debian/files* core debian/substvars + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp + install -d debian/tmp + cd debian/tmp && install -d `cat ../dirs` + make install DESTDIR=`pwd`/debian/tmp +# Must have debmake installed for this to work. Otherwise please copy +# /usr/bin/debstd into the debian directory and change debstd to debian/debstd + debstd + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f debian/rules +endef + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- xtranslate-0.2.orig/debian/changelog +++ xtranslate-0.2/debian/changelog @@ -0,0 +1,106 @@ +xtranslate (0.2-14) unstable; urgency=low + + * Synchronise with Ubuntu. + + -- Anibal Monsalve Salazar Mon, 10 Jul 2006 17:46:20 +1000 + +xtranslate (0.2-13ubuntu1) edgy; urgency=low + + * Merge from debian unstable. + + -- Stephan Hermann Wed, 5 Jul 2006 21:32:40 +0200 + +xtranslate (0.2-13) unstable; urgency=low + + * Set Standards-Version to 3.7.2. + + -- Anibal Monsalve Salazar Sun, 25 Jun 2006 17:49:24 +1000 + +xtranslate (0.2-12) unstable; urgency=low + + * Fixed "Fixes xtranslate application, really", closes: #349579. + Fixed "segfault when DISPLAY is not set", closes: #349444, #349446. + Patch by Stephan Hermann . + + -- Anibal Monsalve Salazar Tue, 24 Jan 2006 20:43:59 +1100 + +xtranslate (0.2-11) unstable; urgency=low + + * Fixed "xtranslate: Segmentation fault", closes: #201423. + Patch by Yann Rouillard . + + -- Anibal Monsalve Salazar Mon, 23 Jan 2006 20:03:16 +1100 + +xtranslate (0.2-10ubuntu2) dapper; urgency=low + + * debian/control: + + added libXext-dev to build-dep + + replaced x-dev with x11proto-core-dev + * xtranslate.c: + + changed void main(...) to int main(...) to be C compatible + + added return (0); at the end of main to return, yes, returncode 0 + + added if clause to check if display is not null and if it's null, print + a error message. + + -- Stephan Hermann Mon, 23 Jan 2006 21:31:51 +0100 + +xtranslate (0.2-10ubuntu1) dapper; urgency=low + + * Fixed incorrect malloc size computation which caused segfault (how did it + work before ?!), closes: Malone #3807 + + -- Yann Rouillard Mon, 23 Jan 2006 03:05:54 +0100 + +xtranslate (0.2-10) unstable; urgency=low + + * Fixed "FTBFS: build-depends on removed xlibs-dev", closes: #346841. + + -- Anibal Monsalve Salazar Tue, 10 Jan 2006 21:52:10 +1100 + +xtranslate (0.2-9) unstable; urgency=low + + * Set Standards-Version to 3.6.2. + * Fixed "Uninstallable due to dependency on unavailable xcontrib", + closes: #337107. + * Fixed lintian warning "menu-file-in-usr-lib usr/lib/menu/xtranslate". + + -- Anibal Monsalve Salazar Fri, 02 Dec 2005 19:44:07 +1100 + +xtranslate (0.2-8) unstable; urgency=low + + * Fixed "package description typo(s) and the like", closes: #300063. + Patch by Florian Zumbiehl . + + -- Anibal Monsalve Salazar Sun, 15 May 2005 20:23:43 +1000 + +xtranslate (0.2-7) unstable; urgency=low + + * New maintainer's new email address. + + -- Anibal Monsalve Salazar Sat, 12 Feb 2005 20:15:26 +1100 + +xtranslate (0.2-6) unstable; urgency=low + + * New maintainer. Closes: #244204. + * Ack NMU. Closes: #170227, #179104. + * Spelling error in description. Closes: #125570. + Patch by Matt Zimmerman + * Patch for lintian errors. Closes: #126977. + Patch by Chris Tillman + + -- Anibal Monsalve Salazar Wed, 18 Aug 2004 23:55:15 +1000 + +xtranslate (0.2-5.1) unstable; urgency=low + + * NMU + * Rebuild to get rid of obsolete xlib6g dependency. Closes: #170227. + * Add Build-Depends. Closes: #179104. + + -- Daniel Schepler Fri, 14 Mar 2003 19:05:40 -0800 + +xtranslate (0.2-5) unstable; urgency=low + + * new version to change doc directory + + -- Matthias Kabel Thu, 13 Sep 2000 21:54:08 +0200 + --- xtranslate-0.2.orig/debian/xtranslate.1 +++ xtranslate-0.2/debian/xtranslate.1 @@ -0,0 +1,47 @@ +.TH TRANSLATE 1 +.SH NAME +xtranslate looks up for words given by teh X-selection in a dictionary +.SH SYNOPSIS +.B xtranslate -[ilnvh] +.SH "DESCRIPTION" +xtranslates takes the X-selection via xprtsel and gives it to translate +and displays the results (if there are any) with xmessage. +translate is a shell-script wich looks up for words in a dictionary and translates +them It can handle multiple dictionaries and charsets. + +If you do not give any options it will use the options given in the +configurationfile of translate. (For more info see translate.1) + +xtranslate will create a menuentry in your debian-menu wich will not use any +options. + + +.PP +.SH OPTIONS +.TP +.B \-n +non-interactive (don't prompt if no matches found) +.TP +.B \-i +invers lookup (from second to first language) +.TP +.B \-l +languages to translate between +.TP +.B \-v +display version and exit +.TP +.B -h +display help + +.SH EXAMPLE +.TP +xtranslate -l ger-eng + +.SH "SEE ALSO" +translate xmessage +.SH FILES + +.SH AUTHOR +This manual page was written by Matthias Kabel , +for the Debian GNU/Linux system (but may be used by others). --- xtranslate-0.2.orig/debian/postinst +++ xtranslate-0.2/debian/postinst @@ -0,0 +1,2 @@ +#!/bin/sh +if test -x /usr/bin/update-menus; then update-menus; fi --- xtranslate-0.2.orig/debian/postrm +++ xtranslate-0.2/debian/postrm @@ -0,0 +1,2 @@ +#!/bin/sh +if test -x /usr/bin/update-menus; then update-menus; fi