%define dt_vendor fedora

Name:           yakuake
Summary:        Terminal emulator
Summary(ja):    端末エミュレータ
Version:        2.9.7
Release:        2%{?_dist_release}

Group:          User Interface/Desktops
License:        GPLv2+
URL:            http://extragear.kde.org/apps/yakuake/
Source0:        http://download.berlios.de/yakuake/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  desktop-file-utils
BuildRequires:  gettext
BuildRequires:  kdelibs4-devel
# konsolepart
Requires:       kdebase4

%description
Yakuake is a "Quake console" like terminal emulator.

%description
Quake console ライクな端末エミュレータです．

%prep
%setup -q


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

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


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

## --vendor is discouraged/deprecated these days -- Rex
#desktop-file-install --vendor=""                          \
#        --dir=%{buildroot}%{_datadir}/applications         \
#        --add-category=Utility                                  \
#        --delete-original                                       \
#        %{buildroot}%{_datadir}/applications/kde4/yakuake.desktop

%find_lang %{name}


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


%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


%clean
rm -rf %{buildroot}


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog TODO
%{_bindir}/yakuake
%{_datadir}/applications/kde4/yakuake.desktop
%{_datadir}/kde4/apps/yakuake/
%{_datadir}/icons/hicolor/*/*/*


%changelog
* Mon Jul 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.9.7-2
- Initial build for Vine Linux

* Sun Jul 18 2010 Rex Dieter <rdieter@fedoraproject.org> - 2.9.7-1
- 2.9.7
- optimize scriptlets
- use _kde4_ macros

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 10 2009 Johan Cwiklinski <johan AT x-tnd DOT be> 2.9.6-1
- 2.9.6

* Sat Apr 17 2009 Johan Cwiklinski <johan AT x-tnd DOT be>  2.9.4-3
- Fix crash with QT 4.5

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

* Thu Sep 4 2008 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.9.4-1
- 2.9.4
- change BR from kdelibs4-devel to kdelibs-devel

* Fri Jun 20 2008 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.9.3-1
- 2.9.3
- kdebase is required

* Sat Apr 05 2008 2008 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.9.1-1
- 2.9.1
- use of %%{cmake_kde4} macro
- remove no longer needeed chrpath

* Wed Apr 02 2008 Rex Dieter <rdieter@fedoraproject.org> - 2.9-2.beta1
- BR: kdelibs4-devel
- description/summary: s/for KDE//

* Mon Feb 11 2008 Johan Cwiklinski <johan AT x-tnd DOT be> - 2.9-1.beta1
- upstream release for KDE4

* Mon Oct 30 2006 Dawid Gajownik <gajownik[AT]gmail.com> - 2.7.5-4
- Add support for KonsoleScripts (#212862)

* Fri Sep 15 2006 Dawid Gajownik <gajownik[AT]gmail.com> - 2.7.5-3
- Rebuild for FE6
- Update e-mail address
- Fix mixed-use-of-spaces-and-tabs rpmlint warning

* Sat May 20 2006 Dawid Gajownik <gajownik[AT]gmail.com> - 2.7.5-2
- Add dist tag

* Sat May 20 2006 Dawid Gajownik <gajownik[AT]gmail.com> - 2.7.5-1
- Update to 2.7.5
- Add `--disable-dependency-tracking' and `--enable-final' options
- Include translations

* Mon Oct 24 2005 Mickael <dreadyman@gmail.com>
- initial release

