add make rpm, srpm, remove scim unikey setup module
authorMr.LeQuocTuan <Mr.LeQuocTuan@79bd180b-0a32-48ee-ac55-ada8cae9df61>
Sat, 22 Aug 2009 07:05:38 +0000 (07:05 +0000)
committerMr.LeQuocTuan <Mr.LeQuocTuan@79bd180b-0a32-48ee-ac55-ada8cae9df61>
Sat, 22 Aug 2009 07:05:38 +0000 (07:05 +0000)
git-svn-id: svn://localhost/trunk@62 79bd180b-0a32-48ee-ac55-ada8cae9df61

INSTALL
Makefile.am
configure.ac
po/POTFILES.in
po/scim-unikey.pot
po/vi.po
scim-unikey.spec.in [new file with mode: 0644]
setup/Makefile.am
setup/scim_unikey_setup.cpp [deleted file]
src/Makefile.am
src/im_engine.cpp

diff --git a/INSTALL b/INSTALL
index 750e73dc7d94024464f74f444b9f22e37f1f7469..3f870975b306535f40f2e95dd5f0022cb4ed0f7e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -28,3 +28,4 @@ On Ubuntu:
        sudo make uninstall
 
 If you have difficult with compile or using, goto http://forum.ubuntu-vn.org/viewforum.php?f=85
+
index 071b1d323bad38e40bff7619af6e982f556768d6..08a1ec5afb1d77879db7bfd185fa2379a074e188 100644 (file)
@@ -2,6 +2,31 @@ ACLOCAL_AMFLAGS = -I m4
 
 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
 
index 5326a33af3c0720e1eb9647c57d23bcc897ac187..6877f297dd4883309d74851951581d9471fb7014 100644 (file)
@@ -1,7 +1,7 @@
 # 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}
@@ -108,6 +108,7 @@ AC_SUBST(SCIM_ICONDIR)
 AC_SUBST(SCIM_MODULEDIR)
 
 AC_CONFIG_FILES([Makefile
+  scim-unikey.spec
   src/Makefile
   ukengine/Makefile
   icon/Makefile
index 09d8cd287a935726db71a34678d9a472b9c57bc5..f90fec2e462cbe1103fb5d38cdaebe5e5be06206 100644 (file)
@@ -1,7 +1,6 @@
 # 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
index c543a69e7255f8a69648dfe1b547b5328f17956d..566dcd389aeac63f5148006e38d6001b5f17bd4e 100644 (file)
@@ -6,9 +6,9 @@
 #, 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"
@@ -97,21 +97,10 @@ msgstr ""
 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 ""
index a5e89ac75c695d7636f11fceb996145d065b5fcf..0802c1c64830f88546be989da13388465821b5cb 100644 (file)
--- a/po/vi.po
+++ b/po/vi.po
@@ -2,7 +2,7 @@ msgid ""
 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"
@@ -115,24 +115,10 @@ msgstr ""
 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ế)"
diff --git a/scim-unikey.spec.in b/scim-unikey.spec.in
new file mode 100644 (file)
index 0000000..8a895a8
--- /dev/null
@@ -0,0 +1,53 @@
+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
+
index 3a636a8f58eb22b41ca0c106011a7efa5652e2bf..fb26cedb229f6e23ef5666739a5f1840dbc37efd 100644 (file)
@@ -4,7 +4,6 @@ INCLUDES = \
     -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)\" \
@@ -15,7 +14,6 @@ noinst_HEADERS = \
     dlg_macro_table.h \
     config_utils.h
 
-
 glade_DATA = \
     setup-main.glade \
     setup-macro.glade
@@ -44,26 +42,14 @@ scim_setup_unikey_LDFLAGS = \
     @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
diff --git a/setup/scim_unikey_setup.cpp b/setup/scim_unikey_setup.cpp
deleted file mode 100644 (file)
index adffa9a..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
-   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 &");
-}
-
index 9b564ad71276845e84db3fdb0d99f8ebbd158649..2e920c8e7736451ab38b9e237de0d1e154ea793a 100644 (file)
@@ -1,7 +1,6 @@
 INCLUDES = \
     -I$(top_srcdir)/ukengine \
     -DSCIM_ICONDIR=\"@SCIM_ICONDIR@\" \
-    -DSCIM_UNIKEY_VERSION=\"@PACKAGE_VERSION@\" \
     -DLIBEXECDIR=\"$(libexecdir)\" \
     -Wall
 
index 3717ca2da6c647dfd1a1b10c7b5baaf7b7d33410..5b768f6f043dc545dbfe78cebaf5b6ea2d3be16c 100644 (file)
@@ -85,7 +85,7 @@ WideString UnikeyFactory::get_authors() const
 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")