File gnome-builder.spec of Package gnome-builder

#
# spec file for package gnome-builder
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           gnome-builder
Version:        3.20.4
Release:        0
Summary:        GNOME Builder - IDE
License:        GPL-3.0+ and GPL-2.0+ and LGPL-3.0+ and LGPL-2.1+ and CC-BY-SA-3.0
Group:          Development/Tools/Other
Url:            https://wiki.gnome.org/Apps/Builder
Source:         http://download.gnome.org/sources/gnome-builder/3.20/%{name}-%{version}.tar.xz
Source99:       %{name}-rpmlintrc
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  gtk-doc
BuildRequires:  intltool >= 0.50.0
BuildRequires:  itstool
BuildRequires:  llvm-clang-devel
BuildRequires:  pkg-config
BuildRequires:  python3-devel >= 3.2.3
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gio-2.0) >= 2.47.92
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.45.8
BuildRequires:  pkgconfig(gjs-1.0) >= 1.42.0
BuildRequires:  pkgconfig(gjs-internals-1.0) >= 1.42.0
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.47.92
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.20.0
BuildRequires:  pkgconfig(gtksourceview-3.0) >= 3.20.0
BuildRequires:  pkgconfig(libdevhelp-3.0)
BuildRequires:  pkgconfig(libgit2-glib-1.0) >= 0.23.7
BuildRequires:  pkgconfig(libpeas-1.0) >= 1.18.0
BuildRequires:  pkgconfig(libvala-0.32)
BuildRequires:  pkgconfig(pangoft2) >= 1.38.0
BuildRequires:  pkgconfig(pygobject-3.0) >= 3.19.3
BuildRequires:  pkgconfig(vapigen) >= 0.30.0.55
BuildRequires:  pkgconfig(vte-2.91) >= 0.40.2
BuildRequires:  pkgconfig(webkit2gtk-4.0) >= 2.12.0
Requires:       autoconf
Requires:       automake
Requires:       libtool
%if 0%{?suse_version} > 1320
Requires:       python3-gobject-Gdk
%endif
Recommends:     %{name}-lang
Recommends:     gnome-builder-plugin-clang = %{version}
Recommends:     gnome-builder-plugin-ctags = %{version}
Recommends:     gnome-builder-plugin-devhelp = %{version}
Recommends:     gnome-builder-plugin-fpaste = %{version}
Recommends:     gnome-builder-plugin-gettext = %{version}
Recommends:     gnome-builder-plugin-gnome-code-assistance = %{version}
Recommends:     gnome-builder-plugin-html-completion = %{version}
Recommends:     gnome-builder-plugin-jedi = %{version}
Recommends:     gnome-builder-plugin-jhbuild = %{version}
Recommends:     gnome-builder-plugin-mingw = %{version}
Recommends:     gnome-builder-plugin-symbol-tree = %{version}
Recommends:     gnome-builder-plugin-sysmon = %{version}
Recommends:     gnome-builder-plugin-todo = %{version}
Recommends:     gnome-builder-plugin-xml-pack = %{version}
Recommends:     gnome-builder-plugin-vala-pack = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Builder is a new IDE for GNOME that is focused on bringing the power of our platform to more developers than ever before.

#==========================================================
%package plugin-clang
Summary:        Clang plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       llvm-clang
Supplements:    packageand(%{name}:llvm-clang)

%description plugin-clang
This package provides the clang plugin for %{name}.

%files plugin-clang
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/clang.plugin
%{_libdir}/%{name}/plugins/libclang-plugin.so
#==========================================================

#==========================================================
%package plugin-ctags
Summary:        Ctags plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       ctags
Supplements:    packageand(%{name}:ctags)

%description plugin-ctags
This package provides the ctags plugin for %{name} to enable code completion assistance in C/C++ using ctags.

%files plugin-ctags
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/ctags.plugin
%{_libdir}/%{name}/plugins/libctags-plugin.so
#==========================================================

#==========================================================
%package plugin-devhelp
Summary:        Devhelp plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       devhelp
Supplements:    packageand(%{name}:devhelp)

%description plugin-devhelp
This package provides the devhelp plugin for %{name}.

%files plugin-devhelp
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/devhelp.plugin
%{_libdir}/%{name}/plugins/libdevhelp-plugin.so
#==========================================================

#==========================================================
%package plugin-fpaste
Summary:        Fpaste plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-fpaste
This package provides the fpaste plugin for %{name} that allows one to paste selected code to Fedora Paste.

