[7965] | 1 | %define ver 4.2.8.3 |
---|
| 2 | %define rel 1 |
---|
| 3 | |
---|
| 4 | Summary: an input method framework with extension support |
---|
| 5 | Name: fcitx |
---|
| 6 | Version: %{ver} |
---|
| 7 | Release: %{rel}%{?_dist_release} |
---|
| 8 | License: GPLv2+ |
---|
| 9 | Group: System Environment/Libraries |
---|
| 10 | URL: https://fcitx-im.org/ |
---|
| 11 | Source0: http://download.fcitx-im.org/fcitx/%{name}-%{version}.tar.xz |
---|
| 12 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
---|
| 13 | BuildRequires: cmake |
---|
| 14 | BuildRequires: wget |
---|
| 15 | BuildRequires: libX11-devel |
---|
| 16 | BuildRequires: dbus-glib-devel |
---|
| 17 | BuildRequires: xorg-x11-proto-devel |
---|
| 18 | BuildRequires: xorg-x11-xtrans-devel |
---|
| 19 | BuildRequires: libxkbfile-devel |
---|
| 20 | BuildRequires: pango-devel |
---|
| 21 | BuildRequires: cairo-devel |
---|
| 22 | BuildRequires: dbus-devel |
---|
| 23 | BuildRequires: libicu-devel |
---|
| 24 | BuildRequires: iso-codes |
---|
| 25 | BuildRequires: libxml2-devel |
---|
| 26 | BuildRequires: gtk2-devel |
---|
| 27 | BuildRequires: gtk3-devel |
---|
| 28 | BuildRequires: qt4-devel |
---|
| 29 | BuildRequires: enchant-devel |
---|
| 30 | BuildRequires: lua-devel |
---|
| 31 | BuildRequires: gobject-introspection-devel |
---|
| 32 | Requires: %{name}-libs = %{version}-%{release} |
---|
| 33 | Requires: %{name}-data = %{version}-%{release} |
---|
| 34 | |
---|
| 35 | Distribution: Vine Linux |
---|
| 36 | Vendor: Project Vine |
---|
| 37 | Packager: iwaim |
---|
| 38 | |
---|
| 39 | %description |
---|
| 40 | Fcitx [ˈfaɪtɪks] is an input method framework with extension support. |
---|
| 41 | Currently it supports Linux and Unix systems like freebsd. |
---|
| 42 | It has three built-in Input Method Engine, Pinyin, QuWei and Table-based |
---|
| 43 | input methods. |
---|
| 44 | |
---|
| 45 | %package data |
---|
| 46 | Summary: Data files for Fcitx |
---|
| 47 | Group: System Environment/Libraries |
---|
| 48 | Requires: hicolor-icon-theme |
---|
| 49 | Requires: dbus |
---|
| 50 | |
---|
| 51 | %description data |
---|
| 52 | This package provides shared datas for Fxitx. |
---|
| 53 | |
---|
| 54 | %package libs |
---|
| 55 | Summary: Shared libraries for Fcitx |
---|
| 56 | Group: System Environment/Libraries |
---|
| 57 | |
---|
| 58 | %description libs |
---|
| 59 | This package provides shared libraries for Fcitx. |
---|
| 60 | |
---|
| 61 | %package devel |
---|
| 62 | Summary: Development files for Fcitx |
---|
| 63 | Group: Development/Libraries |
---|
| 64 | Requires: %{name} = %{version}-%{release} |
---|
| 65 | |
---|
| 66 | %description devel |
---|
| 67 | This package contains libraries and header files necessary for |
---|
| 68 | developing programs using Fcitx libraries. |
---|
| 69 | |
---|
| 70 | %package gtk2 |
---|
| 71 | Summary: Fcitx IM module for GTK2 |
---|
| 72 | Group: System Environment/Libraries |
---|
| 73 | Requires: %{name} = %{version}-%{release} |
---|
| 74 | |
---|
| 75 | %description gtk2 |
---|
| 76 | This package contains Fcitx IM module for GTK2. |
---|
| 77 | |
---|
| 78 | %package gtk3 |
---|
| 79 | Summary: Fcitx IM module for GTK3 |
---|
| 80 | Group: System Environment/Libraries |
---|
| 81 | Requires: %{name} = %{version}-%{release} |
---|
| 82 | |
---|
| 83 | %description gtk3 |
---|
| 84 | This package contains Fcitx IM module for GTK3. |
---|
| 85 | |
---|
| 86 | %package qt4 |
---|
| 87 | Summary: Fcitx IM module for Qt4 |
---|
| 88 | Group: System Environment/Libraries |
---|
| 89 | Requires: %{name} = %{version}-%{release} |
---|
| 90 | |
---|
| 91 | %description qt4 |
---|
| 92 | This package contains Fcitx IM module for Qt4. |
---|
| 93 | |
---|
| 94 | %prep |
---|
| 95 | %setup -q |
---|
| 96 | |
---|
| 97 | %build |
---|
| 98 | %__mkdir build |
---|
| 99 | pushd build |
---|
| 100 | cmake .. \ |
---|
| 101 | -DCMAKE_VERBOSE_MAKEFILE=ON \ |
---|
| 102 | -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ |
---|
| 103 | -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ |
---|
| 104 | -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \ |
---|
| 105 | -DLIB_INSTALL_DIR:PATH=%{_libdir} \ |
---|
| 106 | -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \ |
---|
| 107 | -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \ |
---|
| 108 | -DENABLE_GTK3_IM_MODULE=On \ |
---|
| 109 | -DENABLE_QT_IM_MODULE=On \ |
---|
| 110 | -DENABLE_OPENCC=Off \ |
---|
| 111 | -DENABLE_LUA=On \ |
---|
| 112 | -DENABLE_GIR=On \ |
---|
| 113 | -DENABLE_XDGAUTOSTART=Off |
---|
| 114 | |
---|
| 115 | make %{?_smp_mflags} |
---|
| 116 | popd |
---|
| 117 | |
---|
| 118 | %install |
---|
| 119 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 120 | pushd build |
---|
| 121 | make install INSTALL="install -p" DESTDIR=$RPM_BUILD_ROOT |
---|
| 122 | rm -f %{buildroot}%{_libdir}/*.la |
---|
| 123 | popd |
---|
| 124 | %{find_lang} %{name} |
---|
| 125 | |
---|
| 126 | %clean |
---|
| 127 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 128 | |
---|
| 129 | %post |
---|
| 130 | update-desktop-database %{_datadir}/applications &>/dev/null || : |
---|
| 131 | |
---|
| 132 | %postun |
---|
| 133 | update-desktop-database %{_datadir}/applications &>/dev/null || : |
---|
| 134 | |
---|
| 135 | %post libs -p /sbin/ldconfig |
---|
| 136 | |
---|
| 137 | %postun libs -p /sbin/ldconfig |
---|
| 138 | |
---|
| 139 | %post data |
---|
| 140 | /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
---|
| 141 | |
---|
| 142 | %postun data |
---|
| 143 | if [ $1 -eq 0 ] ; then |
---|
| 144 | /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
---|
| 145 | /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
---|
| 146 | fi |
---|
| 147 | |
---|
| 148 | %posttrans data |
---|
| 149 | /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
---|
| 150 | |
---|
| 151 | %post gtk2 |
---|
| 152 | %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/%{_arch}/gtk.immodules || : |
---|
| 153 | |
---|
| 154 | %postun gtk2 |
---|
| 155 | %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/%{_arch}/gtk.immodules || : |
---|
| 156 | |
---|
| 157 | %post gtk3 |
---|
| 158 | %{_bindir}/gtk-query-immodules-3.0 --update-cache || : |
---|
| 159 | |
---|
| 160 | %postun gtk3 |
---|
| 161 | %{_bindir}/gtk-query-immodules-3.0 --update-cache || : |
---|
| 162 | |
---|
| 163 | %files -f %{name}.lang |
---|
| 164 | %defattr(-,root,root,-) |
---|
| 165 | %doc README |
---|
| 166 | %{_bindir}/fcitx* |
---|
| 167 | %exclude %{_bindir}/fcitx4-config |
---|
| 168 | %{_bindir}/createPYMB |
---|
| 169 | %{_bindir}/mb2org |
---|
| 170 | %{_bindir}/mb2txt |
---|
| 171 | %{_bindir}/readPYBase |
---|
| 172 | %{_bindir}/readPYMB |
---|
| 173 | %{_bindir}/scel2org |
---|
| 174 | %{_bindir}/txt2mb |
---|
| 175 | %{_libdir}/pkgconfig/fcitx-config.pc |
---|
| 176 | %{_libdir}/pkgconfig/fcitx-gclient.pc |
---|
| 177 | %{_libdir}/pkgconfig/fcitx-qt.pc |
---|
| 178 | %{_libdir}/pkgconfig/fcitx-utils.pc |
---|
| 179 | %{_libdir}/pkgconfig/fcitx.pc |
---|
| 180 | %{_datadir}/applications/fcitx-configtool.desktop |
---|
| 181 | %{_datadir}/applications/fcitx-skin-installer.desktop |
---|
| 182 | %{_datadir}/applications/fcitx.desktop |
---|
| 183 | %{_datadir}/doc/fcitx |
---|
| 184 | %{_mandir}/man1/*.1* |
---|
| 185 | %{_datadir}/mime/packages/x-fskin.xml |
---|
| 186 | |
---|
| 187 | %files devel |
---|
| 188 | %defattr(-,root,root,-) |
---|
| 189 | %{_bindir}/fcitx4-config |
---|
| 190 | %{_libdir}/libfcitx*.so |
---|
| 191 | %{_includedir}/fcitx* |
---|
| 192 | %{_datadir}/cmake/fcitx |
---|
| 193 | %{_datadir}/gir-1.0/Fcitx-1.0.gir |
---|
| 194 | |
---|
| 195 | %files libs |
---|
| 196 | %defattr(-,root,root,-) |
---|
| 197 | %{_libdir}/fcitx |
---|
| 198 | %{_libdir}/libfcitx*.so.* |
---|
| 199 | %{_libdir}/girepository-1.0/Fcitx-1.0.typelib |
---|
| 200 | |
---|
| 201 | %files data |
---|
| 202 | %defattr(-,root,root,-) |
---|
| 203 | %{_datadir}/icons/hicolor/*/*/*.png |
---|
| 204 | %{_datadir}/icons/hicolor/scalable/apps/fcitx.svg |
---|
| 205 | %{_datadir}/icons/hicolor/scalable/status/*.svg |
---|
| 206 | %{_datadir}/fcitx |
---|
| 207 | %{_datadir}/dbus-1/services/org.fcitx.Fcitx.service |
---|
| 208 | |
---|
| 209 | %files gtk2 |
---|
| 210 | %defattr(-,root,root,-) |
---|
| 211 | %{_libdir}/gtk-2.0/*/immodules/im-fcitx.so |
---|
| 212 | |
---|
| 213 | %files gtk3 |
---|
| 214 | %defattr(-,root,root,-) |
---|
| 215 | %{_libdir}/gtk-3.0/*/immodules/im-fcitx.so |
---|
| 216 | |
---|
| 217 | %files qt4 |
---|
| 218 | %defattr(-,root,root,-) |
---|
| 219 | %{_libdir}/qt4/plugins/inputmethods/qtim-fcitx.so |
---|
| 220 | |
---|
| 221 | %changelog |
---|
| 222 | * Tue Nov 5 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 4.2.8.3-1 |
---|
| 223 | - initial release |
---|