From af8af55bd969af448ebe16ed0ad3d5f4f75a477c Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 12 Jul 2014 08:25:49 +0200 Subject: [PATCH] - cmn locale is supported now - cleaned up scrollkeeper leftovers - added gtk3 and python bconds --- pluma.spec | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/pluma.spec b/pluma.spec index 6323380..6919f4b 100644 --- a/pluma.spec +++ b/pluma.spec @@ -1,3 +1,11 @@ +# +# Conditional build: +%bcond_with gtk3 # use GTK+ 3.x instead of 2.x (disables python) +%bcond_without python # Python support + +%if %{with gtk3} +%undefine with_python +%endif Summary: Pluma - MATE Text Editor Summary(pl.UTF-8): Pluma - edytor tekstu dla środowiska MATE Name: pluma @@ -14,35 +22,44 @@ BuildRequires: automake >= 1:1.10 BuildRequires: docbook-dtd412-xml BuildRequires: enchant-devel >= 1.2.0 BuildRequires: gettext-devel >= 0.17 -BuildRequires: glib2-devel >= 1:2.26.0 -BuildRequires: gtk+2-devel >= 2:2.20 +BuildRequires: glib2-devel >= 1:2.32.0 +%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.20} +%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} BuildRequires: gtk-doc >= 1.0 -BuildRequires: gtksourceview2-devel >= 2.9.7 +%{!?with_gtk3:BuildRequires: gtksourceview2-devel >= 2.9.7} +%{?with_gtk3:BuildRequires: gtksourceview3-devel >= 3.0} BuildRequires: intltool >= 0.40.0 BuildRequires: iso-codes >= 0.35 +BuildRequires: libsoup-devel >= 2.4 BuildRequires: libtool >= 2:2.2.6 BuildRequires: libxml2-devel >= 1:2.5.0 BuildRequires: mate-common BuildRequires: pkgconfig +%if %{with python} BuildRequires: python-devel >= 1:2.5 BuildRequires: python-gtksourceview2-devel >= 2.9.2 BuildRequires: python-pygobject-devel >= 2.15.4 BuildRequires: python-pygtk-devel >= 2:2.12.0 +%endif BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(find_lang) >= 1.36 BuildRequires: xorg-lib-libSM-devel >= 1.0.0 BuildRequires: xorg-lib-libX11-devel BuildRequires: yelp-tools -Requires(post,postun): glib2 >= 1:2.26.0 +Requires(post,postun): glib2 >= 1:2.32.0 Requires: enchant >= 1.2.0 -Requires: glib2 >= 1:2.26.0 -Requires: gtk+2 >= 2:2.20 -Requires: gtksourceview2 >= 2.9.7 +Requires: glib2 >= 1:2.32.0 +%{!?with_gtk3:Requires: gtk+2 >= 2:2.20} +%{?with_gtk3:Requires: gtk+3 >= 3.0.0} +%{!?with_gtk3:Requires: gtksourceview2 >= 2.9.7} +%{?with_gtk3:Requires: gtksourceview3 >= 3.0} Requires: iso-codes >= 0.35 Requires: libxml2 >= 1:2.5.0 +%if %{with python} Requires: python-gtksourceview2 >= 2.9.2 Requires: python-pygobject >= 2.15.4 Requires: python-pygtk-gtk >= 2:2.12.0 +%endif Requires: xorg-lib-libSM >= 1.0.0 Obsoletes: mate-text-editor BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -61,9 +78,11 @@ Summary: Header files for Pluma plugins development Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia wtyczek edytora Pluma Group: X11/Development/Libraries # doesn't require base -Requires: glib2-devel >= 1:2.26.0 -Requires: gtk+2-devel >= 2:2.20 -Requires: gtksourceview2-devel >= 2.9.7 +Requires: glib2-devel >= 1:2.32.0 +%{!?with_gtk3:Requires: gtk+2-devel >= 2:2.20} +%{?with_gtk3:Requires: gtk+3-devel >= 3.0.0} +%{!?with_gtk3:Requires: gtksourceview2-devel >= 2.9.7} +%{?with_gtk3:Requires: gtksourceview3-devel >= 3.0} %description devel Header files for Pluma plugins development. @@ -98,8 +117,10 @@ mate-doc-common --copy %{__autoheader} %{__automake} %configure \ + %{!?with_python:--disable-python} \ --disable-schemas-compile \ --disable-silent-rules \ + %{?with_gtk3:--with-gtk=3.0} \ --with-html-dir=%{_gtkdocdir} %{__make} @@ -114,9 +135,7 @@ rm -rf $RPM_BUILD_ROOT # mate < 1.5 did not exist in PLD, avoid dependency on mate-conf %{__rm} $RPM_BUILD_ROOT%{_datadir}/MateConf/gsettings/pluma.convert -%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/cmn - -%find_lang pluma --with-mate --with-omf +%find_lang pluma --with-mate %clean rm -rf $RPM_BUILD_ROOT @@ -135,7 +154,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/pluma/pluma-bugreport.sh %dir %{_libdir}/pluma/plugin-loaders %attr(755,root,root) %{_libdir}/pluma/plugin-loaders/libcloader.so +%if %{with python} %attr(755,root,root) %{_libdir}/pluma/plugin-loaders/libpythonloader.so +%endif %dir %{_libdir}/pluma/plugins # C plugins %attr(755,root,root) %{_libdir}/pluma/plugins/libchangecase.so @@ -154,6 +175,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pluma/plugins/taglist.pluma-plugin %attr(755,root,root) %{_libdir}/pluma/plugins/libtime.so %{_libdir}/pluma/plugins/time.pluma-plugin +%if %{with python} # Python plugins %{_libdir}/pluma/plugins/externaltools %{_libdir}/pluma/plugins/externaltools.pluma-plugin @@ -163,6 +185,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pluma/plugins/quickopen.pluma-plugin %{_libdir}/pluma/plugins/snippets %{_libdir}/pluma/plugins/snippets.pluma-plugin +%endif %{_datadir}/glib-2.0/schemas/org.mate.pluma.gschema.xml %{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.filebrowser.gschema.xml %{_datadir}/glib-2.0/schemas/org.mate.pluma.plugins.time.gschema.xml -- 2.44.0