File libgcal.spec of Package libgcal

#
# spec file for package libgcal
#
# Copyright (c) 2011 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 soname 0

Name:           libgcal
Version:        0.9.6
Release:        1
License:        BSD
Url:            http://code.google.com/p/libgcal/
Group:          Development/Libraries/C and C++
Source:         http://libgcal.googlecode.com/files/libgcal-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  check-devel
BuildRequires:  cmake
BuildRequires:  libcurl-devel
BuildRequires:  libxml2-devel
BuildRequires:  pkg-config
Summary:        A Library for Communication with Google Calendar and Contacts

%description
Ligbcal is an ANSI C library that does allow communication with google calendar
and contacts, useful if you need to support this in a C or C++ application.


Authors:
--------
    Adenilson Cavalcanti da Silva


%package -n %{name}%{soname}

Group:          System/Libraries
Summary:        A Library for Communication with Google Calendar and Contacts

%description -n %{name}%{soname}
Ligbcal is an ANSI C library that does allow communication with google calendar
and contacts, useful if you need to support this in a C or C++ application.


Authors:
--------
    Adenilson Cavalcanti da Silva


%package devel

Group:          Development/Libraries/C and C++
Requires:       %{name}%{soname} = %{version}
Requires:       libcurl-devel
Requires:       libxml2-devel
Summary:        A Library for Communication with Google Calendar and Contacts

%description devel
Ligbcal is an ANSI C library that does allow communication with google calendar
and contacts, useful if you need to support this in a C or C++ application.


Authors:
--------
    Adenilson Cavalcanti da Silva


%prep
%setup -q

%build
mkdir build
pushd build
CFLAGS="%{optflags}" \
CXXFLAGS="%{optflags}" \
cmake \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if %{_lib} == lib64
        -DLIB_SUFFIX=64 \
%endif
         %{_builddir}/%{name}-%{version}
make %{?_smp_mflags} VERBOSE=1
popd

%install
pushd build
%make_install
popd
find %{buildroot}%{_libdir} -name "*.la" -delete

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

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

%clean
rm -rf %{buildroot}

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

%files devel
%defattr(-,root,root)
%doc Changelog.txt README
%{_includedir}/libgcal
%{_libdir}/LibGCal
%{_libdir}/libgcal.so
%{_libdir}/pkgconfig/libgcal.pc
%changelog
openSUSE Build Service is sponsored by