sudo make uninstall
If you have difficult with compile or using, goto http://forum.ubuntu-vn.org/viewforum.php?f=85
+
SUBDIRS = icon po ukengine src setup
-EXTRA_DIST = config.rpath README
+EXTRA_DIST = \
+ config.rpath \
+ README \
+ scim-unikey.spec.in
+rpm: dist @PACKAGE_NAME@.spec
+ rpmbuild -bb \
+ --define "_sourcedir `pwd`" \
+ --define "_builddir `pwd`" \
+ --define "_srcrpmdir `pwd`" \
+ --define "_rpmdir `pwd`" \
+ --define "_specdir `pwd`" \
+ @PACKAGE_NAME@.spec
+
+srpm: dist @PACKAGE_NAME@.spec
+ rpmbuild -bs \
+ --define "_sourcedir `pwd`" \
+ --define "_builddir `pwd`" \
+ --define "_srcrpmdir `pwd`" \
+ --define "_rpmdir `pwd`" \
+ --define "_specdir `pwd`" \
+ @PACKAGE_NAME@.spec
+
+clean-rpm:
+ $(RM) -r "`uname -i`"
+
+clean-local: clean-rpm
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(scim-unikey, 0.3.0.r57, mr.lequoctuan@gmail.com)
+AC_INIT(scim-unikey, 0.3.0.r62, mr.lequoctuan@gmail.com)
cflags_set=${CFLAGS+set}
cppflags_set=${CPPFLAGS+set}
AC_SUBST(SCIM_MODULEDIR)
AC_CONFIG_FILES([Makefile
+ scim-unikey.spec
src/Makefile
ukengine/Makefile
icon/Makefile
# List of source files which contain translatable strings.
src/im_engine.cpp
src/unikey_instance.cpp
-setup/scim_unikey_setup.cpp
setup/scim_unikey_helper.cpp
setup/dlg_macro_table.cpp
setup/setup-main.glade
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: scim-unikey 0.3.0.r57\n"
+"Project-Id-Version: scim-unikey 0.3.0.r61\n"
"Report-Msgid-Bugs-To: mr.lequoctuan@gmail.com\n"
-"POT-Creation-Date: 2009-08-13 10:39+0700\n"
+"POT-Creation-Date: 2009-08-22 13:09+0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Launch Unikey Setup"
msgstr ""
-#: setup/scim_unikey_setup.cpp:64 setup/scim_unikey_helper.cpp:36
+#: setup/scim_unikey_helper.cpp:36
msgid "Unikey Setup"
msgstr ""
-#: setup/scim_unikey_setup.cpp:94
-msgid ""
-"This setup has been detached from scim-setup.\n"
-"Please run Setup by right click on scim tray icon,\n"
-"choose Unikey setup or click on below button."
-msgstr ""
-
-#: setup/scim_unikey_setup.cpp:102
-msgid "_Run setup"
-msgstr ""
-
#: setup/dlg_macro_table.cpp:13
msgid "(replace text)"
msgstr ""
msgstr ""
"Project-Id-Version: scim-unikey\n"
"Report-Msgid-Bugs-To: mr.lequoctuan@gmail.com\n"
-"POT-Creation-Date: 2009-08-13 10:39+0700\n"
+"POT-Creation-Date: 2009-08-22 13:09+0700\n"
"PO-Revision-Date: \n"
"Last-Translator: Le Quoc Tuan <mr.lequoctuan@gmail.com>\n"
"Language-Team: Le Quoc Tuan <mr.lequoctuan@gmail.com>\n"
msgid "Launch Unikey Setup"
msgstr "Chạy trình cài đặt Unikey"
-#: setup/scim_unikey_setup.cpp:64 setup/scim_unikey_helper.cpp:36
+#: setup/scim_unikey_helper.cpp:36
msgid "Unikey Setup"
msgstr "Cài đặt Unikey"
-#: setup/scim_unikey_setup.cpp:94
-msgid ""
-"This setup has been detached from scim-setup.\n"
-"Please run Setup by right click on scim tray icon,\n"
-"choose Unikey setup or click on below button."
-msgstr ""
-"Cài đặt ở đây đã được tách ra khỏi scim-setup.\n"
-"Vui lòng chạy trình cài đặt bằng cách click vào biểu tượng scim,\n"
-"sau đó chọn Chạy trình cài đặt hoặc click vào nút bên dưới."
-
-#: setup/scim_unikey_setup.cpp:102
-msgid "_Run setup"
-msgstr "Chạy trình cài đặt"
-
#: setup/dlg_macro_table.cpp:13
msgid "(replace text)"
msgstr "(chuỗi thay thế)"
--- /dev/null
+Name: @PACKAGE_NAME@
+Version: @PACKAGE_VERSION@
+Release: 1%{?dist}
+Summary: Vietnamese Input Method Engine for SCIM using Unikey IME
+Vendor: Ubuntu-VN
+License: LGPL 2
+Group: Localization
+URL: http://code.google.com/p/scim-unikey/
+Source: http://scim-unikey.googlecode.com/files/%{name}-%{version}.tar.gz
+
+%description
+SCIM (Smart Common Input Method) is an input method (IM) platform.
+scim-unikey is a IME for scim. Use for type Vietnamese
+Support via forum at: http://forum.ubuntu-vn.com/viewforum.php?f=85
+
+BuildRequires: scim-devel >= 1.4.7
+Requires: scim
+
+%prep
+%setup -q
+
+%build
+if [ -x ./configure ]; then
+ CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix}
+else
+ CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{_prefix}
+fi
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install-strip
+find $RPM_BUILD_ROOT -name *.la -exec rm '{}' +
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root)
+%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
+%{_prefix}/lib/libunikey-scim.*
+%{_prefix}/lib/scim-1.0/1.4.0/IMEngine/unikey.*
+%{_prefix}/lib/scim-1.0/1.4.0/Helper/unikey-helper.so
+%{_prefix}/libexec/scim-setup-unikey
+%{_prefix}/share/scim-unikey/setup/setup-macro.glade
+%{_prefix}/share/scim-unikey/setup/setup-main.glade
+%{_prefix}/share/scim/icons/scim-unikey*.png
+%{_prefix}/share/locale/*/LC_MESSAGES/scim-unikey.mo
+
-I$(top_srcdir)/ukengine \
-I$(top_srcdir)/src \
-DSCIM_ICONDIR=\"@SCIM_ICONDIR@\" \
- -DSCIM_UNIKEY_VERSION=\"@PACKAGE_VERSION@\" \
-DGLADE_DATA_DIR=\"$(pkgdatadir)/setup\" \
-DLOCALEDIR=\"$(localedir)\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
dlg_macro_table.h \
config_utils.h
-
glade_DATA = \
setup-main.glade \
setup-macro.glade
@GIO_LIBS@ \
$(top_builddir)/ukengine/libunikey-scim.la
-
# helper module: for launch setup
helperdir = @SCIM_MODULEDIR@/Helper
-helper_LTLIBRARIES = unikey-helper.la
+helper_LTLIBRARIES = unikey-helper.la
unikey_helper_la_SOURCES = scim_unikey_helper.cpp
unikey_helper_la_CFLAGS = @SCIM_CFLAGS@
-unikey_helper_la_CXXFLAGS = $(unikey_setup_la_CFLAGS)
+unikey_helper_la_CXXFLAGS = $(unikey_helper_la_CFLAGS)
unikey_helper_la_LDFLAGS = -avoid-version -rpath $(helperdir) \
-module @LIBTOOL_EXPORT_OPTIONS@
-# setup module
-setupdir = @SCIM_MODULEDIR@/SetupUI
-setup_LTLIBRARIES = unikey-setup.la
-unikey_setup_la_SOURCES = scim_unikey_setup.cpp
-
-unikey_setup_la_CFLAGS = @SCIM_GTKUTILS_CFLAGS@
-unikey_setup_la_CXXFLAGS = $(unikey_setup_la_CFLAGS)
-unikey_setup_la_LDFLAGS = -avoid-version -rpath $(setupdir) \
- -module @LIBTOOL_EXPORT_OPTIONS@ \
- @SCIM_GTKUTILS_LIBS@
-
endif
+++ /dev/null
-/**
- Scim-Unikey Input Method
-
- Copyright (C) 2008-2009 Ubuntu-VN <http://www.ubuntu-vn.org>
- Author: Le Quoc Tuan <mr.lequoctuan@gmail.com>
- Home: http://scim-unikey.googlecode.com
- License: GNU LESSER GENERAL PUBLIC LICENSE v2.1
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define Uses_SCIM_CONFIG_BASE
-
-#include <libintl.h>
-#define _(String) dgettext(PACKAGE_NAME,String)
-
-#include <iostream>
-#include <gtk/gtk.h>
-#include <string.h>
-
-#include <scim.h>
-
-using namespace scim;
-
-#define scim_module_init unikey_setup_LTX_scim_module_init
-#define scim_module_exit unikey_setup_LTX_scim_module_exit
-
-#define scim_setup_module_create_ui unikey_setup_LTX_scim_setup_module_create_ui
-#define scim_setup_module_get_category unikey_setup_LTX_scim_setup_module_get_category
-#define scim_setup_module_get_name unikey_setup_LTX_scim_setup_module_get_name
-#define scim_setup_module_get_description unikey_setup_LTX_scim_setup_module_get_description
-#define scim_setup_module_load_config unikey_setup_LTX_scim_setup_module_load_config
-#define scim_setup_module_save_config unikey_setup_LTX_scim_setup_module_save_config
-#define scim_setup_module_query_changed unikey_setup_LTX_scim_setup_module_query_changed
-
-void run_setup_button_cb(GtkButton* btn, gpointer user_data);
-
-static GtkWidget* create_setup_window();
-
-extern "C"
-{
- void scim_module_init(void)
- {
- }
-
- void scim_module_exit(void)
- {
- }
-
- GtkWidget * scim_setup_module_create_ui (void)
- {
- return create_setup_window();
- }
-
- String scim_setup_module_get_category (void)
- {
- return String("IMEngine");
- }
-
- String scim_setup_module_get_name(void)
- {
- return String(_("Unikey Setup"));
- }
-
- String scim_setup_module_get_description(void)
- {
- return String("Setup scim-unikey v" SCIM_UNIKEY_VERSION " IMEngine.");
- }
-
- void scim_setup_module_load_config(const ConfigPointer &config)
- {
- }
-
- void scim_setup_module_save_config(const ConfigPointer &config)
- {
- }
-
- bool scim_setup_module_query_changed()
- {
- return FALSE;
- }
-} // extern "C"
-
-static GtkWidget* create_setup_window()
-{
- static GtkWidget *window = 0;
- if (!window)
- {
- window = gtk_vbox_new(TRUE, 0);
-
- GtkWidget* label = gtk_label_new(_(
- "This setup has been detached from scim-setup.\n"
- "Please run Setup by right click on scim tray icon,\n"
- "choose Unikey setup or click on below button."));
-
- gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
-
- gtk_box_pack_start(GTK_BOX(window), label, TRUE, FALSE, 0);
-
- GtkWidget* btn_runsetup = gtk_button_new_with_mnemonic(_("_Run setup"));
- gtk_signal_connect(GTK_OBJECT(btn_runsetup), "clicked", G_CALLBACK(run_setup_button_cb), NULL);
- gtk_box_pack_start(GTK_BOX(window), btn_runsetup, TRUE, FALSE, 0);
-
- gtk_widget_show_all(window);
- }
- return window;
-}
-
-void run_setup_button_cb(GtkButton* btn, gpointer user_data)
-{
- system(LIBEXECDIR "/scim-setup-unikey &");
-}
-
INCLUDES = \
-I$(top_srcdir)/ukengine \
-DSCIM_ICONDIR=\"@SCIM_ICONDIR@\" \
- -DSCIM_UNIKEY_VERSION=\"@PACKAGE_VERSION@\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
-Wall
WideString UnikeyFactory::get_credits() const
{
return utf8_mbstowcs(String("Scim-Unikey Input Method\n"
- "Version: " SCIM_UNIKEY_VERSION "\n"
+ "Version: " PACKAGE_VERSION "\n"
"Copyright © 2008-2009 Ubuntu-VN\n"
"http://www.ubuntu-vn.org\n\n"
"Thanks to Pham Kim Long for ukengine")