Summary:	GNOME logfile viewer
Summary(ja):	GNOME ログビューアー
Name:		gnome-system-log
Version:	3.8.1
Release:	2%{?_dist_release}
License:	GPLv2+
Group:		User Interface/Desktops
URL:		http://www.gnome.org

Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.8/%{name}-%{version}.tar.xz

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

BuildRequires:	gtk3-devel
BuildRequires:	itstool

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
gnome-system-log is a simple utility to display system log files.

%description -l ja
gnome-system-log はシステムログファイルを閲覧するためのシンプルなユーティリティーです。

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT

# make gnome-system-log use consolehelper until it starts using polkit
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
/bin/cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/pam.d/%{name}
#%%PAM-1.0
auth            include         config-util
account         include         config-util
session         include         config-util
EOF

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps
/bin/cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/%{name}
USER=root
PROGRAM=/usr/sbin/%{name}
SESSION=true
FALLBACK=true
EOF

mkdir -p $RPM_BUILD_ROOT%{_sbindir}
/bin/mv $RPM_BUILD_ROOT%{_bindir}/%{name} $RPM_BUILD_ROOT%{_sbindir}
/bin/ln -s /usr/bin/consolehelper $RPM_BUILD_ROOT%{_bindir}/%{name}


%find_lang %{name} --all-name --with-gnome

%clean
rm -rf $RPM_BUILD_ROOT

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

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

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


%files -f %{name}.lang
%defattr(-,root,root,-)
%{_sysconfdir}/pam.d/%{name}
%{_sysconfdir}/security/console.apps/%{name}
%{_bindir}/%{name}
%{_sbindir}/%{name}
%{_datadir}/GConf/gsettings/logview.convert
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gnome-system-log.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/icons/HighContrast/*/*/*
%{_mandir}/man1/%{name}.1.gz


%changelog
* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-2
- rebuild with VineSeed environment

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.1-1
- new upstream release

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

* Sun Oct 21 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-2
- fix %%files

* Sun Sep 30 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- initial build
