Summary:	The MATE Terminal Emulator
Name:		mate-terminal
Version:	1.4.0
Release:	1%{?_dist_release}

Source0:	http://pub.mate-desktop.org/releases/1.4/%{name}-%{version}.tar.xz

Patch0:		mate-terminal-1.4.0-ja.po.patch

License:	GPLv2
Group:		User Interface/Desktops
URL:		http://mate-desktop.org/

BuildRequires:	mate-common
BuildRequires:	mate-doc-utils
BuildRequires:	mate-conf-devel
BuildRequires:	gtk2-devel
BuildRequires:	vte-devel
BuildRequires:	libSM-devel
BuildRequires:	gtk-doc
BuildRequires:	autoconf
BuildRequires:	automake

Requires(post,pre,preun):	mate-conf
Requires(post,postun):	desktop-file-utils

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi


%description
This is the MATE terminal emulator application.  mate-terminal is
only the shell (menubar, prefs dialog); the terminal emulation ("stuff
in the middle") comes from the VTE widget. Remember this when 
choosing a bugzilla component. ;-)


%prep
%setup -q
%patch0 -p1


%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi)
%configure \
	--disable-static \
	--disable-scrollkeeper

%{__make} %{?_smp_mflags}


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

export MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%{__make} install DESTDIR=${RPM_BUILD_ROOT}
unset MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

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
/sbin/ldconfig

export MATECONF_CONFIG_SOURCE=`mateconftool-2 --get-default-source`

SCHEMAS=" \
  mate-terminal.schemas"
for S in $SCHEMAS; do
  echo %{_sysconfdir}/mateconf/schemas/$S; done \
  | xargs mateconftool-2 --makefile-install-rule >& /dev/null ||:

update-desktop-database %{_datadir}/applications >& /dev/null ||:

%pre
if [ "$1" -gt 1 ]; then
  export MATECONF_CONFIG_SOURCE=`mateconftool-2 --get-default-source`

  SCHEMAS=" \
    mate-terminal.schemas"
  for S in $SCHEMAS; do
    echo %{_sysconfdir}/mateconf/schemas/$S; done \
    | xargs mateconftool-2 --makefile-uninstall-rule >& /dev/null ||:
fi

%preun
if [ "$1" -eq 0 ]; then
  export MATECONF_CONFIG_SOURCE=`mateconftool-2 --get-default-source`

  SCHEMAS=" \
    mate-terminal.schemas"
  for S in $SCHEMAS; do
    echo %{_sysconfdir}/mateconf/schemas/$S; done \
    | xargs mateconftool-2 --makefile-uninstall-rule >& /dev/null ||:
fi

%postun
/sbin/ldconfig
update-desktop-database %{_datadir}/applications >& /dev/null ||:


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_sysconfdir}/mateconf/schemas/mate-terminal.schemas
%{_bindir}/mate-terminal
%{_datadir}/applications/mate-terminal.desktop
%{_datadir}/mate/help/%{name}
%{_datadir}/%{name}
%{_datadir}/omf/%{name}


%changelog
* Thu Aug 02 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release
- add Patch0 (mate-terminal-1.4.0-ja.po.patch)

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

* Fri Dec 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-2
- change category

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

