File mingw-libical.spec of Package mingw-libical

%{?mingw_package_header}
%define _pkg_name libical

Name:		mingw-%{_pkg_name}
Version:	0.48
Release:	1%{?dist}
Summary:	MinGW build of library for iCal data types and serialization

License:	LGPLv2 or MPLv1.1
URL:		http://freeassociation.sourceforge.net
Source0:	http://downloads.sourceforge.net/freeassociation/libical-%{version}.tar.gz

Patch0:		libical-0.48-tml.patch

BuildArch:	noarch

BuildRequires:	mingw32-filesystem >= 95
BuildRequires:	mingw64-filesystem >= 95
BuildRequires:	mingw32-gcc mingw64-gcc
BuildRequires:	mingw32-binutils mingw64-binutils
BuildRequires:	mingw32-pkg-config mingw64-pkg-config
BuildRequires:	autoconf >= 2.60 automake libtool

%description
Reference implementation of the iCalendar data type and serialization format
used in dozens of calendaring and scheduling products.


%package -n mingw32-%{_pkg_name}
Summary:	%{summary}

%description -n mingw32-%{_pkg_name}
Reference implementation of the iCalendar data type and serialization format
used in dozens of calendaring and scheduling products.

%package -n mingw32-%{_pkg_name}-static
Summary:	%{summary}
Requires:	mingw32-%{_pkg_name} = %{version}

%description -n mingw32-%{_pkg_name}-static
Reference implementation of the iCalendar data type and serialization format
used in dozens of calendaring and scheduling products.

%package -n mingw64-%{_pkg_name}
Summary:	%{summary}

%description -n mingw64-%{_pkg_name}
Reference implementation of the iCalendar data type and serialization format
used in dozens of calendaring and scheduling products.

%package -n mingw64-%{_pkg_name}-static
Summary:	%{summary}
Requires:	mingw64-%{_pkg_name} = %{version}

%description -n mingw64-%{_pkg_name}-static
Reference implementation of the iCalendar data type and serialization format
used in dozens of calendaring and scheduling products.

%{?mingw_debug_package}

%prep
%setup -q -n libical-%{version}
%patch0 -p1 -b .tml

%build
libtoolize --force --copy
aclocal
autoheader
automake -a
autoconf
%mingw_configure \
	--enable-shared \
	--enable-static


%mingw_make %{?_smp_mflags}

%install
%mingw_make install DESTDIR=%{buildroot}

find %{buildroot} -name '*.la' -delete

%files -n mingw32-%{_pkg_name}
%doc AUTHORS ChangeLog COPYING LICENSE README
%{mingw32_bindir}/libicalvcal-0.dll
%{mingw32_bindir}/libicalss-0.dll
%{mingw32_bindir}/libical-0.dll
%{mingw32_includedir}/ical.h
%{mingw32_includedir}/libical
%{mingw32_libdir}/libicalvcal.dll.a
%{mingw32_libdir}/libicalss.dll.a
%{mingw32_libdir}/libical.dll.a
%{mingw32_libdir}/pkgconfig/libical.pc
%{mingw32_datadir}/libical/zoneinfo

%files -n mingw32-%{_pkg_name}-static
%{mingw32_libdir}/libicalvcal.a
%{mingw32_libdir}/libicalss.a
%{mingw32_libdir}/libical.a

%files -n mingw64-%{_pkg_name}
%doc AUTHORS ChangeLog COPYING README
%{mingw64_bindir}/libicalvcal-0.dll
%{mingw64_bindir}/libicalss-0.dll
%{mingw64_bindir}/libical-0.dll
%{mingw64_includedir}/ical.h
%{mingw64_includedir}/libical
%{mingw64_libdir}/libicalvcal.dll.a
%{mingw64_libdir}/libicalss.dll.a
%{mingw64_libdir}/libical.dll.a
%{mingw64_libdir}/pkgconfig/libical.pc
%{mingw64_datadir}/libical/zoneinfo

%files -n mingw64-%{_pkg_name}-static
%{mingw64_libdir}/libicalvcal.a
%{mingw64_libdir}/libicalss.a
%{mingw64_libdir}/libical.a

%changelog
* Wed Dec 12 2012 Greg Hellings <greg.hellings@gmail.com> - 0.48-1
- Initial build