File libical.spec of Package libical.17518

#
# spec file for package libical
#
# Copyright (c) 2017 SUSE LINUX 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:           libical
Version:        2.0.0
Release:        0
%define sonum   2
Summary:        An Implementation of Basic iCAL Protocols
License:        MPL-1.0 or LGPL-2.1
Group:          Development/Libraries/C and C++
Url:            http://sourceforge.net/projects/freeassociation/

#Git-Clone:     https://github.com/libical/libical
Source:         https://github.com/libical/libical/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source2:        baselibs.conf
Patch1:         0001-build-ICU-must-appear-as-Requires-in-pkgconfig.patch
# PATCH-FIX-UPSTREAM libical-boo986631-read-past-end.patch boo#986631 mgorse@suse.com -- fix for reading passed end of string (CVE-2016-5827)
Patch2:         libical-boo986631-read-past-end.patch
# PATCH-FIX-UPSTREAM libical-boo986631-check-prev-char.patch boo#986631 mgorse@suse.com -- make sure we have a prev_char before checking it
Patch3:         libical-boo986631-check-prev-char.patch
# PATCH-FIX-UPSTREAM libical-parser-sanity-check.patch mgorse@suse.com -- sanity check value parameter against what is allowed.
Patch4:         libical-parser-sanity-check.patch
# PATCH-FIX-UPSTREAM          libical-timezone-use-after-free.patch mgorse@suse.com -- fix use after free in fetch_lat_long_from_string
Patch5:         libical-timezone-use-after-free.patch
# PATCH-FIX-UPSTREAM libical-boo1015964-use-after-free.patch boo#986639 boo#1015984 mgorse@suse.com -- copy reqstattype's debug string into its own memory (CVE-2016-5824 CVE-2016-9584).
Patch6:         libical-boo1015964-use-after-free.patch
# PATCH-FIX-UPSTREAM libical-read-v2-v3-data.patch boo#1178412 mgorse@suse.com -- correctly read slim timezone data.
Patch7:         libical-read-v2-v3-data.patch
BuildRequires:  cmake >= 2.4
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(icu-i18n)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libical is an open source implementation of the IETF's iCalendar
calendaring and scheduling protocols (RFC 2445, 2446, and 2447). It
parses iCal components and provides a C API for manipulating the
component properties, parameters, and subcomponents.

%package -n %{name}%{sonum}
Summary:        An Implementation of Basic iCAL Protocols
Group:          System/Libraries
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n %{name}%{sonum}
Libical is an open source implementation of the IETF's iCalendar
calendaring and scheduling protocols (RFC 2445, 2446, and 2447). It
parses iCal components and provides a C API for manipulating the
component properties, parameters, and subcomponents.

%package devel
Summary:        Development files for libical, an implementation of basic iCAL protocols
Group:          Development/Libraries/C and C++
Requires:       %{name}%{sonum} = %{version}

%description devel
Libical is an Open Source implementation of the IETF's iCalendar
Calendaring and Scheduling protocols. (RFC 2445, 2446, and 2447). It
parses iCal components and provides a C API for manipulating the
component properties, parameters, and subcomponents.

%package devel-static
Summary:        Additional static library for development with libical
Group:          Development/Libraries/C and C++
Requires:       %{name}-devel = %{version}

%description devel-static
Libical is an Open Source implementation of the IETF's iCalendar
Calendaring and Scheduling protocols. (RFC 2445, 2446, and 2447). It
parses iCal components and provides a C API for manipulating the
component properties, parameters, and subcomponents.

%package doc
Summary:        Example source code for libical-using programs
Group:          Documentation/Other
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description doc
Libical is an open source implementation of the IETF's iCalendar
calendaring and scheduling protocols (RFC 2445, 2446, and 2447). It
parses iCal components and provides a C API for manipulating the
component properties, parameters, and subcomponents.

%prep
%setup -q
%patch -P 1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

%build
%cmake
make -j1

%install
%cmake_install
rm examples/CMakeLists.txt

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

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

%files -n %{name}%{sonum}
%defattr(-,root,root)
%doc AUTHORS ReadMe.txt ReleaseNotes.txt COPYING LICENSE TEST THANKS TODO
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/libical.pc
%{_includedir}/libical/
%{_libdir}/cmake/LibIcal/

%files devel-static
%defattr(-,root,root)
%{_libdir}/*.a

%files doc
%defattr(-,root,root)
%doc doc/*.txt
%doc examples/

%changelog
openSUSE Build Service is sponsored by