%define major_ver 1.20
%define ver %{major_ver}.3
%define rel 1

Summary:	A window manager for MATE
Name:		marco
Version:	%{ver}
Release:	%{rel}%{?_dist_release}
Source0:	http://pub.mate-desktop.org/releases/%{major_ver}/%{name}-%{version}.tar.xz
License:	GPLv2
Group:		User Interface/Desktops
URL:		http://mate-desktop.org/

# patch for Vine
Patch1001:	mate-window-manager-vine-settings.patch

BuildRequires:	mate-common
BuildRequires:	libSM-devel
BuildRequires:	gtk3-devel >= 3.22
BuildRequires:	libcanberra-gtk3-devel
BuildRequires:	pango-devel >= 1.2.0
BuildRequires:	libXcomposite-devel >= 0.3
BuildRequires:	libgtop2-devel
BuildRequires:	zenity
BuildRequires:	startup-notification-devel >= 0.7
BuildRequires:	gtk-doc
BuildRequires:	itstool
BuildRequires:	autoconf
BuildRequires:	automake

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

Obsoletes:	mate-window-manager < 1.8.0
Provides:	mate-window-manager = %{version}-%{release}

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	Takemikaduchi, iwaim


%description
Marco is not a meta-City as in an urban center, but rather
Meta-ness as in the state of being meta. i.e. marco : meta as
opacity : opaque. Also it may have something to do with the Meta key
on UNIX keyboards.


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

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


%prep
%setup -q
%patch1001 -p1 -b .vine


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

%{__make} %{?_smp_mflags}


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

%{__make} install DESTDIR=${RPM_BUILD_ROOT}

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
update-desktop-database %{_datadir}/applications >& /dev/null ||:

%postun
/sbin/ldconfig
if [ $1 -eq 0 ]; then
  update-desktop-database %{_datadir}/applications >& /dev/null ||:
  glib-compile-schemas %{_datadir}/glib-2.0/schemas ||:
fi

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


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/%{name}
%{_bindir}/marco-message
%{_bindir}/marco-theme-viewer
%{_bindir}/marco-window-demo
%{_libdir}/libmarco-private.so.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.mate.marco.gschema.xml
%{_datadir}/help/*
%{_datadir}/mate/wm-properties/marco-wm.desktop
%{_datadir}/mate-control-center/keybindings/*.xml
%{_datadir}/%{name}/icons/marco-window-demo.png
%{_datadir}/themes
%{_mandir}/man1/*.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/marco-1
%{_libdir}/libmarco-private.so
%{_libdir}/pkgconfig/libmarco-private.pc


%changelog
* Thu May 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.20.3-1
- updated to 1.20.3.

* Wed Mar 28 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.20.1-1
- update to 1.20.1

* Wed Jan 17 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.2-1
- update to 1.18.2

* Sat Nov 18 2017 Munehiro Yamamoto <munepi@vinelinux.org> 1.18.1-2
- added BuildRequires: libSM-devel

* Thu May 25 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.1-1
- update to 1.18.1

* Sun Apr  2 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.18.0-1
- update to 1.18.0
- move to GTK3+
- update BuildRequires
 - drop gtk2-devel
 - add gtk3-devel
 - drop libcanberra-devel
 - add libcanberra-gtk3-devel
 - drop libSM-devel
 - add pango-devel
 - add libXcomposite-devel
 - add libgtop2-devel

* Thu Nov 24 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 1.16.0-1
- new upstream release
- drop BuildRequires: mate-doc-utils
- update Packager

* Sun May 22 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.2-1
- new upstream release

* Sun May 08 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.14.1-1
- new upstream release

* Tue Dec 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.1-1
- new upstream release

* Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.12.0-1
- new upstream release

* Sun Aug 30 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.2-1
- new upstream release

* Sat Jun 13 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.1-1
- new upstream release

* Sat May 09 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.0-1
- new upstream release

* Sun Mar 15 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.3-1
- new upstream release
- add BuildRequires: zenity
- remove BuildRequires: mate-dialog

* Wed Nov 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.2-1
- new upstream release

* Sun Jun 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.1-1
- new upstream release

* Wed Apr 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.8.0-1
- new upstream release
- add BuildRequires: itstool

* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-2
- rebuild with VineSeed environment

* Sun Sep 22 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.2-1
- new upstream release

* Sat May 25 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.6.1-1
- new upstream release
- remove BuildRequires: mate-conf-devel
- add Patch1001 (mate-window-manager-vine-settings.patch)

* Sat Nov 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.1-1
- new upstream release

* Wed Aug 01 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.0-1
- new upstream release

* Sat May 12 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.2.0-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