%files plugin-fpaste
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/fpaste.plugin
%dir %{_libdir}/%{name}/plugins/fpaste_plugin/
%dir %{_datadir}/%{name}/plugins/fpaste_plugin
%{_datadir}/%{name}/plugins/fpaste_plugin/
#==========================================================

#==========================================================
%package plugin-gettext
Summary:        Gettext plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       gettext
Supplements:    packageand(%{name}:gettext)

%description plugin-gettext
This package provides the gettext plugin for %{name}.

%files plugin-gettext
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/gettext.plugin
%{_libdir}/%{name}/plugins/libgettext-plugin.so
#==========================================================

#==========================================================
%package plugin-gnome-code-assistance
Summary:        Gnome-code-assistance plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       gnome-code-assistance
Supplements:    packageand(%{name}:gnome-code-assistance)

%description plugin-gnome-code-assistance
This package provides the gnome-code-assistance plugin for %{name}.

%post plugin-gnome-code-assistance
%{glib2_gsettings_schema_post}

%postun plugin-gnome-code-assistance
%{glib2_gsettings_schema_postun}

%files plugin-gnome-code-assistance
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/gnome-code-assistance.plugin
%{_libdir}/%{name}/plugins/libgnome-code-assistance-plugin.so
%{_datadir}/glib-2.0/schemas/org.gnome.builder.gnome-code-assistance.gschema.xml
#==========================================================

#==========================================================
%package plugin-html-completion
Summary:        HTML-completion plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-html-completion
This package provides the html-completion plugin for %{name}.

%files plugin-html-completion
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/html-completion.plugin
%{_libdir}/%{name}/plugins/libhtml-completion-plugin.so
#==========================================================

#==========================================================
%package plugin-jedi
Summary:        Jedi plugin for python3 code completion in %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       python3-jedi
Requires:       python3-lxml
Supplements:    packageand(%{name}:python3-jedi)

%description plugin-jedi
This package provides the jedi plugin for code completion assistance in Python3 inside %{name}'s editor.

%files plugin-jedi
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/jedi.plugin
%{_libdir}/%{name}/plugins/jedi_plugin.py
#==========================================================

#==========================================================
%package plugin-jhbuild
Summary:        Jhbuild plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       jhbuild
Supplements:    packageand(%{name}:jhbuild)

%description plugin-jhbuild
This package provides the jhbuild plugin for %{name}.

%files plugin-jhbuild
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/jhbuild.plugin
%{_libdir}/%{name}/plugins/jhbuild_plugin.py
#==========================================================

#==========================================================
%package plugin-mingw
Summary:        Mingw plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-mingw
This package provides the mingw plugin for %{name} for cross-compilation support using mingw.

%files plugin-mingw
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/mingw.plugin
%{_libdir}/%{name}/plugins/libmingw-plugin.so
#==========================================================

#==========================================================
%package plugin-symbol-tree
Summary:        Symbol-tree plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-symbol-tree
This package provides the symbol-tree plugin for %{name} to show the symbol tree for the currently focused document.

%files plugin-symbol-tree
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/symbol-tree.plugin
%{_libdir}/%{name}/plugins/libsymbol-tree.so
#==========================================================

#==========================================================
%package plugin-sysmon
Summary:        Sysmon plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-sysmon
This package provides the system monitor plugin for %{name}.

%files plugin-sysmon
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/sysmon.plugin
%{_libdir}/%{name}/plugins/libsysmon.so
#==========================================================

#==========================================================
%package plugin-todo
Summary:        Todo plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-todo
This package provides the todo plugin for %{name} that enables the extraction of TODO items from projects.

%files plugin-todo
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/todo.plugin
%dir %{_libdir}/%{name}/plugins/todo_plugin
%{_libdir}/%{name}/plugins/todo_plugin/
#==========================================================

#==========================================================
%package plugin-vala-pack
Summary:        Vala-pack plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}
Requires:       vala
Supplements:    packageand(%{name}:vala)

%description plugin-vala-pack
This package provides the vala-pack plugin for %{name}.

%files plugin-vala-pack
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/vala-pack.plugin
%{_libdir}/%{name}/plugins/libvala-pack-plugin.so
#==========================================================

#==========================================================
%package plugin-xml-pack
Summary:        XML-pack plugin for %{name}
Group:          Development/Tools/IDE
Requires:       %{name} = %{version}

%description plugin-xml-pack
This package provides the xml-pack plugin for %{name}.

