--- zh-autoconvert-0.3.16.orig/Makefile +++ zh-autoconvert-0.3.16/Makefile @@ -30,12 +30,12 @@ ln -s $(HOME)/bin/autogb $(HOME)/bin/autob5 chmod 755 $(HOME)/bin/autogb install: - install -m 755 autogb $(DESTDIR)/usr/bin - install -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib + install -s -m 755 autogb $(DESTDIR)/usr/bin + install -s -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib cd $(DESTDIR)/usr/lib;ln -s libhz.so.0.0 libhz.so.0 cd $(DESTDIR)/usr/lib;ln -s libhz.so.0 libhz.so - install -m 755 lib/libhz.a $(DESTDIR)/usr/lib - install -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/share/zh-autoconvert - install -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/share/zh-autoconvert + install -s -m 755 lib/libhz.a $(DESTDIR)/usr/lib + install -s -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/lib/zh-autoconvert + install -s -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/lib/zh-autoconvert install -m 644 include/*.h $(DESTDIR)/usr/include - ln -s autogb $(DESTDIR)/usr/bin/autob5 + cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5 --- zh-autoconvert-0.3.16.orig/autogb.c +++ zh-autoconvert-0.3.16/autogb.c @@ -142,5 +142,7 @@ } pbuf=&buff[2]; }while((count=read(0,pbuf,MAX_BUFFER))>0); + fflush(0); + exit(0); } --- zh-autoconvert-0.3.16.orig/contrib/xchat-plugins/Makefile +++ zh-autoconvert-0.3.16/contrib/xchat-plugins/Makefile @@ -5,8 +5,8 @@ all:xchat-autogb.so xchat-autob5.so xchat-autogb.so: xchat-autogb.c - $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `gtk-config --cflags` + $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autogb.so -o $@ $< -lhz -lc `pkg-config --cflags gtk+-2.0` xchat-autob5.so: xchat-autob5.c - $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autob5.so -o $@ $< -lhz -lc `gtk-config --cflags` + $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) -I. -DSKIPCONFIG -fPIC -shared -Wl,-soname,xchat-autob5.so -o $@ $< -lhz -lc `pkg-config --cflags gtk+-2.0` clean: rm -rf *~ xchat-autogb.so xchat-autob5.so --- zh-autoconvert-0.3.16.orig/contrib/xchat-plugins/xchat-autob5.c +++ zh-autoconvert-0.3.16/contrib/xchat-plugins/xchat-autob5.c @@ -88,8 +88,6 @@ PrintText(sess," Big\n"); #endif break; - default: - ; } XP_CALLNEXT(chanmsg_next, serv, channel, from, text, a, c); @@ -127,8 +125,6 @@ PrintText(sess," Big\n"); #endif break; - default: - ; } XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c); --- zh-autoconvert-0.3.16.orig/contrib/xchat-plugins/xchat-autogb.c +++ zh-autoconvert-0.3.16/contrib/xchat-plugins/xchat-autogb.c @@ -88,8 +88,6 @@ PrintText(sess," Big\n"); #endif break; - default: - ; } XP_CALLNEXT(chanmsg_next, serv, channel, from, text, a, c); @@ -127,8 +125,6 @@ PrintText(sess," Big\n"); #endif break; - default: - ; } XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c); --- zh-autoconvert-0.3.16.orig/hzconvert/Makefile +++ zh-autoconvert-0.3.16/hzconvert/Makefile @@ -1,22 +1,26 @@ CC=gcc -I../include -CFLAGS=-O2 -Wall -g +CFLAGS=-O2 -Wall -g -D_REENTRANT SHARED_LIB=libhz.so SHARED_LIB_MAJOR=$(SHARED_LIB).0 SHARED_LIB_MINOR=$(SHARED_LIB_MAJOR).0 OBJS=b2g.o b2u.o g2u.o hz2gb.o b2g_tables.o b2u_tables.o g2u_tables.o io.o unicode.o judge.o judge3.o gbpercent.o b5percent.o search.o +STATIC_OBJS=b2g.static.o b2u.static.o g2u.static.o hz2gb.static.o b2g_tables.static.o b2u_tables.static.o g2u_tables.static.o io.static.o unicode.static.o judge.static.o judge3.static.o gbpercent.static.o b5percent.static.o search.static.o -%.o: %.c +%.o:%.c $(CC) -fPIC $(CFLAGS) -c $< -all: libhzconvert +%.static.o:%.c + $(CC) $(CFLAGS) -c $< -o $*.static.o -libhzconvert: $(OBJS) - ar rs ../lib/libhz.a $(OBJS) +all: share-lib static-lib + +share-lib: $(OBJS) gcc -fPIC -shared -Wl,-soname,$(SHARED_LIB_MAJOR) -o ../lib/$(SHARED_LIB_MINOR) $(OBJS) -ldl rm -f ../lib/$(SHARED_LIB_MAJOR) rm -f ../lib/$(SHARED_LIB) cd ../lib;ln -s $(SHARED_LIB_MINOR) $(SHARED_LIB_MAJOR) cd ../lib;ln -s $(SHARED_LIB_MAJOR) $(SHARED_LIB) - +static-lib: $(STATIC_OBJS) + ar rs ../lib/libhz.a $(STATIC_OBJS) clean: rm -f *.o *~ ../lib/lib* --- zh-autoconvert-0.3.16.orig/debian/changelog +++ zh-autoconvert-0.3.16/debian/changelog @@ -0,0 +1,205 @@ +zh-autoconvert (0.3.16-3) unstable; urgency=low + + * Depand on libgtk2.0-dev instead of libgtk1.2-dev (Closes:Bug#516056) + + -- Yu Guanghui Thu, 19 Feb 2009 20:10:00 +0800 + +zh-autoconvert (0.3.16-2) unstable; urgency=medium + + * Move architecture-dependent files to /usr/lib. (Closes:Bug#392406) + + -- Yu Guanghui Thu, 12 Oct 2006 11:33:41 +0800 + +zh-autoconvert (0.3.16-1) unstable; urgency=low + + * New upstream release + * Add exit(0) (Closes:Bug#355842) + * examples changed (Closes:Bug#334401) + * Cleanup fixed bugs (Closes:Bug#297142) + + -- Yu Guanghui Wed, 9 Aug 2006 17:34:24 +0800 + +zh-autoconvert (0.3.14-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Apply patch by Andreas Jochens to fix FTBFS with gcc 4.0 + (Closes: #297142) + + -- Frank Lichtenheld Sat, 6 Aug 2005 02:59:50 +0200 + +zh-autoconvert (0.3.14-2) unstable; urgency=low + + * patch for gcc-3.4. (closes:Bug#264156) + + -- Yu Guanghui Sat, 7 Aug 2004 23:20:59 +0800 + +zh-autoconvert (0.3.14-1) unstable; urgency=low + + * New upstream release + + -- Yu Guanghui Fri, 12 Dec 2003 21:15:42 +0800 + +zh-autoconvert (0.3.13-4) unstable; urgency=low + + * compiled with gcc-3.3. (closes:Bug#196469) + + -- Yu Guanghui Sat, 7 Jun 2003 20:45:35 +0800 + +zh-autoconvert (0.3.13-3) unstable; urgency=low + + * Compiled the static library without -fPIC. + + -- Yu Guanghui Wed, 18 Jul 2001 01:56:14 +0800 + +zh-autoconvert (0.3.13-2) unstable; urgency=low + + * Fixed zh-autoconvert Depend problem. + + -- Yu Guanghui Tue, 17 Jul 2001 23:28:34 +0800 + +zh-autoconvert (0.3.13-1) unstable; urgency=low + + * New upstream release + + -- Yu Guanghui Fri, 11 May 2001 21:22:39 +0800 + +zh-autoconvert (0.3.12-2) unstable; urgency=low + + * Change libhz0(>=$${Source-Version}) to libhz0 (>=0.3.12-2) + + -- Yu Guanghui Tue, 1 May 2001 22:48:08 +0800 + +zh-autoconvert (0.3.12-1) unstable; urgency=low + + * New upstream release + + -- Yu Guanghui Sat, 28 Apr 2001 09:58:08 +0800 + +zh-autoconvert (0.3.11-1) unstable; urgency=low + + * New upstream release + + -- Yu Guanghui Mon, 23 Apr 2001 22:28:34 +0800 + +zh-autoconvert (0.3.10-1) unstable; urgency=low + + * New upstream release + + -- Yu Guanghui Tue, 17 Apr 2001 21:24:11 +0800 + +zh-autoconvert (0.3.9-3) unstable; urgency=low + + *Added lintian overide file, make lintian happy. :) + *Moved libhz0 from section text to libs, libhz-dev from text to devel. + + -- Yu Guanghui Tue, 20 Feb 2001 22:55:24 +0800 + +zh-autoconvert (0.3.9-2) unstable; urgency=low + + * Changed dh_makeshlibs at debian/rule, let zh-autoconvert always depend lastest libhz0. + * Compiled zh-autoconvert with shared libhz library, the old verison incorrectly complile zh-autoconvert with static libhz library. + * Add lost link (libhz.so -> libhz.so.0) to libhz-dev. + + -- Yu Guanghui Sun, 18 Feb 2001 21:34:18 +0800 + +zh-autoconvert (0.3.9-1) unstable; urgency=high + + * New upstream release + + -- Yu Guanghui Tue, 6 Feb 2001 23:46:51 +0800 + +zh-autoconvert (0.3.8-3) unstable; urgency=high + + * Incorrectly close #Bug81083, should close #Bug81803. (closes:Bug#81803) + + -- Yu Guanghui Thu, 11 Jan 2001 08:42:51 +0800 + +zh-autoconvert (0.3.8-2) unstable; urgency=high + + * Add build depend libgtk1.2-dev. (closes:Bug#81789,#81083) + + -- Yu Guanghui Thu, 11 Jan 2001 00:00:33 +0800 + +zh-autoconvert (0.3.8-1) unstable; urgency=high + + * New upstream release + + -- Yu Guanghui Mon, 8 Jan 2001 18:09:19 +0800 + +zh-autoconvert (0.3.7-3) testing unstable; urgency=high + + * change version number from 0.3.7-2.2 to 0.3.7-3. + + -- Yu Guanghui Sun, 7 Jan 2001 18:50:47 +0800 + +zh-autoconvert (0.3.7-2.2) unstable; urgency=high + + * Fix utf8 conversion problem. + + -- Yu Guanghui Sat, 6 Jan 2001 22:12:22 +0800 + +zh-autoconvert (0.3.7-2.1) unstable; urgency=low + + * Fix the translation table.(from Anthony Fok ). + + -- Yu Guanghui Sun, 24 Dec 2000 15:16:21 -0700 + +zh-autoconvert (0.3.7-2) unstable; urgency=low + + * Install xchat-autogb.so xchat-autob5.so to /usr/share/zh-autoconvert. + + -- Yu Guanghui Thu, 30 Nov 2000 10:27:20 +0800 + +zh-autoconvert (0.3.7-1) unstable; urgency=low + + * New upstream release + * Split to three packages: zh-autoconvert,libhz0,libhz-dev + + -- Yu Guanghui Wed, 29 Nov 2000 21:34:22 +0800 + +zh-autoconvert (0.3.6-2) unstable; urgency=low + + * Add two example files. + + -- Yu Guanghui Wed, 25 Oct 2000 22:06:37 +0800 + +zh-autoconvert (0.3.6-1) unstable; urgency=low + + * New upstream release + * Install new document "gbpercent.txt", "b5percent.txt", "400gb.txt", + "400b5.txt", and "percent.py". + + -- Yu Guanghui Sat, 7 Oct 2000 12:43:05 +0800 + +zh-autoconvert (0.3.5-1) unstable; urgency=low + + * New upstream release. + * [hzconvert/b2g_tables.c]: Corrected a few entries in the GB to Big5 + table, e.g. zhi1/zhi4, zheng4, yu1, and the period (dot) vs. bullet. + * Install new document "libhz.txt". + + -- Anthony Fok Wed, 16 Aug 2000 00:56:41 -0600 + +zh-autoconvert (0.3.4-1) unstable; urgency=low + + * New upstream release. + * New example files shed.big5 and shed.gb. :-) + + -- Anthony Fok Tue, 28 Dec 1999 00:34:44 -0700 + +zh-autoconvert (0.3.3-1) unstable; urgency=low + + * New upstream release. + * Standards-Version: 3.1.1--Added Build-Depends in debian/rules. + + -- Anthony Fok Wed, 22 Dec 1999 22:49:10 -0700 + +zh-autoconvert (0.3.2-1) unstable; urgency=low + + * Initial Release. + + -- Anthony Fok Sun, 7 Nov 1999 16:13:06 -0700 + +Local variables: +mode: debian-changelog +End: --- zh-autoconvert-0.3.16.orig/debian/copyright +++ zh-autoconvert-0.3.16/debian/copyright @@ -0,0 +1,43 @@ +This package (zh-autoconvert) was Debianized by Anthony Fok +on Sat, 30 Oct 1999 08:38:03 -0600. +It is now maintained by its upstream author, YU Guanghui . + +(Note: This file contains Chinese characters encoded in zh_CN.GB2312.) + +It was downloaded from + ftp://ftp.dlut.edu.cn/pub/PEOPLE/saka/autoconvert-0.3.9.tar.gz + +Upstream Author: + ÓÚ¹ã»Ô YU Guanghui + +Copyright: + + AutoConvert, a Chinese HZ/GB/Big5 encodings auto-converter + Copyright (C) 1999-2001 ÓÚ¹ã»Ô Yu Guanghui + + 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 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. + + Autoconvert has ported some hztty converting functions. + This is the original license of hztty. + + Copyright 1992, 1995 by Yongguang Zhang + Permission to use, copy, modify, and redistribute is hereby + granted. The author disclaims all warranties with regarding to + this software. + + + On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL'. --- zh-autoconvert-0.3.16.orig/debian/watch +++ zh-autoconvert-0.3.16/debian/watch @@ -0,0 +1,5 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +ftp.dlut.edu.cn /pub/PEOPLE/saka autoconvert-(.*)\.tar\.gz debian uupdate --- zh-autoconvert-0.3.16.orig/debian/control +++ zh-autoconvert-0.3.16/debian/control @@ -0,0 +1,40 @@ +Source: zh-autoconvert +Build-Depends: debhelper (>= 2.0.72), libgtk2.0-dev +Priority: optional +Maintainer: Yu Guanghui +Standards-Version: 3.1.0 + +Package: zh-autoconvert +Architecture: any +Section: text +Depends: ${shlibs:Depends} +Description: Chinese HZ/GB/BIG5/UNI/UTF7/UTF8 encodings auto-converter + AutoConvert is an intelligent Chinese Encoding converter. It uses + builtin functions to judge the type of the input file's Chinese + Encoding (such as GB/Big5/HZ), then converts the input file to any + type of Chinese Encoding you want. You can use autoconvert to handle + incoming mail, automatically converting messages to the Chinese + Encoding you want. + It can alse handle Unicode/UTF7/UTF8 now. + . + Author: Yu Guanghui + +Package: libhz-dev +Architecture: any +Section: devel +Depends: libhz0 (= ${Source-Version}), libc6-dev +Description: Headers and static libraries for zh-autoconvert + Contains the symlinks, headers, and object files needed to compile and + link programs which use the zh-autoconvert library. + . + Author: Yu Guanghui + +Package: libhz0 +Architecture: any +Section: libs +Depends: ${shlibs:Depends} +Description: Chinese encoding autoconvert library + This library provide the Chinese encoding judge function, + and the HZ/GB/Big5/UNI/UTF7/UTF8 convert functions. + . + Author: Yu Guanghui --- zh-autoconvert-0.3.16.orig/debian/rules +++ zh-autoconvert-0.3.16/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatability version to use. +export DH_COMPAT=1 + +libpkg = libhz0 + +# shared library versions, option 1 +version=0.0 +major=0 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}' + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs usr/bin + + # Add here commands to install the package into debian/tmp. + $(MAKE) install DESTDIR=`pwd`/debian/tmp + cp -f debian/override `pwd`/debian/tmp/usr/share/lintian/overrides/zh-autoconvert + + touch install-stamp + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot + dh_movefiles +# dh_installdebconf + dh_installdocs Readme TODO doc/libhz.txt doc/400b5.txt doc/400gb.txt doc/b5percent.txt doc/gbpercent.txt doc/percent.py + dh_installexamples examples/* contrib/convmail.pl contrib/debian-chinese-gateway.pl + dh_installmenu + dh_installmanpages +# dh_undocumented + dh_installchangelogs ChangeLog + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs -p$(libpkg) -V '$(libpkg) (>= $${Source-Version})' + dh_makeshlibs -p$(libpkg) -V '$(libpkg) (>= 0.3.14-1)' + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- zh-autoconvert-0.3.16.orig/debian/libhz0.files +++ zh-autoconvert-0.3.16/debian/libhz0.files @@ -0,0 +1 @@ +usr/lib/*.so.* --- zh-autoconvert-0.3.16.orig/debian/libhz-dev.files +++ zh-autoconvert-0.3.16/debian/libhz-dev.files @@ -0,0 +1,3 @@ +usr/include/*.h +usr/lib/*.a +usr/lib/*.so --- zh-autoconvert-0.3.16.orig/debian/dirs +++ zh-autoconvert-0.3.16/debian/dirs @@ -0,0 +1,4 @@ +usr/include +usr/lib +usr/lib/zh-autoconvert +usr/share/lintian/overrides --- zh-autoconvert-0.3.16.orig/debian/libhz0.postinst +++ zh-autoconvert-0.3.16/debian/libhz0.postinst @@ -0,0 +1,47 @@ +#! /bin/sh +# postinst script for autoconvert +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + ldconfig + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ldconfig + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- zh-autoconvert-0.3.16.orig/debian/override +++ zh-autoconvert-0.3.16/debian/override @@ -0,0 +1,3 @@ +zh-autoconvert: binary-without-manpage autogb +zh-autoconvert: no-shlibs-control-file usr/share/zh-autoconvert/xchat-autogb.so +zh-autoconvert: no-shlibs-control-file usr/share/zh-autoconvert/xchat-autob5.so --- zh-autoconvert-0.3.16.orig/debian/patch/gcc-3.4.patch +++ zh-autoconvert-0.3.16/debian/patch/gcc-3.4.patch @@ -0,0 +1,38 @@ +diff -urN ../tmp-orig/zh-autoconvert-0.3.14/contrib/xchat-plugins/xchat-autob5.c ./contrib/xchat-plugins/xchat-autob5.c +--- ../tmp-orig/zh-autoconvert-0.3.14/contrib/xchat-plugins/xchat-autob5.c 2000-11-27 17:16:33.000000000 +0100 ++++ ./contrib/xchat-plugins/xchat-autob5.c 2004-08-07 12:54:56.551380619 +0200 +@@ -88,7 +88,6 @@ + PrintText(sess," Big\n"); + #endif + break; +- default: + } + + XP_CALLNEXT(chanmsg_next, serv, channel, from, text, a, c); +@@ -126,7 +125,6 @@ + PrintText(sess," Big\n"); + #endif + break; +- default: + } + + XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c); +diff -urN ../tmp-orig/zh-autoconvert-0.3.14/contrib/xchat-plugins/xchat-autogb.c ./contrib/xchat-plugins/xchat-autogb.c +--- ../tmp-orig/zh-autoconvert-0.3.14/contrib/xchat-plugins/xchat-autogb.c 2000-11-27 17:16:33.000000000 +0100 ++++ ./contrib/xchat-plugins/xchat-autogb.c 2004-08-07 12:54:39.782630830 +0200 +@@ -88,7 +88,6 @@ + PrintText(sess," Big\n"); + #endif + break; +- default: + } + + XP_CALLNEXT(chanmsg_next, serv, channel, from, text, a, c); +@@ -126,7 +125,6 @@ + PrintText(sess," Big\n"); + #endif + break; +- default: + } + + XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c);