Blob Blame History Raw
Name:		imsettings
Version:	0.101.2
Release:	3%{?dist}
License:	LGPLv2+
URL:		http://code.google.com/p/imsettings/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	intltool gettext
BuildRequires:	dbus-devel >= 0.23, dbus-glib-devel >= 0.74, glib2 >= 2.16
BuildRequires:	xfce-mcs-manager-devel libxfce4mcs-devel
BuildRequires:	GConf2-devel
BuildRequires:	libX11-devel
Source0:	http://imsettings.googlecode.com/files/%{name}-%{version}.tar.bz2
Patch0:		imsettings-constraint-of-language.patch
Patch1:		imsettings.diff
Patch2:		imsettings-disable-xim.patch

Summary:	Delivery framework for general Input Method configuration
Group:		Applications/System
Requires:	xorg-x11-xinit >= 1.0.2-22.fc8
Requires:	imsettings-libs = %{version}-%{release}
Requires(post):	/bin/dbus-send %{_sbindir}/alternatives
Requires(postun):	/bin/dbus-send %{_sbindir}/alternatives

%description
IMSettings is a framework that delivers Input Method
settings and applies the changes so they take effect
immediately without any need to restart applications
or the desktop.

This package contains the core DBus services and some utilities.

%package	libs
Summary:	Libraries for imsettings
Group:		Development/Libraries

%description	libs
IMSettings is a framework that delivers Input Method
settings and applies the changes so they take effect
immediately without any need to restart applications
or the desktop.

This package contains the shared library for imsettings.

%package	devel
Summary:	Development files for imsettings
Group:		Development/Libraries
Requires:	%{name}-libs = %{version}-%{release}
Requires:	pkgconfig
Requires:	glib2-devel >= 2.16.0
Requires:	dbus-glib-devel >= 0.74

%description	devel
IMSettings is a framework that delivers Input Method
settings and applies the changes so they take effect
immediately without any need to restart applications
or the desktop.

This package contains the development files to make any
applications with imsettings.

%package	xfce
Summary:	Xfce support on imsettings
Group:		Applications/System
Requires:	%{name} = %{version}-%{release}
Requires:	im-chooser

%description	xfce
IMSettings is a framework that delivers Input Method
settings and applies the changes so they take effect
immediately without any need to restart applications
or the desktop.

This package contains a plugin to get this working on Xfce.  

%prep
%setup -q
%patch0 -p1 -b .0-lang
%patch1 -p0 -b .1-backport
%patch2 -p1 -b .2-xim

%build
%configure	\
	--with-xinputsh=50-xinput.sh \
	--disable-static

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# change the file attributes
chmod 0755 $RPM_BUILD_ROOT%{_libexecdir}/xinputinfo.sh
chmod 0755 $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/50-xinput.sh

# clean up the unnecessary files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/xfce4/mcs-plugins/*.la

# still not stable
rm -f $RPM_BUILD_ROOT%{_datadir}/dbus-1/services/qt-im-settings-daemon.service
rm -f $RPM_BUILD_ROOT%{_libexecdir}/qt-im-settings-daemon

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%post
alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_sysconfdir}/X11/xinit/xinput.d/none.conf 10
alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_sysconfdir}/X11/xinit/xinput.d/xim.conf 30
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig > /dev/null 2>&1 || :

%postun
if [ "$1" = 0 ]; then
	alternatives --remove xinputrc %{_sysconfdir}/X11/xinit/xinput.d/none.conf
	alternatives --remove xinputrc %{_sysconfdir}/X11/xinit/xinput.d/xim.conf
	dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig > /dev/null 2>&1 || :
fi

%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig

%files	-f %{name}.lang
%defattr(-, root, root, -)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/imsettings-*
%{_libexecdir}/gconf-im-settings-daemon
%{_libexecdir}/im-info-daemon
%{_libexecdir}/im-settings-daemon
%{_libexecdir}/xinputinfo.sh
%{_datadir}/dbus-1/services/*.service
%{_sysconfdir}/X11/xinit/xinitrc.d/50-xinput.sh
%{_sysconfdir}/X11/xinit/xinput.d

%files	libs
%defattr(-, root, root, -)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/libimsettings.so.*

%files	devel
%defattr(-, root, root, -)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_includedir}/imsettings
%{_libdir}/libimsettings.so
%{_libdir}/pkgconfig/imsettings.pc

%files	xfce
%defattr(-, root, root, -)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/xfce4/mcs-plugins/imsettings_plugin.so 


%changelog
* Thu Jun 26 2008 Akira TAGOH <tagoh@redhat.com> - 0.101.2-3
- Disable XIM support so far. (#452849, #452870)

* Wed Jun 18 2008 Akira TAGOH <tagoh@redhat.com> - 0.101.2-2
- Backport patch from upstream to solve issues.
  - always saying IM is running when no .xinputrc.
  - workaround for a delay of that IM is ready for XIM.

* Tue Jun 17 2008 Akira TAGOH <tagoh@redhat.com> - 0.101.2-1
- New upstream release.
  - Fix a typo in the help message. (#451739)
  - Fix a invalid memory access. (#451753)

* Mon Jun 16 2008 Akira TAGOH <tagoh@redhat.com> - 0.101.1-2
- Add Reqruies: glib2-devel, dbus-glib-devel to -devel.

* Thu Jun 12 2008 Akira TAGOH <tagoh@redhat.com> - 0.101.1-1
- New upstream release.
- Add Requires pkgconfig to -devel.

* Wed Jun 11 2008 Akira TAGOH <tagoh@redhat.com> - 0.101.0-1
- New upstream release.
- Add Requires alternatives for %%post and %%postun.
- Improve summary.
- Remove imsettings-reload from %%post and %%postun. these are
  no longer needed.

* Wed Jun  4 2008 Akira TAGOH <tagoh@redhat.com> - 0.100.0-1
- Initial package.