File mingw-libgweather.spec of Package mingw-libgweather

%{?mingw_package_header}
%define _pkg_name libgweather

Name:		mingw-%{_pkg_name}
Version:	3.6.2
Release:	1%{?dist}
Summary:	MinGW build of a library for weather information

License:	GPLv2+
URL:		ftp://ftp.gnome.org/pub/gnome/sources/libgweather/
Source0:	ftp://ftp.gnome.org/pub/gnome/sources/libgweather/3.6/libgweather-%{version}.tar.xz

BuildArch:	noarch

BuildRequires:	mingw32-filesystem >= 95
BuildRequires:	mingw64-filesystem >= 95
BuildRequires:	mingw32-gcc mingw64-gcc
BuildRequires:	mingw32-binutils mingw64-binutils
BuildRequires:	mingw32-gtk3 mingw64-gtk3
BuildRequires:	mingw32-libxml2 mingw64-libxml2
BuildRequires:	mingw32-libsoup mingw64-libsoup
BuildRequires:	mingw32-glib2 mingw64-glib2
BuildRequires:	mingw32-libgnurx mingw64-libgnurx
BuildRequires:	mingw32-pkg-config mingw64-pkg-config
BuildRequires:	gtk-doc intltool libxml2-devel

%description
libgweather is a library to access weather information from online
services for numerous locations.

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

%description -n mingw32-%{_pkg_name}
libgweather is a library to access weather information from online
services for numerous locations.

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

%description -n mingw32-%{_pkg_name}-static
libgweather is a library to access weather information from online
services for numerous locations.

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

%description -n mingw64-%{_pkg_name}
libgweather is a library to access weather information from online
services for numerous locations.

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

%description -n mingw64-%{_pkg_name}-static
libgweather is a library to access weather information from online
services for numerous locations.

%{?mingw_debug_package}

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


%build
%mingw_configure \
	--enable-shared \
	--enable-static \
	--enable-compile-warnings=maximum

%mingw_make %{?_smp_mflags}


%install
%mingw_make install DESTDIR=%{buildroot}

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

# The schemas get installed anyway
rm -rf %{buildroot}%{mingw32_datadir}/glib-2.0
rm -rf %{buildroot}%{mingw64_datadir}/glib-2.0

%mingw_find_lang %{_pkg_name}-3.0

%files -n mingw32-%{_pkg_name} -f mingw32-%{_pkg_name}-3.0.lang
%doc README COPYING ChangeLog AUTHORS NEWS
%{mingw32_bindir}/libgweather-3-1.dll
%{mingw32_datadir}/libgweather/Locations.*.xml*
%{mingw32_datadir}/libgweather/Locations.xml*
%{mingw32_datadir}/libgweather/locations.dtd
%{mingw32_datadir}/icons/gnome/*/status/weather-*
%{mingw32_includedir}/libgweather-3.0
%{mingw32_libdir}/libgweather-3.dll.a
%{mingw32_libdir}/pkgconfig/gweather-3.0.pc

%files -n mingw32-%{_pkg_name}-static
%{mingw32_libdir}/libgweather-3.a

%files -n mingw64-%{_pkg_name} -f mingw64-%{_pkg_name}-3.0.lang
%doc README COPYING ChangeLog AUTHORS NEWS
%{mingw64_bindir}/libgweather-3-1.dll
%{mingw64_datadir}/libgweather/Locations.*.xml*
%{mingw64_datadir}/libgweather/Locations.xml*
%{mingw64_datadir}/libgweather/locations.dtd
%{mingw64_datadir}/icons/gnome/*/status/weather-*
%{mingw64_includedir}/libgweather-3.0
%{mingw64_libdir}/libgweather-3.dll.a
%{mingw64_libdir}/pkgconfig/gweather-3.0.pc

%files -n mingw64-%{_pkg_name}-static
%{mingw64_libdir}/libgweather-3.a

%changelog
*Mon Dec 10 2012 Greg Hellings <greg.hellings@gmail.com> - 3.6.2-1
-Initial build