Name: kdeaccessibility
Summary: KDE Accessibility
Summary(ja): KDE アクセシビリティパッケージ
Version: 4.7.0
Release: 1%{?_dist_release}

License: GPLv2
Group: Applications/Accessories
URL: http://www.kde.org/

Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kdeaccessibility-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: desktop-file-utils
BuildRequires: speech-dispatcher-devel
BuildRequires: kdelibs4-devel >= %{version}
BuildRequires: plasma-devel >= %{version}
BuildRequires: soprano-devel
BuildRequires: libXtst-devel
BuildRequires: libXpm-devel
Requires: %{name}-libs = %{version}-%{release}

Obsoletes: kdeaccessibility4 < %{version}-%{release}
Provides: kdeaccessibility4 = %{version}-%{release}

%description
Included with this package are:
* jovie: text to speech support
* kmag: a screen magnifier
* kmousetool: a program for people whom it hurts to click the mouse
* kmouth: program that allows people who have lost their voice

%package libs
Summary: Runtime libraries for %{name}
Summary(ja): %{name} のランタイムライブラリ
Group:   System Environment/Libraries
Requires: kdelibs4 >= %{version}
Obsoletes: kdeaccessibility4-libs < %{version}-%{release}
Provides: kdeaccessibility4-libs = %{version}-%{release}

%description libs
%{summary}.


%prep
%setup -q 

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
unset QTDIR || : ; . /etc/profile.d/qt4.sh
%cmake \
    -DCMAKE_BUILD_TYPE=release \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/kde4 \
    -DLIB_INSTALL_DIR:PATH=%{_libdir} \
    -DLIBEXEC_INSTALL_DIR:PATH=%{_libexecdir}/kde4 \
    -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \
    ..
popd

make %{?_smp_mflags} -C %{_target_platform}


%install
rm -rf $RPM_BUILD_ROOT
make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}

# hack around HTML doc multilib conflicts
for doxy_hack in jovie kmag kmousetool kmouth ; do
    pushd $RPM_BUILD_ROOT%{_docdir}/HTML/en/${doxy_hack}
    bunzip2 index.cache.bz2
    sed -i -e 's!<a name="id[0-9]*"></a>!!g' index.cache
    bzip2 -9 index.cache
done
popd

# unpackaged files
rm -vf $RPM_BUILD_ROOT%{_libdir}/libkttsd.so


%check
for f in $RPM_BUILD_ROOT%{_datadir}/applications/kde4/*.desktop ; do
    desktop-file-validate $f
done

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &> /dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null
fi

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig


%files
%defattr(-,root,root)
%doc COPYING COPYING.DOC
%{_bindir}/*
%{_datadir}/kde4/apps/jovie/
%{_datadir}/kde4/apps/kmag/
%{_datadir}/kde4/apps/kmousetool/
%{_datadir}/kde4/apps/kmouth/
%{_datadir}/kde4/apps/kttsd/
#{_datadir}/kde4/apps/color-schemes/*.colors
%config %{_datadir}/config/*
%{_datadir}/applications/kde4/*.desktop
%{_datadir}/kde4/services/*
%{_datadir}/kde4/servicetypes/*
%doc %{_docdir}/HTML/en/jovie/
%doc %{_docdir}/HTML/en/kmag/
%doc %{_docdir}/HTML/en/kmousetool/
%doc %{_docdir}/HTML/en/kmouth/
%{_datadir}/icons/hicolor/*/*/*
%{_libdir}/kde4/*.so
%{_libexecdir}/kde4/kaccessibleapp
%{_datadir}/dbus-1/services/org.kde.kaccessible.service
%{_mandir}/man1/*.1*

%files libs
%defattr(-,root,root,-)
%{_libdir}/libkttsd.so.*
%{_libdir}/kde4/plugins/accessiblebridge/

%changelog
* Thu Aug  4 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7.0-1
- new upstream release
- mono-icon-theme package was moved to kdeartwork

* Sun Jun 19 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.4-1
- new upstream release

* Sun Mar 13 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.1-1
- new upstream release

* Sun Feb 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.0-2
- added BR: soprano-devel, libXpm-devel

* Sun Feb 13 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.6.0-1
- new upstream release
- split monochrome icons to subpackage

* Sat Aug 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.5.0-1
- new upstream release

* Tue Jun 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.3-2
- added BR: libXtst-devel

* Sat May  8 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.3-1
- new upstream release

* Sun Mar 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.1-1
- new upstream release
- built with new toolchain
- added BR: speech-dispatcher-devel

* Wed Nov 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.3-1
- new upstream release

* Sun Oct 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.2-1
- new upstream release

* Thu Sep 10 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
- new upstream release
- used %%cmake macro

* Sun Aug 30 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.0-1
- new upstream release

* Sun May 10 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.8-1
- applied new versioning policy, spec in UTF-8
- changed Group to Group: Applications/Accessories

* Tue Oct 16 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.8-0vl2
- rebuild for VineSeed

* Tue Oct 16 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.8-0vl1
- new upstream release

* Wed Jun 20 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.7-0vl2
- rebuild for VineSeed

* Thu May 24 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.7-0vl1
- new upstream release

* Tue Jan 23 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.6-0vl1
- new upstream release

* Mon Oct 23 2006 NAKAMURA Kenta <kenta@vinelinux.org> 3.5.5-0vl3
- added --with-qt-libraries and --enable-libsuffix option

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.5-0vl2
- rebuild for VineSeed

* Tue Oct  3 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.5-0vl1
- new upstream release

* Wed Aug  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.4-0vl2
- rebuild for VineSeed

* Wed Aug  2 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.4-0vl1
- new upstream release

* Wed May 31 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.3-0vl2
- rebuild for VineSeed

* Wed May 31 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.3-0vl1
- new upstream release

* Wed Mar 22 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.2-0vl2
- rebuild for VineSeed

* Wed Mar 22 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.2-0vl1
- new upstream release

* Tue Jan 31 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.1-0vl2
- rebuild for VineSeed

* Tue Jan 31 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.1-0vl1
- new upstream release

* Thu Dec  8 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.0-0vl2
- rebuild for VineSeed

* Tue Nov 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.0-0vl1
- new upstream release

* Mon Nov 14 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.5.0-0vl0.rc1
- new upstream release

* Mon Oct 17 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.92-0vl1
- new upstream release

* Wed Sep 21 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.91-0vl1
- new upstream release

* Fri Jul 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.2-0vl2
- rebuild for VineSeed

* Fri Jul 22 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.2-0vl1
- new upstream release

* Thu Jun 30 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.1-0vl2
- build for VineSeed
- add --disable-rpath to configure option

* Mon Jun  6 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.1-0vl1
- new upstream release
- use %%{?_smp_mflags} for make option

* Wed Mar 16 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.0-0vl2
- rebuild for VineSeed

* Tue Mar 15 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.0-0vl1
- new upstream release

* Fri Mar  4 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.4.0-0vl0.rc1
- new upstream release (3.4.0-rc1)
- update %%files

* Mon Feb  7 2005 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.92-0vl1
- new upstream release
- update %%files

* Sat Dec 18 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl2
- rebuild for VineSeed

* Sat Dec 18 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.2-0vl1
- source upgrade
- build for Vine Linux 3.1

* Wed Oct 27 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.3.1-0vl1
- source upgrade

* Wed Aug 11 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.3-0vl2
- rebuild with qt32

* Tue Jun 15 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.3-0vl1
- source upgrade
- remove lines about vine26

* Sat May  1 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.2-0vl1
- source upgrade
- add URL: http://www.kde.org/

* Thu Mar 25 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 3.2.1-0vl1
- first release
