--- linux-fetion-2.0.0+svn20100914.r544.orig/64_libfetion.sh +++ linux-fetion-2.0.0+svn20100914.r544/64_libfetion.sh @@ -1,14 +1,45 @@ #!/bin/bash TARGET_FILE=linux-fetion.pro -IS_CPU_64BIT=1 + +case $HOSTTYPE in +"x86_64"*) + IS_CPU_64BIT=1 && echo "64!";; +"amd64"*) + IS_CPU_64BIT=1 && echo "64!2";; +i[3-6]"86"*) + IS_CPU_64BIT=0 && echo "32!";; +*) + IS_CPU_64BIT=0 && echo $CPU_TYPE;; +esac + #echo $TARGET_FILE #gcc --version #gcc -dumpmachine if [ $IS_CPU_64BIT -eq 0 ] ; then sed -i -e "/libfetion.a/c ./libfetion/lib/libfetion_32.a" $TARGET_FILE sed -i -e "/libfetion_64.a/c ./libfetion/lib/libfetion_32.a" $TARGET_FILE + +# 在编译32的时候 把(64的不需要) +# src/fxEncrypt.h 中的 +# #ifndef KEY +# #define KEY "libfetion-dedodong@163.com" +# #endif +# +# 改为 +# +# #ifndef KEY +# #define KEY "www.libfetion.cn" +# #endif +# +#用diff -u [old_file] [new_file]>[patch_file]生成 + + patch -f src/fxEncrypt.h encrypt_32bit.patch + else sed -i -e "/libfetion_32.a/c ./libfetion/lib/libfetion_64.a" $TARGET_FILE sed -i -e "/libfetion.a/c ./libfetion/lib/libfetion_64.a" $TARGET_FILE + + #patch -fR src/fxEncrypt.cpp encrypt_32bit.patch + fi --- linux-fetion-2.0.0+svn20100914.r544.orig/encrypt_32bit.patch +++ linux-fetion-2.0.0+svn20100914.r544/encrypt_32bit.patch @@ -0,0 +1,11 @@ +--- ../build/src/fxEncrypt.h 2009-09-27 14:23:43.000000000 +0800 ++++ fxEncrypt.h 2009-09-27 14:50:53.000000000 +0800 +@@ -25,7 +25,7 @@ + #endif /* __cplusplus */ + + #ifndef KEY +- #define KEY "libfetion-dedodong@163.com" ++ #define KEY "www.libfetion.cn" + #endif + + char *encryPWD(const char * data, long datalen, bool isEncry); --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/linux-fetion.install +++ linux-fetion-2.0.0+svn20100914.r544/debian/linux-fetion.install @@ -0,0 +1,5 @@ +misc/fetion.png usr/share/pixmaps/ +misc/fetion.png usr/share/app-install/icons/ +README COPYING ChangeLog CREDITS.txt resource skins usr/share/libfetion/ +misc/LibFetion.desktop usr/share/applications/ +linux-fetion usr/bin --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/rules +++ linux-fetion-2.0.0+svn20100914.r544/debian/rules @@ -0,0 +1,92 @@ +#!/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 + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + ./64_libfetion.sh + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + qmake-qt4 + $(MAKE) + #docbook-to-man debian/linux-fetion.sgml > linux-fetion.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/linux-fetion. + #$(MAKE) DESTDIR=$(CURDIR)/debian/linux-fetion install +# chmod +x debian/install.sh +# debian/install.sh + +# 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_testdir + dh_testroot + dh_installchangelogs + dh_installdocs +# dh_installexamples + dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_installman +# dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/control +++ linux-fetion-2.0.0+svn20100914.r544/debian/control @@ -0,0 +1,19 @@ +Source: linux-fetion +Section: net +Priority: optional +Maintainer: Jonathan Ye (MiCRoJo) +XSBC-Original-Maintainer: DDD +Build-Depends: debhelper (>= 7), libcurl4-openssl-dev, libqt4-dev, qt4-dev-tools +Standards-Version: 3.8.0 +Homepage: http://www.libfetion.cn + +Package: linux-fetion +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: LinuxFetion +Replaces: LinuxFetion +Description: Linux Fetion is an IM client based on QT, using CHINA MOBILE's Fetion Protocol. + . + * HomePage: http://www.libfetion.cn + . + * Using libfetion library, you can develop the third fetion client applictions on LINUX, MacOSX, Windows, ECOS, uclinux Operating Systems. --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/linux-fetion.preinst +++ linux-fetion-2.0.0+svn20100914.r544/debian/linux-fetion.preinst @@ -0,0 +1,53 @@ +#!/bin/sh +# preinst script for linux-fetion +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + +# if [ "${2:0:9}" = "1.0.0~svn" ]; +# then +# if dpkg --compare-versions "$2" lt "1.0.0~svn20090623.r287"; then +# rm -rf /usr/share/libfetion +# fi +# else +# if dpkg --compare-versions "$2" ne "1.0.0"; +# then +# rm -rf /usr/share/libfetion +# fi +# fi + + if dpkg --compare-versions "$2" lt "1.2.0"; + then + rm -rf /usr/share/libfetion + fi + + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/compat +++ linux-fetion-2.0.0+svn20100914.r544/debian/compat @@ -0,0 +1 @@ +7 --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/copyright +++ linux-fetion-2.0.0+svn20100914.r544/debian/copyright @@ -0,0 +1,20 @@ +This package was debianized by Jonathan Ye (MiCRoJo) on +Wed, 10 Sep 2008 15:07:54 +0800. + +It was downloaded from + +Upstream Author(s): + + + +Copyright: + + + +License: + +The Debian packaging is (C) 2008-2009, Dedodong and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. --- linux-fetion-2.0.0+svn20100914.r544.orig/debian/changelog +++ linux-fetion-2.0.0+svn20100914.r544/debian/changelog @@ -0,0 +1,5 @@ +linux-fetion (2.0.0+svn20100914.r544-0ubuntu1~ppa1~jaunty) jaunty; urgency=low + + * Daily Build Release + + -- Jonathan Ye (MiCRoJo) Tue, 14 Sep 2010 08:33:44 +0800