File libqtweetlib.spec of Package libqtweetlib

#
# spec file for package libqtweetlib
#
# 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 _libname libQTweetLib
%define soname 1_0

Name:           libqtweetlib
Version:        0.5
Release:        0
Source0:        QTweetLib-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            https://github.com/minimoog/QTweetLib

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libqjson-devel
BuildRequires:  libqt4-devel

# main package
Summary:        C++ Qt Twitter library
License:        GPL-2.0+
Group:          System/Libraries

%description
C++ Qt based Twitter library.

# bin package
%package -n libqtweetlib%{soname}
Summary:        C++ Qt Twitter library
Group:          System/Libraries

%description -n libqtweetlib%{soname}
C++ Qt based Twitter library.

# devel package
%package devel
Summary:        C++ Qt Twitter library
Group:          Development/Libraries/C and C++
Requires:       libqt4-devel
Requires:       libqtweetlib%{soname} = %{version}

%description devel
C++ Qt based Twitter library.

# debug package
%package debug
Summary:        C++ Qt Twitter library
Group:          Development/Libraries/C and C++
Requires:       libqtweetlib%{soname} = %{version}

%description debug
C++ Qt based Twitter library.

%prep
%setup -q -n QTweetLib-%{version}

%build
export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden"
export CFLAGS="%{optflags}"
_libsuffix=$(echo %{_lib} | cut -b4-)

cmake . -DCMAKE_INSTALL_PREFIX="%{_prefix}" -DLIB_SUFFIX=$_libsuffix

make %{?_smp_mflags} VERBOSE=1

%install
make DESTDIR=%{buildroot} install

%clean
%__rm -rf %{buildroot}

%post -n libqtweetlib%{soname} -p /sbin/ldconfig

%postun -n libqtweetlib%{soname} -p /sbin/ldconfig

%files -n libqtweetlib%{soname}
%defattr(-,root,root,-)
%{_libdir}/libQTweetLib.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libQTweetLib.so
%{_includedir}/QTweetLib/

%changelog
openSUSE Build Service is sponsored by