File qtkeychain.spec of Package qtkeychain
#
# spec file for package qtkeychain
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Klaas Freitag <freitag@owncloud.com>, ownCloud GmbH.
#
# 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/
#
%define _soversion 0
Name: qtkeychain
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libqt4-devel >= 4.6
Version: 0.4
Release: 0
Summary: Platform-independent Qt API for storing passwords securely
License: BSD-2-Clause
Group: Development/Libraries/C and C++
Url: https://github.com/frankosterfeld/qtkeychain
Source0: qtkeychain-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Platform-independent Qt API for storing passwords securely.
If running, GNOME Keyring is used, otherwise qtkeychain tries to use KWallet (via D-Bus), if available.
%package -n lib%{name}%{_soversion}
Summary: Platform-independent Qt API for storing passwords securely
Group: Development/Libraries/C and C++
%description -n lib%{name}%{_soversion}
Platform-independent Qt API for storing passwords securely.
If running, GNOME Keyring is used, otherwise qtkeychain tries to use KWallet (via D-Bus), if available.
%package lang
Summary: Platform-independent Qt API for storing passwords securely
Group: Development/Libraries/C and C++
Requires: libqtkeychain%{_soversion} = %{version}
%description lang
Platform-independent Qt API for storing passwords securely.
If running, GNOME Keyring is used, otherwise qtkeychain tries to use KWallet (via D-Bus), if available.
This package contains translation files for libqtkeychain.
%package devel
Summary: Platform-independent Qt API for storing passwords securely
Group: Development/Libraries/C and C++
Requires: libqtkeychain%{_soversion} = %{version}
%description devel
Platform-independent Qt API for storing passwords securely.
If running, GNOME Keyring is used, otherwise qtkeychain tries to use KWallet (via D-Bus), if available.
This package contains development files for libqtkeychain.
%prep
%setup -q -n qtkeychain-%{version}
%build
mkdir build
pushd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON
make VERBOSE=1 %{?_smp_mflags}
popd
%install
pushd build
make DESTDIR=%{buildroot} install
popd
%post -n lib%{name}%{_soversion} -p /sbin/ldconfig
%postun -n lib%{name}%{_soversion} -p /sbin/ldconfig
%files -n lib%{name}%{_soversion}
%defattr(-,root,root)
%{_libdir}/libqtkeychain.so.*
%doc COPYING ReadMe.txt
%files lang
%defattr(-,root,root)
%{_prefix}/share/qt4/translations/qtkeychain_*.qm
%files devel
%defattr(-,root,root)
%{_includedir}/qtkeychain
%{_libdir}/cmake
%{_libdir}/libqtkeychain.so
%changelog