Name:           konversation
Summary:        A user friendly IRC client
Summary(ja):    使い易い IRC クライアント
Version:        1.3.1
Release:        2%{?_dist_release}

Group:          Applications/Internet
License:        GPLv2+
URL:            http://konversation.kde.org/

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

## upstream patches

## Vine patches
Patch100:       konversation-1.2.3-irccharsets.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
BuildRequires:  kdelibs4-devel
BuildRequires:  kdepimlibs-devel
BuildRequires:  libXScrnSaver-devel
BuildRequires:  phonon-devel
BuildRequires:  qca2-devel
BuildRequires:  soprano-devel

%description
A simple and easy to use IRC client with support for
strikeout; multi-channel joins; away / unaway messages;
ignore list functionality; support for foreign
language characters; auto-connect to server; optional timestamps
to chat windows; configurable background colors and much more


%prep
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}

%patch100 -p1 -b .jis7

%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 %{buildroot}

make install/fast DESTDIR=%{buildroot} -C %{_target_platform}


## File lists
# locale's
#find_lang %{name} --with-kde 
%find_lang %{name} 


%check
desktop-file-validate %{buildroot}%{_datadir}/applications/kde4/konversation.desktop


%clean
rm -rf %{buildroot} 


%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


%files  -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog COPYING README TODO 
%{_bindir}/konversation
%{_datadir}/applications/kde4/konversation.desktop
%{_datadir}/kde4/services/*.protocol
%{_datadir}/kde4/apps/konversation/
%{_datadir}/kde4/apps/kconf_update/konversation*
%{_datadir}/icons/hicolor/*/*/*
%doc %{_datadir}/doc/HTML/*

%changelog
* Sun May 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.3.1-2
- add BuildRequires: soprano-devel

* Sat Jan 15 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.3.1-1
- new upstream release

* Sun Mar 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.2.3-2
- initial build for Vine Linux
- added Patch100 to avoid encoding detection failure

* Fri Feb 12 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.2.3-1
- konversation-1.2.3

* Fri Feb 12 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.2.2-1
- konversation-1.2.2

* Wed Feb 03 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.2.1-3
- test out qt46/cpu/fonts patch (kde#215256)

* Thu Jan 28 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.2.1-2
- use %%{_kde4_version}

* Thu Nov 12 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2.1-1
- konversation-1.2.1

* Fri Oct 09 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-1
- konversation-1.2 (final)

* Sat Oct 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.12.rc1
- konversation-1.2-rc1

* Mon Sep 21 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.11.beta1
- With auto-expand input box, ircview doesn't scroll (kdebug #208097)

* Mon Sep 21 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.10.beta1
- konversation-1.2-beta1

* Sat Sep 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.9.20090919svn
- localized snapshot

* Sat Sep 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.8.20090919svn1025849
- konversation-20090919svn1025849 snapshot, for marker line testing

* Mon Aug 24 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.6.alpha6
- BR: qca2-devel, libXScrnSaver-devel

* Tue Aug 11 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.5.alpha6
- add min kdelibs4 version

* Sat Aug 08 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.4.alpha6
- konversation-1.2-alpha6

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-0.3.alpha4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jul 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.2.alpha4
- konversation-1.2-alpha4

* Wed Jun 03 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.2-0.1.alpha3
- konversation-1.2-alpha3
- optimize scriptlets

* Mon Mar 02 2009 Dennis gilmore <dennis@ausil.us> - 1.1-6
- make Patch and %%patch use the same number

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Feb 22 2009 Dennis Gilmore <dennis@ausil.us> - 1.1-4
- rebuild

* Fri Feb 13 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.1-3
- patch media script for amarok2 support

* Wed Feb 04 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.1-2
- s/for KDE//

* Thu Aug 07 2008 Dennis Gilmore <dennis@ausil.us> - 1.1-1
- update to 1.1 final

* Tue Jul 15 2008 Dennis Gilmore <dennis@ausil.us> - 1.1-0.2.rc1
- fix stupidity

* Tue Jul 15 2008 Dennis Gilmore <dennis@ausil.us> - 1.1-0.1.rc1
- update to 1.1 rc1

* Wed Apr 09 2008 Dennis Gilmore <dennis@ausil.us> - 1.0.1-6
- apply patch from upstream handling CVE-2007-4400 correctly
- reenable media script

* Mon Mar 10 2008 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-5
- drop Requires: kdebase3 (#435873)
- f9+: dfi vendor fedora -> kde
- %%doc ChangeLog COPYING README TODO

* Thu Feb 07 2008 Dennis Gilmore <dennis@ausil.us> - 1.0.1-4
- remove /usr/share/apps/konversation/scripts/media for CVE-2007-4400

* Tue Aug 28 2007 Dennis Gilmore <dennis@ausil.us> - 1.0.1-3
- clarify license GPLv2+, and rebuild for F8

* Tue Oct 17 2006 Dennis Gilmore <dennis@ausil.us> - 1.0.1-2
- add gettext  as br  so translations get built correctly

* Fri Oct 06 2006 Dennis Gilmore <dennis@ausil.us> - 1.0.1-1
- Upgrade to 1.0.1

* Thu Sep 14 2006 Dennis Gilmore <dennis@ausil.us> - 1.0-1
- Upgrade to 1.0 :)

* Sat Sep 02 2006 Dennis Gilmore <dennis@ausil.us> - 0.19-3
- rebuild for fc6

* Tue Feb 14 2006 Dennis Gilmore <dennis@ausil.us> - 0.19-2
- rebuild for fc5

* Mon Jan 30 2006 Dennis Gilmore <dennis@ausil.us> - 0.19-1
- update to 0.19

* Thu Dec 22 2005 Dennis Gilmore <dennis@ausil.us> - 0.18-6
- Rebuild for gcc 4.1

* Sat Oct 20 2005 Dennis Gilmore <dennis@ausil.us> - 0.18-5
- add BuildRequires desktop-file-utils  http://fedoraproject.org/wiki/QAChecklist 
- add %%post and %%postun scriptlets  to notify of new icons per
- http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#implementation_notes

* Sun Jul 03 2005 Dennis Gilmore <dennis@ausil.us> - 0.18-4
- Explicly export QT lib and include dirs  for x86_64 build issue

* Tue Jun 28 2005  Dennis Gilmore <dennis@ausil.us> - 0.18-3
- Destop-file-install,  change gcc4 patch  to configure  
  remove unneeded build deps.

* Mon Jun 27 2005  Dennis Gilmore <dennis@ausil.us> - 0.18-2
- Fix build requires,set QT, %%lang'ify LOCALE bits and HTML docs
  move automake to prep

* Sat Jun 25 2005  Dennis Gilmore <dennis@ausil.us> - 0.18-1
- Initial build
