Summary:	Library for AppStream metadata
Summary(ja):	AppStream メタデータ用ライブラリ
Name:		libappstream-glib
Version:	0.5.2
Release:	1%{?_dist_release}
License:	LGPLv2+
Group:		System Environment/Libraries
URL:		http://people.freedesktop.org/~hughsient/appstream-glib/

Source:		http://people.freedesktop.org/~hughsient/releases/appstream-glib-%{version}.tar.xz

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

BuildRequires:	gtk3-devel
BuildRequires:	libarchive-devel
BuildRequires:	libsoup-devel >= 2.24
BuildRequires:	gperf
BuildRequires:	sqlite3-devel
BuildRequires:	rpm-devel
BuildRequires:	libyaml-devel
BuildRequires:	gcab-devel
BuildRequires:	gtk-doc >= 1.9


Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi

%description
This library provides GObjects and helper methods to make it easy
to read and write AppStream metadata. It also provides a simple DOM
implementation that makes it easy to edit nodes and convert to and
from the standardized XML representation. 

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

%description	devel
Header files and libraries for building a extension library for the %{name}.


%package		docs
Summary:		Documentation for %{name}
Summary(ja):	%{name} 用のドキュメント
Group:			Documentation
Requires:		%{name} = %{version}-%{release}
BuildArch:		noarch

%description	docs
This package contains documentation for %{name}.


%package -n libappstream-builder
Summary:		Library and command line tools for building AppStream metadata
Summary(ja):	AppStream メタデータを生成するためのライブラリ及びコマンドラインツール
Group:			System Environment/Libraries
Requires:		%{name} = %{version}-%{release}

%description -n libappstream-builder
%{summary}


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

%description -n libappstream-builder-devel
Header files and libraries for building a extension library for the libappstream-builder.


%prep
%setup -q -n appstream-glib-%{version}

%build
%configure --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

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

%find_lang appstream-glib

%clean
rm -rf $RPM_BUILD_ROOT


%files -f appstream-glib.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README.md
%{_bindir}/appstream-util
%{_libdir}/%{name}.so.*
%{_libdir}/girepository-1.0/AppStreamGlib-1.0.typelib
%{_datadir}/bash-completion/completions/appstream-util
%{_mandir}/man1/appstream-util.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/appstream-glib.pc
%{_datadir}/aclocal/appstream-xml.m4
%{_datadir}/gir-1.0/AppStreamGlib-1.0.gir
%{_datadir}/installed-tests/appstream-glib/*.test
%exclude %{_datadir}/aclocal/appdata-xml.m4

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

%files -n libappstream-builder
%defattr(-,root,root,-)
%{_bindir}/appstream-builder
%{_libdir}/libappstream-builder.so.*
%{_libdir}/girepository-1.0/AppStreamBuilder-1.0.typelib
%{_libdir}/asb-plugins-4/*.so
%{_libdir}/girepository-1.0/AppStreamGlib-1.0.typelib
%{_datadir}/bash-completion/completions/appstream-builder
%{_mandir}/man1/appstream-builder.1.gz

%files -n libappstream-builder-devel
%defattr(-,root,root,-)
%{_includedir}/libappstream-builder/
%{_libdir}/libappstream-builder.so
%{_libdir}/pkgconfig/appstream-builder.pc
%{_datadir}/gir-1.0/AppStreamBuilder-1.0.gir

%changelog
* Thu Oct 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.2-1
- new usptream release
- add BuildRequires: gcab-devel

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.3.1-1
- initial build