File kvirc.spec of Package kvirc

#
# spec file for package kvirc
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           kvirc
Version:        4.2.0
Release:        0
Summary:        Graphical Front-End for IRC
License:        SUSE-GPL-2.0+-with-openssl-exception
Group:          Productivity/Networking/IRC
Url:            http://www.kvirc.net/
Source:         ftp://ftp.kvirc.de/pub/kvirc/%{version}/source/kvirc-%{version}.tar.bz2
%define         _realversion 4.0
BuildRequires:  audiofile-devel
BuildRequires:  fdupes
BuildRequires:  glibc-devel
BuildRequires:  libkde4-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  python-devel
# use external libraries if available.  This is the upstream recommended way to build the package
%if 0%{?suse_version} >= 1140
BuildRequires:  libcryptopp-devel
%endif

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%requires_eq    perl
%kde4_runtime_requires

%description
IRC (Internet Relay Chat) client with an MDI interface; scripting,
pop-up, alias, and event editor; DCC (SEND CHAT VOICE and RESUME);
SOCKSV4 & V5 support; and more.

%package devel
Summary:        Graphical Front-End for IRC
Group:          Development/Libraries/C and C++
Requires:       kvirc = %{version}

%description devel
IRC (Internet Relay Chat) client with an MDI interface; scripting,
pop-up, alias, and event editor; DCC (SEND CHAT VOICE and RESUME);
SOCKSV4 & V5 support; and more. See documentation in
/opt/kde/share/doc/HTML/de/kvirc/index.html.

%prep
%setup -q -n kvirc-%{version}
sed -i -e 's|@CMAKE_KVIRC_BUILD_DATE@||g' cmake/kvirc-config.cmake

%build
EXTRA_FLAGS="-DWANT_KDE4=ON \
%if 0%{?suse_version} >= 1140
             -DWITH_NO_EMBEDDED_CODE=ON \
%endif
             -DWANT_COEXISTENCE=OFF"
%cmake_kde4 -d build -- $EXTRA_FLAGS
make %{?_smp_mflags} VERBOSE=1

%install
pushd build
%make_install
%suse_update_desktop_file kvirc Network IRCClient
popd
L="$PWD/%{name}.lang"
echo -n >"$L"
pushd "%{buildroot}%{_datadir}/%{name}"
find . -type f -name '*.mo' | while read f; do
l="${f#./}"
l="${l%%/*}"
echo "%lang($l) %{_datadir}/%{name}/${f#./}" >> "$L"
done
popd
%fdupes %{buildroot}

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc README ChangeLog
%dir %{_kde4_mandir}/uk
%dir %{_kde4_mandir}/uk/man1
%exclude %{_kde4_bindir}/kvirc-config
%{_kde4_bindir}/kvirc*
%{_kde4_libdir}/libkvilib*.so.*
%{_kde4_libdir}/kvirc/
%{_datadir}/kvirc/
%{_datadir}/mime/packages/kvirc.xml
%{_datadir}/applications/kvirc*.desktop
%{_kde4_iconsdir}/hicolor
%{_datadir}/pixmaps/kvirc.png
%{_kde4_mandir}/*/man?/kvirc.*
%{_kde4_mandir}/man?/kvirc.*
%{_kde4_appsdir}/kvirc/
%{_kde4_servicesdir}/_irc*.protocol

%files devel
%defattr(-,root,root)
%{_kde4_bindir}/kvirc-config
%{_kde4_libdir}/libkvilib*.so

%changelog
openSUSE Build Service is sponsored by