File libQtGTL.spec of Package libQtGTL

#
# spec file for package libQtGTL
#
# Copyright 2009 Buschmann <buschmann23@opensuse.org>
# Copyright (c) 2012 Asterios Dramis <asterios.dramis@gmail.com>.
# Copyright (c) 2012 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/
#

%define libver 0_1
%define soversion 0.1

Name:           libQtGTL
Version:        0.9.2
Release:        0
License:        LGPL-2.0+
Summary:        Qt4 Wrapper Classes and Widgets for OpenGTL
Url:            http://www.opengtl.org/
Group:          System/Libraries
Source0:        http://download.opengtl.org/%{name}-%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  libqt4-devel
BuildRequires:  OpenGTL-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This library provides widgets and classes to interface a Qt-based applications
with OpenGTL.

%package devel
Summary:        Header Files for LibQtGTL
Group:          Development/Libraries/C and C++
Requires:       libQtGTL%{libver} = %{version}
Requires:       libQtShiva%{libver} = %{version}

%description devel
This package provides header files and libraries for the libQtGTL.

%package -n libQtGTL%{libver}
Summary:        Qt4 Wrapper Classes and Widgets for OpenGTL
Group:          System/Libraries

%description -n libQtGTL%{libver}
This library provides widgets and classes to interface a Qt-based applications
with OpenGTL.

%package -n libQtShiva%{libver}
Summary:        Qt4 Wrapper Classes and Widgets for OpenGTL
Group:          System/Libraries

%description -n libQtShiva%{libver}
This library provides widgets and classes to interface a Qt-based applications
with OpenGTL.

%prep
%setup -q

%build
mkdir build
cd build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
__libsuffix=$(echo %{_lib} | cut -b4-)
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
      -DLIB_SUFFIX="$__libsuffix" \
      -DCMAKE_BUILD_TYPE=release \
      ..
make %{?_smp_mflags} VERBOSE=1
cd ..

%install
cd build
%make_install
cd ..

%post -n libQtGTL%{libver} -p /sbin/ldconfig

%postun -n libQtGTL%{libver} -p /sbin/ldconfig

%post -n libQtShiva%{libver} -p /sbin/ldconfig

%postun -n libQtShiva%{libver} -p /sbin/ldconfig

%files devel
%defattr(-,root,root,-)
%doc COPYING
%{_includedir}/QtGTL/
%{_includedir}/QtShiva/
%{_libdir}/libQtGTL.so
%{_libdir}/libQtShiva.so
%{_libdir}/pkgconfig/*.pc

%files -n libQtGTL%{libver}
%defattr(-,root,root,-)
%{_libdir}/libQtGTL.so.%{soversion}
%{_libdir}/libQtGTL.so.%{version}

%files -n libQtShiva%{libver}
%defattr(-,root,root,-)
%{_libdir}/libQtShiva.so.%{soversion}
%{_libdir}/libQtShiva.so.%{version}

%changelog
openSUSE Build Service is sponsored by