Summary:	Provides access to weather information from the net
Name:		libmateweather
Version:	1.12.0
Release:	1%{?_dist_release}
Source0:	http://pub.mate-desktop.org/releases/1.12/%{name}-%{version}.tar.xz
License:	GPLv2
Group:		System Environment/Libraries 
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	libxml2-devel
BuildRequires:	gtk2-devel
BuildRequires:	libsoup-devel
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires(posttrans,postun):	glib2

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


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


%package        l10n
Summary:        Localized xml files for libmateweather
Summary(ja):    libmateweather の多言語データ
Group:          System Environment/Libraries
Requires:       %{name} = %{version}

%description    l10n
This package contains localized xml files for libmateweather.
(except for English and Japanese)


%package        devel
Summary:        Development tools for libmateweather
Summary(ja):    libmateweather の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description	devel
Header files and libraries for building a extension library for the
libmateweather.


%package        docs
Summary:        Documentation for libmateweather
Summary(ja):    libmateweather 用のドキュメント
Group:          Documentation
BuildArch:      noarch

%description    docs
This package contains documentation for libmateweather.


%prep
%setup -q


%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--disable-static
	
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}

%{__make} install DESTDIR=${RPM_BUILD_ROOT}

find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} \;
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;

%find_lang %{name}


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%post -p /sbin/ldconfig

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_libdir}/libmateweather.so.*
%{_datadir}/glib-2.0/schemas/org.mate.weather.gschema.xml
%{_datadir}/icons/mate/*/*/*
%{_datadir}/libmateweather/Locations.xml
%{_datadir}/libmateweather/Locations.ja.xml

%files l10n
%defattr(-,root,root)
%{_datadir}/libmateweather/*
%exclude %{_datadir}/libmateweather/Locations.xml
%exclude %{_datadir}/libmateweather/Locations.ja.xml

%files devel
%defattr(-,root,root,-)
%{_includedir}/libmateweather
%{_libdir}/libmateweather.so
%{_libdir}/pkgconfig/mateweather.pc

%files docs
%defattr(-,root,root,-)
%{_datadir}/gtk-doc/html/libmateweather


%changelog
* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release
- create %%{name}-l10n subpackage
- rename document subpackage

* Mon Apr 14 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-2
- rebuild with VineSeed environment

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release
- remove BuildRequires: mate-conf-devel

* Wed Aug 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.0-1
- new upstream release

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1
- initial build for Vine Linux

