create .engine files for ibus-m17n with m17n-gen-ibus-engine (#466410)
This commit is contained in:
parent
988114a669
commit
9565f59d63
47
m17n-db.spec
47
m17n-db.spec
@ -1,11 +1,12 @@
|
|||||||
Name: m17n-db
|
Name: m17n-db
|
||||||
Summary: Multilingualization datafiles for m17n-lib
|
Summary: Multilingualization datafiles for m17n-lib
|
||||||
Version: 1.5.2
|
Version: 1.5.2
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.m17n.org/m17n-lib/index.html
|
URL: http://www.m17n.org/m17n-lib/index.html
|
||||||
Source0: http://www.m17n.org/m17n-lib-download/%{name}-%{version}.tar.gz
|
Source0: http://www.m17n.org/m17n-lib-download/%{name}-%{version}.tar.gz
|
||||||
|
Source1: m17n-gen-ibus-engine
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
@ -14,7 +15,7 @@ Patch2: si-wijesekera-keymap-rename_key-summary.patch
|
|||||||
Patch4: bn-itrans-t-182227.patch
|
Patch4: bn-itrans-t-182227.patch
|
||||||
Patch5: kn-itrans-ZWNJ-221965.patch
|
Patch5: kn-itrans-ZWNJ-221965.patch
|
||||||
Patch6: kn-itrans_key-summary_228806.patch
|
Patch6: kn-itrans_key-summary_228806.patch
|
||||||
Patch7: ml-itrans-keysummary-435260.patch
|
Patch7: ml-itrans-keysummary-435260.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains multilingualization (m17n) datafiles for m17n-lib
|
This package contains multilingualization (m17n) datafiles for m17n-lib
|
||||||
@ -115,7 +116,8 @@ This package contains m17n-db input maps for %(echo %1 | sed -e "s/\\(.*\\)/\\u\
|
|||||||
%{_datadir}/m17n/icons/%2-*.png\
|
%{_datadir}/m17n/icons/%2-*.png\
|
||||||
%else\
|
%else\
|
||||||
%{nil}\
|
%{nil}\
|
||||||
%endif
|
%endif\
|
||||||
|
%{_datadir}/ibus/engine/m17n-%2-*.engine
|
||||||
|
|
||||||
%define mk_pkg_uses_contrib() \
|
%define mk_pkg_uses_contrib() \
|
||||||
%package %1\
|
%package %1\
|
||||||
@ -134,7 +136,8 @@ This package contains m17n-db input maps for %(echo %1 | sed -e "s/\\(.*\\)/\\u\
|
|||||||
%{_datadir}/m17n/icons/%2-*.png\
|
%{_datadir}/m17n/icons/%2-*.png\
|
||||||
%else\
|
%else\
|
||||||
%{nil}\
|
%{nil}\
|
||||||
%endif
|
%endif\
|
||||||
|
%{_datadir}/ibus/engine/m17n-%2-*.engine
|
||||||
|
|
||||||
%mk_pkg amharic am 1
|
%mk_pkg amharic am 1
|
||||||
%mk_pkg arabic ar 1
|
%mk_pkg arabic ar 1
|
||||||
@ -176,16 +179,14 @@ This package contains m17n-db input maps for %(echo %1 | sed -e "s/\\(.*\\)/\\u\
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
cd MIM
|
pushd MIM
|
||||||
%patch1 -p1 -b .1
|
%patch1 -p1 -b .1
|
||||||
%patch2 -p0 -b .2
|
%patch2 -p0 -b .2
|
||||||
cd ..
|
%patch4 -p1 -b .4
|
||||||
%patch4 -p0 -b .4
|
|
||||||
cd MIM
|
|
||||||
%patch5 -p0 -b .5
|
%patch5 -p0 -b .5
|
||||||
%patch6 -p0 -b .6
|
%patch6 -p0 -b .6
|
||||||
%patch7 -p0 -b .7
|
%patch7 -p0 -b .7
|
||||||
cd ..
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -196,6 +197,7 @@ make
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
install -p %SOURCE1 .
|
||||||
# don't need ispell or anthy
|
# don't need ispell or anthy
|
||||||
rm $RPM_BUILD_ROOT%{_datadir}/m17n/{ispell.mim,icons/en-ispell.png}
|
rm $RPM_BUILD_ROOT%{_datadir}/m17n/{ispell.mim,icons/en-ispell.png}
|
||||||
rm $RPM_BUILD_ROOT%{_datadir}/m17n/{ja-anthy.mim,icons/ja-anthy.png}
|
rm $RPM_BUILD_ROOT%{_datadir}/m17n/{ja-anthy.mim,icons/ja-anthy.png}
|
||||||
@ -205,8 +207,15 @@ rm $RPM_BUILD_ROOT%{_datadir}/m17n/{bn-unijoy.mim,icons/bn-unijoy.png}
|
|||||||
# dont install si-wijesekera.mim as si-wijesekera-predit.mim works for us, see RH bug 208104
|
# dont install si-wijesekera.mim as si-wijesekera-predit.mim works for us, see RH bug 208104
|
||||||
rm $RPM_BUILD_ROOT%{_datadir}/m17n/si-wijesekera.mim
|
rm $RPM_BUILD_ROOT%{_datadir}/m17n/si-wijesekera.mim
|
||||||
|
|
||||||
#Remove hi-typewriter keymap till we get correct version of it
|
|
||||||
#install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/m17n/
|
# generate .engine files for ibus-m17n for now
|
||||||
|
install -p --mode=0755 %SOURCE1 $RPM_BUILD_ROOT/%{_bindir}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ibus/engine
|
||||||
|
for i in $RPM_BUILD_ROOT%{_datadir}/m17n/*.mim; do
|
||||||
|
$RPM_BUILD_ROOT/%{_bindir}/m17n-gen-ibus-engine $MAP $RPM_BUILD_ROOT%{_datadir}/ibus/engine
|
||||||
|
done
|
||||||
|
# these are not real engines
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_datadir}/ibus/engine/m17n-{cjk-util,global}.engine
|
||||||
|
|
||||||
# For installing the translation files
|
# For installing the translation files
|
||||||
%find_lang %name
|
%find_lang %name
|
||||||
@ -219,12 +228,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS COPYING README
|
%doc AUTHORS COPYING README
|
||||||
%{_bindir}/*
|
|
||||||
%dir %{_datadir}/m17n
|
%dir %{_datadir}/m17n
|
||||||
%dir %{_datadir}/m17n/icons
|
%dir %{_datadir}/m17n/icons
|
||||||
%{_datadir}/m17n/mdb.dir
|
%{_datadir}/m17n/mdb.dir
|
||||||
%{_datadir}/m17n/*.tbl
|
%{_datadir}/m17n/*.tbl
|
||||||
%{_datadir}/m17n/global.mim
|
%{_datadir}/m17n/global.mim
|
||||||
|
%dir %{_datadir}/ibus
|
||||||
|
%dir %{_datadir}/ibus/engine
|
||||||
|
|
||||||
|
|
||||||
# include translations
|
# include translations
|
||||||
@ -239,43 +249,54 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/m17n-db
|
||||||
|
%{_bindir}/m17n-gen-ibus-engine
|
||||||
%{_datadir}/pkgconfig/m17n-db.pc
|
%{_datadir}/pkgconfig/m17n-db.pc
|
||||||
|
|
||||||
%files common-cjk
|
%files common-cjk
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_datadir}/m17n/cjk-*.mim
|
%{_datadir}/m17n/cjk-*.mim
|
||||||
%{_datadir}/m17n/global.mim
|
|
||||||
|
|
||||||
%files chinese
|
%files chinese
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_datadir}/m17n/zh-*.mim
|
%{_datadir}/m17n/zh-*.mim
|
||||||
%{_datadir}/m17n/icons/zh-*.png
|
%{_datadir}/m17n/icons/zh-*.png
|
||||||
%{_datadir}/m17n/icons/bopo-*.png
|
%{_datadir}/m17n/icons/bopo-*.png
|
||||||
|
%{_datadir}/ibus/engine/m17n-zh-*.engine
|
||||||
|
|
||||||
%files generic
|
%files generic
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_datadir}/m17n/rfc1345.mim
|
%{_datadir}/m17n/rfc1345.mim
|
||||||
%{_datadir}/m17n/icons/rfc1345.png
|
%{_datadir}/m17n/icons/rfc1345.png
|
||||||
|
%{_datadir}/ibus/engine/m17n-rfc1345.engine
|
||||||
%{_datadir}/m17n/unicode.mim
|
%{_datadir}/m17n/unicode.mim
|
||||||
%{_datadir}/m17n/icons/unicode.png
|
%{_datadir}/m17n/icons/unicode.png
|
||||||
|
%{_datadir}/ibus/engine/m17n-unicode.engine
|
||||||
|
|
||||||
%files greek
|
%files greek
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_datadir}/m17n/el-*.mim
|
%{_datadir}/m17n/el-*.mim
|
||||||
%{_datadir}/m17n/grc-*.mim
|
%{_datadir}/m17n/grc-*.mim
|
||||||
%{_datadir}/m17n/icons/el-*.png
|
%{_datadir}/m17n/icons/el-*.png
|
||||||
|
%{_datadir}/ibus/engine/m17n-el-*.engine
|
||||||
|
%{_datadir}/ibus/engine/m17n-grc-*.engine
|
||||||
|
|
||||||
%files gregorian
|
%files gregorian
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_datadir}/m17n/ka*.mim
|
%{_datadir}/m17n/ka*.mim
|
||||||
%{_datadir}/m17n/icons/ka*.png
|
%{_datadir}/m17n/icons/ka*.png
|
||||||
|
%{_datadir}/ibus/engine/m17n-ka*.engine
|
||||||
|
|
||||||
%files uyghur
|
%files uyghur
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{_datadir}/m17n
|
%dir %{_datadir}/m17n
|
||||||
%{_datadir}/m17n/ug-*.mim
|
%{_datadir}/m17n/ug-*.mim
|
||||||
|
%{_datadir}/ibus/engine/m17n-ug-*.engine
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 15 2008 Jens Petersen <petersen@redhat.com> - 1.5.2-3
|
||||||
|
- create .engine files for ibus-m17n with m17n-gen-ibus-engine (#466410)
|
||||||
|
|
||||||
* Fri Aug 29 2008 Parag Nemade <pnemade@redhat.com> -1.5.2-2
|
* Fri Aug 29 2008 Parag Nemade <pnemade@redhat.com> -1.5.2-2
|
||||||
- Recreated patch si-wijesekera-keymap-rename_key-summary.patch
|
- Recreated patch si-wijesekera-keymap-rename_key-summary.patch
|
||||||
|
|
||||||
|
33
m17n-gen-ibus-engine
Executable file
33
m17n-gen-ibus-engine
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# generates .engine files from m17n mim filenames for ibus-m17n
|
||||||
|
|
||||||
|
PROG=`basename $0`
|
||||||
|
|
||||||
|
if [ $# -le 1 ]; then
|
||||||
|
echo "Usage: $PROG <m17n-map.mim> [dir]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILE=$1
|
||||||
|
OUTDIR=${2:-.}
|
||||||
|
|
||||||
|
MAP=$(basename $1 .mim)
|
||||||
|
|
||||||
|
LANG=$(echo $MAP | sed -e "s/-.*//")
|
||||||
|
if [ "$LANG" = "latn" ]; then
|
||||||
|
LANG=$MAP
|
||||||
|
fi
|
||||||
|
if [ "$LANG" = "$MAP" ]; then
|
||||||
|
STYLE=$LANG
|
||||||
|
LANG=t
|
||||||
|
else
|
||||||
|
STYLE=$(echo $MAP | sed -e "s/^.*-//")
|
||||||
|
fi
|
||||||
|
cat > $OUTDIR/m17n-$MAP.engine << EOF
|
||||||
|
Exec=/usr/bin/ibus-engine-m17n $LANG:$STYLE
|
||||||
|
Name=$STYLE
|
||||||
|
Lang=$LANG
|
||||||
|
Icon=/usr/share/m17n/icons/$MAP.png
|
||||||
|
Author=
|
||||||
|
Credits=
|
||||||
|
EOF
|
Loading…
Reference in New Issue
Block a user