In Ubuntu 10.10 and up, it's really easy to install sunpinyin. Just run,
Code:
sudo apt-get install ibus-sunpinyin sunpinyin-data
The information below is not required anymore!
SunPinyin is an excellent 拼音 project by the SunPinyin group. In my experience, it has the best dictionary I've ever used (on Linux) and I'm going to show you how to install it the proper way by creating deb packages.
1. First, you need to install the packages: libtool libibus-dev sqlite3 libsqlite3-dev libgtk2.0-dev build-essential debhelper autotools-dev git-core scons:
Code:
sudo apt-get install libtool libibus-dev sqlite3 libgtk2.0-dev build-essential debhelper autotools-dev git-core scons
2. Then, you need to install the "cdbs" package from the Debian Sid repository as the Ubuntu version is too old and doesn't include the file: "/usr/share/cdbs/1/class/scons.mk"
Code:
wget http://ftp.us.debian.org/debian/pool/main/c/cdbs/cdbs_0.4.89_all.deb
sudo dpkg -i cdbs_0.4.89_all.deb
3. Create a directory and change to it in a terminal:
Code:
mkdir ~/build_sunpinyin
cd ~/build_sunpinyin
4. Download the latest source from the git repository:
Code:
git clone git://github.com/sunpinyin/sunpinyin.git
5. Change to the "sunpinyin" directory within the "~/build_sunpinyin" directory:
6. Generate the "debian/control" file for building a deb package.
Code:
DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
7. Build the deb package:
Code:
dpkg-buildpackage -us -uc
8. Step 7 creates 4 deb packages in ~/build_sunpinyin:
ibus-sunpinyin*.deb
sunpinyin-data-be*.deb
sunpinyin-data-le*.deb
xsunpinyin*.deb
DO NOT INSTALL ALL OF THEM!
Only install (3 packages: libsunpinyin, libsunpinyin-dev, sunpinyin-data-le): libsunpinyin3*.deb sunpinyin-data-le*.deb:
Code:
sudo dpkg -i libsunpinyin3*.deb sunpinyin-data-le*.deb
9. Change into the "~/build_sunpinyin/sunpinyin/wrapper/ibus" directory.
Code:
cd ~/build_sunpinyin/sunpinyin/wrapper/ibus
10. Once again, generate the "debian/control" file.
Code:
DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
11. Then, generate the [COLOR="Blue"]ibus-sunpinyin[/CODE] deb package.
Code:
dpkg-buildpackage -us -uc
12. Change to the parent directory: "~/build_sunpinyin/sunpinyin/wrapper"
Code:
cd ~/build_sunpinyin/sunpinyin/wrapper
13. Install the ibus-sunpinyin package.
Code:
sudo dpkg -i ibus-sunpinyin*.deb
14. Right or left click the iBus icon in the system tray and click Restart.
15. Goto System > Preferences > iBus Preferences.
16. Goto the Input Method tab.
17. Under "Select an input method," choose Chinese > SunPinyin and click Add.
18. Close the preferences, right click the iBus icon in the system tray, and click Restart.
19. Enjoy typing in Chinese!
Bookmarks