File libQommando.spec of Package qommando

#
# spec file for package qommando
#
# Copyright (c) 2015 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:           libQommando
Version:        0.0.1
Release:        1%{?dist}
Summary:        A library to create CLI tools
Group:          Development/Libraries

License:        GPL-3.0+
URL:            https://git.simply-life.net/simply-life.net/qommando.git
Source0:        https://git.simply-life.net/packages/src/qommando-master.src.tar.gz

%if 0%{?fedora_version} || 0%{?centos_version} == 700 || 0%{?rhel_version} == 700
BuildRequires:  qt5-qtbase qt5-qtbase-devel
%else
# SUSE:
BuildRequires:  libQt5Core-devel libQt5Test-devel
%endif

BuildRequires:  readline-devel ncurses-devel cmake
Requires:       readline ncurses

%description
A library to create CLI tools. Easily create NCurses or Readline UIs, with a Qt-style
API.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Group:          Development/Libraries

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%setup -q -n qommando-master


%build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_LIB_DIR=%{_lib} ..
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
cd build
%make_install
rm $RPM_BUILD_ROOT/%{_bindir}/QommandoTestApp

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%attr(755,root,root) %{_libdir}/*.so

%files devel
%attr(644,root,root) %{_includedir}/*
%attr(644,root,root) %{_libdir}/cmake/*

%changelog
* Thu May 14 2015 Wouter Haffmans,,,
- 

openSUSE Build Service is sponsored by