%files plugin-xml-pack
%defattr(-,root,root)
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/xml-pack.plugin
%{_libdir}/%{name}/plugins/libxml-pack-plugin.so
#==========================================================

%lang_package

%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
%suse_update_desktop_file org.gnome.Builder IDE
# We package those files using regular %%doc method
rm -rf %{buildroot}%{_datadir}/doc/
%find_lang %{name}

# [RPMLINT] REMOVE __pycache__ DIR CONTAINING AN UNNECESSARY PYTHON OBJECT FILE W/O CORRESPONDING SOURCE CODE
rm -fr %{buildroot}%{python3_sitearch}/gi/overrides/__pycache__/Ide.cpython-35.opt-1.pyc

%post
%{glib2_gsettings_schema_post}
%icon_theme_cache_post
%desktop_database_post

%postun
%{glib2_gsettings_schema_postun}
%icon_theme_cache_postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc README COPYING
%{_bindir}/%{name}
%{_bindir}/ide
%{_bindir}/gnome-builder-worker
%{_libdir}/%{name}/
# EXCLUDE THE OPTIONAL PLUGINS FROM THE MAIN PACKAGE
%exclude %{_libdir}/%{name}/plugins/clang.plugin
%exclude %{_libdir}/%{name}/plugins/libclang-plugin.so
%exclude %{_libdir}/%{name}/plugins/ctags.plugin
%exclude %{_libdir}/%{name}/plugins/libctags-plugin.so
%exclude %{_libdir}/%{name}/plugins/devhelp.plugin
%exclude %{_libdir}/%{name}/plugins/libdevhelp-plugin.so
%exclude %{_libdir}/%{name}/plugins/fpaste.plugin
%exclude %{_libdir}/%{name}/plugins/fpaste_plugin
%exclude %{_datadir}/%{name}/plugins/fpaste_plugin
%exclude %{_libdir}/%{name}/plugins/gettext.plugin
%exclude %{_libdir}/%{name}/plugins/libgettext-plugin.so
%exclude %{_libdir}/%{name}/plugins/gnome-code-assistance.plugin
%exclude %{_libdir}/%{name}/plugins/libgnome-code-assistance-plugin.so
%exclude %{_libdir}/%{name}/plugins/html-completion.plugin
%exclude %{_libdir}/%{name}/plugins/libhtml-completion-plugin.so
%exclude %{_libdir}/%{name}/plugins/jedi.plugin
%exclude %{_libdir}/%{name}/plugins/jedi_plugin.py
%exclude %{_libdir}/%{name}/plugins/jhbuild.plugin
%exclude %{_libdir}/%{name}/plugins/jhbuild_plugin.py
%exclude %{_libdir}/%{name}/plugins/mingw.plugin
%exclude %{_libdir}/%{name}/plugins/libmingw-plugin.so
%exclude %{_libdir}/%{name}/plugins/symbol-tree.plugin
%exclude %{_libdir}/%{name}/plugins/libsymbol-tree.so
%exclude %{_libdir}/%{name}/plugins/sysmon.plugin
%exclude %{_libdir}/%{name}/plugins/libsysmon.so
%exclude %{_libdir}/%{name}/plugins/todo.plugin
%exclude %{_libdir}/%{name}/plugins/todo_plugin/
%exclude %{_libdir}/%{name}/plugins/libtodo-plugin.so
%exclude %{_libdir}/%{name}/plugins/vala-pack.plugin
%exclude %{_libdir}/%{name}/plugins/libvala-pack-plugin.so
%exclude %{_libdir}/%{name}/plugins/xml-pack.plugin
%exclude %{_libdir}/%{name}/plugins/libxml-pack-plugin.so
%{_libexecdir}/%{name}/
%{_datadir}/appdata/org.gnome.Builder.appdata.xml
%{_datadir}/applications/org.gnome.Builder.desktop
%{_datadir}/dbus-1/services/org.gnome.Builder.service
%{_datadir}/%{name}/
%{_datadir}/glib-2.0/schemas/org.gnome.builder.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.editor.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.editor.language.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.extension-type.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.code-insight.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.project-tree.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.workbench.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.build.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.plugin.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.builder.terminal.gschema.xml
%{_datadir}/gtk-doc/html/libide/
%{_datadir}/gtksourceview-3.0/styles/builder-dark.xml
%{_datadir}/gtksourceview-3.0/styles/builder.xml
%{_datadir}/icons/hicolor/
%{_includedir}/%{name}-%{version}/
%{python3_sitearch}/gi/overrides/*

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog