[FZH] 关于IM的开发
by ajax he
准备做一个linux下的聊天软件,但对即时通讯这快了解甚少,也没有找到一些比较系统的资料。
就我个人而言,想考虑使用XMPP协议(gtalk,网页泡泡都采用的是这种协议)。
目前网上介绍较多XMPP实现的是Spark Smack+Openfire,但是是基于JAVA开发的,
想问问各位大虾,能否提供些这方面比较系统的开发文档(如果有C/C++的实现更好)。
谢谢!
12 years, 9 months
[FZH] 请教:如何在shell脚本中执行VIM的TOhtml插件
by Atom Chen
各位新年好!
vim的TOHtml插件,可以生成带有语法高亮的html文件。我想在shell脚本中执行vim,“批量”将源码文件生成对应的html文件。
我在终端中执行:
$ vim -e ex2.sh < change.vim
ex2.sh是一个shell脚本
$ cat ex2.sh
#! /bin/sh
LOG_DIR=/var/log
ROOT_UID=0
LINES=50
E_XCD=66
E_NOTROOT=67
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root to run this script."
exit E_NOTROOT
fi
if [ -n "$1" ]
then
lines=$1
else
lines=$LINES
fi
cd $LOG_DIR || {
echo "Cannot change to necesary directory." >& 2
exit $E_XCD;
}
tail -$lines messaages > mesg.temp
mv mesg.temp messaages
cat /dev/null > wtmp
echo "Logs cleaned up."
exit 0
change.vim内容如下
$ cat change.vim
TOhtml
write ex2.html
quit!
quit!
我的本意是使用vim的Ex模式,将ex2.sh用TOhtml转换为带语法高亮的ex2.html。
在change.vim中写入Normal模式下的操作。
但是生成的ex2.html内容和ex2.sh <http://ex2.xn--htmlex2-6p9k58t34t.sh>
一模一样,连html标签都没有。
如何在shell脚本中执行TOhtml插件呢?
12 years, 9 months
[FZH] F14安装audacious mp3插件时出现"x-directory" is an old media type错误
by Bill Buchanan
总计 255 kB/s | 325 kB
00:01
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : audacious-plugins-freeworld-mms-2.4.3-1.fc14.1.i686 1/6
正在安装 : libmpg123-1.12.3-1.fc14.i686 2/6
正在安装 : audacious-plugins-freeworld-mp3-2.4.3-1.fc14.1.i686 3/6
Warning in file
"/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of
MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory"
is an old media type that should be replaced with a modern equivalent)
Warning in file
"/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of
MIME type "x-directory/normal" is discouraged ("x-directory" is an old media
type that should be replaced with a modern equivalent)
正在安装 : audacious-plugins-freeworld-aac-2.4.3-1.fc14.1.i686 4/6
Warning in file
"/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of
MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory"
is an old media type that should be replaced with a modern equivalent)
Warning in file
"/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of
MIME type "x-directory/normal" is discouraged ("x-directory" is an old media
type that should be replaced with a modern equivalent)
正在安装 : audacious-plugins-freeworld-ffaudio-2.4.3-1.fc14.1.i68 5/6
Warning in file
"/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of
MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory"
is an old media type that should be replaced with a modern equivalent)
Warning in file
"/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of
MIME type "x-directory/normal" is discouraged ("x-directory" is an old media
type that should be replaced with a modern equivalent)
正在安装 : audacious-plugins-freeworld-2.4.3-1.fc14.1.i686 6/6
已安装:
audacious-plugins-freeworld.i686
0:2.4.3-1.fc14.1
作为依赖被安装:
audacious-plugins-freeworld-aac.i686
0:2.4.3-1.fc14.1
audacious-plugins-freeworld-ffaudio.i686
0:2.4.3-1.fc14.1
audacious-plugins-freeworld-mms.i686
0:2.4.3-1.fc14.1
audacious-plugins-freeworld-mp3.i686
0:2.4.3-1.fc14.1
libmpg123.i686
0:1.12.3-1.fc14
完毕!
=========================================================
请教高人如何解决,谢谢!
12 years, 9 months
[FZH] 关于spec
by Dee.H.Y
首先,预祝大家新年快乐。
下面,我咨询大家一个问题:
***************************************************************
Summary: Fetion protocol library powered by ofetion project
Name: libofetion
Version: 2.1.0
Release: %mkrel 1
Group: Networking/Instant messaging
License: GPLv2+
URL: http://code.google.com/p/ofetion/
Source0: http://ofetion.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: openssl-devel
BuildRequires: sqlite3-devel
BuildRequires: libxml2-devel
BuildRequires: cmake
Conflicts: openfetion < 2.1.0
%description
OpenFetion is a IM client based on GTK+2.0, using CHINA MOBILE's Fetion
Protocol Version 4.
%files
%defattr(-,root,root)
%{_datadir}/openfetion/resource
#---------------------------------------------------------------
%define major 1
%define libname %mklibname ofetion %major
%package -n %libname
Summary: Fetion protocol library powered by ofetion project
Group: Networking/Instant messaging
Requires: %name = %{version}
%description -n %libname
OpenFetion is a IM client based on GTK+2.0, using CHINA MOBILE's Fetion
Protocol Version 4.
%files -n %libname
%defattr(-,root,root)
%{_libdir}/libofetion.so.%{major}
%{_libdir}/libofetion.so.%{major}.*
#---------------------------------------------------------------
%define develname %mklibname -d ofetion
%package -n %develname
Summary: Fetion protocol library powered by ofetion project
Group: Development/C
Requires: %{libname} = %{version}
Provides: %{name}-devel = %{version}-%{release}
%description -n %develname
OpenFetion is a IM client based on GTK+2.0, using CHINA MOBILE's Fetion
Protocol Version 4.
%files -n %develname
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/libofetion.so
%{_libdir}/libofetion.a
%{_libdir}/pkgconfig/*.pc
#---------------------------------------------------------------
%prep
%setup -qn %name-%version
%build
%cmake
%make
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std -C build
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Dec 26 2010 Funda Wang <fwang(a)mandriva.org> 2.1.0-1mdv2011.0
+ Revision: 625215
- import libofetion
*******************************************************************
以上是M系统的spec,但是这里面有一个地方不是fedora有的:%define develname
%mklibname -d ofetion
不知道这句话是什么意思,求教了,谢谢。
12 years, 10 months
[FZH] Direction of fedorachinese.org and fedora-zh.org; Re: fedoracommunity.org domain requests outstanding
by Gerard Braad
Hi,
This is a continuation of a discussion on our cn.fedoracommunity.org
registration.
On 1/24/11, Yuan Yijun <bbbush.yuan(a)gmail.com> wrote:
> if used properly, can allow
> people to post to proper modules, thus provide another way of active
> collaboration. Got it?
The system used for the page is a CMS and will be taken care of from a
group perspective. People will have editorial rights to a regional
part or interest...
For now it is a placeholder to get the cn.fc.o approved. If no steps
are taken, this request will remain outstanding. This does not serve
any of us.
> The fedora-zh.org is blocked by GFW, not long ago. Such event is rare
> and there are several ways to remedy:
> * change the IP address.
> * move to another space
> * move to the VPS kaio mentioned
> * move to somewhere sponsored
> * move to some hosting spaces inside China
At the moment these options are all considered. I got in touch with
Candis Hosting already as they have a good relationship with people I
know at the BeijingLUG and ICP license is considered. But I would not
move all services to this. Why?
Since being of FAmSCo I want to topic about Community Hosting being
discussed. Hosting some of the stuff on the Fedora Infrastructure will
give us an increased reliability and contributors are part of the
project. For smaller communities Fedora should be able to provide a
simple set of tools to start a community page. I know this involves
legal issues and a increased load on our Sysadmin team, but I am sure
we can work something out... just like what we did with the blog
option for Wordpress.
> Hereby I explain why I don't want to reply your last email.
> First of all, the mailing list is already read-only
This then might have been a misunderstanding. My apologies... but a
simple explanation would have helped.
> an historically important way of communication
> No more forceful works in the future.
Sometimes a change is needed for new things to happen. I am confident
fedora-zh will survive as we are all working on it... but we have to
make sure we can provide new-comers all the information they need or
even before, information about how they can join. This is currently
what we are working on. Consolidating all the information we have...
Gerard
--
Gerard Braad — 吉拉德
Project-lead Fedora-MIPS
Regional Mentor APAC/China, Member of FAmSCo
http://fedoraproject.org/wiki/User:gbraad
12 years, 10 months