Summary:        Git repository viewer for GTK+/GNOME
Summary(ja):    Git リポジトリビューアー
Name:           gitg
Version:        3.32.1
Release:        %{?_dist_release}
Group:          Applications/Development
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPLv2
URL:            https://wiki.gnome.org/Apps/Gitg/
%global         shortver %(echo %{version} | cut -d . -f 1,2)
Source0:        https://download.gnome.org/sources/%{name}/%{shortver}/%{name}-%{version}.tar.xz
Source1:        ja.po

BuildRequires:  gobject-introspection-devel
BuildRequires:  gsettings-desktop-schemas-devel
BuildRequires:  gtk3-devel
BuildRequires:  gtksourceview3-devel
BuildRequires:  gtkspell3-devel
BuildRequires:  json-glib-devel
BuildRequires:  libdazzle-devel
BuildRequires:  libgee-devel
BuildRequires:  libgee-vala
BuildRequires:  libgit2-glib-devel
BuildRequires:  libpeas-devel
BuildRequires:  libsecret-devel
BuildRequires:  libxml2-devel
BuildRequires:  meson
BuildRequires:  pygobject3-devel
BuildRequires:  python3-pygobject
BuildRequires:  python3-rpm-macros
BuildRequires:  vala-tools
BuildRequires:  webkitgtk4-devel

Requires(postun,posttrans): glib2
Requires(postun,posttrans): desktop-file-utils
Requires(postun,posttrans): gtk2

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


%description
Gitg is the GNOME GUI client to view git repositories. 

%description -l ja
Gitg は git リポジトリを閲覧するための GNOME GUI クライアントです。


%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        vala
Summary:        Vala bindings for %{name}
Summary(ja):    %{name} の Vala バインディング
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       vala

%description    vala
Vala bindings for %{name}.


%prep
%setup -q
cp %{SOURCE1} po/


%build
%meson \
  -Dglade_catalog=false
%meson_build


%install
rm -rf ${RPM_BUILD_ROOT}
%meson_install

%find_lang %{name}


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


%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor > /dev/null || :

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

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null || :
glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%license COPYING
%doc ChangeLog README NEWS
%{_bindir}/%{name}
%{_libdir}/libgitg-1.0.so.*
%{_libdir}/libgitg-ext-1.0.so.*
%{_libdir}/girepository-1.0/Gitg-1.0.typelib
%{_libdir}/girepository-1.0/GitgExt-1.0.typelib
%{_libdir}/%{name}
%{python3_sitelib}/gi/overrides/GitgExt.py
%{_datadir}/metainfo/*
%{_datadir}/applications/org.gnome.gitg.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gitg.gschema.xml
%{_datadir}/%{name}/icons/hicolor/scalable/actions/diff-symbolic.svg
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man1/%{name}.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/libgitg-1.0/
%{_includedir}/libgitg-ext-1.0/
%{_libdir}/libgitg-1.0.so
%{_libdir}/libgitg-ext-1.0.so
%{_libdir}/pkgconfig/libgitg-1.0.pc
%{_libdir}/pkgconfig/libgitg-ext-1.0.pc
%{_datadir}/gir-1.0/Gitg-1.0.gir
%{_datadir}/gir-1.0/GitgExt-1.0.gir

%files vala
%defattr(-,root,root,-)
%{_datadir}/vala/vapi/libgitg-1.0.vapi
%{_datadir}/vala/vapi/libgitg-ext-1.0.vapi


%changelog
* Tue May 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.32.1-1
- new upstream release.

* Tue Aug 21 2018 Toshiaki Ara <ara_t@384.jp> 3.26.0-1
- new upstream release

* Mon Jul 18 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.20.1-1
- new upstream release

* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.18.0-1
- new upstream release

* Sun May 03 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.1-1
- new upstream release

* Sun Apr 05 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.16.0-1
- initial build

