%define _unpackaged_files_terminate_build 1
%global _vpath_srcdir .
%global _vpath_builddir build
%global __global_cflags %{optflags}
%global __global_ldflags ""

Summary:	A PackageKit client for the GNOME desktop
Name:		gnome-packagekit
Version:	3.30.0
Release:	1%{?_dist_release}
Source0:	http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.12/%{name}-%{version}.tar.xz
License:	GPLv2
Group:		Applications/Administration
URL:		http://www.packagekit.org

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

BuildRequires: glib2-devel >= 2.25.8
BuildRequires: gtk3-devel
BuildRequires: libnotify-devel >= 0.7.0
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: libtool
BuildRequires: cairo-devel
BuildRequires: startup-notification-devel
BuildRequires: PackageKit-devel >= 0.5.0
BuildRequires: xorg-x11-proto-devel
BuildRequires: fontconfig-devel
BuildRequires: libcanberra-devel
BuildRequires: libgudev1-devel
BuildRequires: libxslt
BuildRequires: docbook-utils
#BuildRequires: systemd-devel
BuildRequires: meson
BuildRequires: polkit-devel
BuildRequires: itstool
BuildRequires: libappstream-glib

BuildRequires:	dbus-glib-devel
BuildRequires:	upower-devel
BuildRequires:	libcanberra-gtk3-devel
BuildRequires:	yelp-tools

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
gnome-packagekit are PackageKit client programs designed for the GNOME desktop.


%prep
%setup -q


%build
export LANG=ja_JP.UTF-8

%meson \
 -Dsystemd=false

%meson_build

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

# use gnome-software for installing local files
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/gpk-install-local-file.desktop

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

%find_lang %{name} --with-gnome

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

%post
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
fi

%postun
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:
if [ $1 -eq 0 ]; then
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
fi

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



%files -f %{name}.lang
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS README
%{_bindir}/gpk-log
%{_bindir}/gpk-prefs
%dir %{_datadir}/gnome-packagekit
%dir %{_datadir}/gnome-packagekit/icons
%dir %{_datadir}/gnome-packagekit/icons/hicolor
%dir %{_datadir}/gnome-packagekit/icons/hicolor/*
%dir %{_datadir}/gnome-packagekit/icons/hicolor/*/*
%{_datadir}/gnome-packagekit/icons/hicolor/*/*/*.png
%{_datadir}/gnome-packagekit/icons/hicolor/scalable/*/*.svg*
%{_datadir}/icons/hicolor/scalable/*/*.svg*
%{_datadir}/applications/gpk-log.desktop
%{_datadir}/applications/gpk-prefs.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.packagekit.gschema.xml
%{_datadir}/GConf/gsettings/org.gnome.packagekit.gschema.migrate
%{_mandir}/man1/gpk-log.1*
%{_mandir}/man1/gpk-prefs.1*
#
%{_bindir}/gpk-application
%{_datadir}/applications/org.gnome.Packages.desktop
%{_datadir}/metainfo/org.gnome.Packages.appdata.xml
%{_mandir}/man1/gpk-application.1*
#
%{_bindir}/gpk-update-viewer
%{_datadir}/applications/org.gnome.PackageUpdater.desktop
%{_datadir}/metainfo/org.gnome.PackageUpdater.appdata.xml
%{_mandir}/man1/gpk-update-viewer.1*

%changelog
* Tue Dec 11 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.30.0-1
- new upstream release.

* Sun Apr 13 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.12.1-1
- new upstream release

* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.10.1-1
- new upstream release

* Sun May 19 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.2-1
- new upstream release

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release
- change BuildRequires: yelp-tools instead of gnome-doc-utils

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-2
- rebuild with python-2.7.2

* Tue Jan 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.1-1
- initial build for Vine Linux

