A new user interface for you! Read more...

File codeblocks.spec of Package codeblocks

#
# spec file for package codeblocks
#
# 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/
#


%define soname 0
%define _use_internal_dependency_generator 0
%define __find_requires %{wx_requires}
Name:           codeblocks
Version:        16.01
Release:        0
Summary:        Open source, cross platform, free C++ IDE
License:        GPL-3.0
Group:          Development/Tools/IDE
Url:            http://www.codeblocks.org/
Source0:        %{name}-%{version}.tar.xz
Source1:        codeblocks-rpmlintrc
BuildRequires:  autoconf
BuildRequires:  boost-devel
BuildRequires:  fdupes
BuildRequires:  findutils
BuildRequires:  gamin-devel
BuildRequires:  gcc-c++
BuildRequires:  hunspell-devel
BuildRequires:  libbz2-devel
BuildRequires:  libtool
BuildRequires:  pcre-devel
BuildRequires:  wxGTK-devel >= 2.8.12
BuildRequires:  wxWidgets-wxcontainer-devel
BuildRequires:  zip
%if 0%{?suse_version} < 1310
BuildRequires:  xz
%endif
Requires(pre):  desktop-file-utils
Requires(pre):  shared-mime-info
Recommends:     %{name}-contrib = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Code::Blocks is a free C++ IDE built to meet the most demanding needs of its users.
It is designed to be very extensible and fully configurable.

Finally, an IDE with all the features you need, having a consistent look, feel and operation across platforms.

Built around a plugin framework, Code::Blocks can be extended with plugins.
Any kind of functionality can be added by installing/coding a plugin.
For instance, compiling and debugging functionality is already provided by plugins!

We hope you enjoy using Code::Blocks!
The Code::Blocks Team

%package contrib
Summary:        Code::Blocks contrib plugins
Group:          Development/Tools/IDE
Requires:       codeblocks = %{version}
Requires:       gamin-server

%description contrib
All the other additional Code::Blocks plugins.

%package devel
Summary:        Code::Blocks SDK
Group:          Development/Tools/IDE
Requires:       codeblocks = %{version}
Requires:       libcodeblocks%{soname} = %{version}
Requires:       libwxruntime%{soname} = %{version}

%description devel
Code::Blocks SDK to develop your own plugins.

%package -n libcodeblocks%{soname}
Summary:        Code::Blocks shared Library
Group:          System/Libraries

%description -n libcodeblocks%{soname}
This package contains the Code::Blocks shared library.

%package -n libwxruntime%{soname}
Summary:        Shared library wxSmith
Group:          System/Libraries
Provides:       libwxchartctrl0
Provides:       libwxcustombutton0
Provides:       libwxflatnotebook0
Provides:       libwxsmithlib0
Provides:       libwxmathplot0

%description -n libwxruntime%{soname}
This package contains the shared libraries for wxSmith a Code::Blocks plugin for RAD GUI editing.
wxSmith is included in the codeblocks-contrib package.

%prep
%setup -q -n %{name}-%{version}.release
%if 0%{?suse_version} > 1320
./bootstrap
%endif

%build
%configure --with-contrib-plugins=all --disable-silent-rules
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes    %{buildroot}%{_datadir}/%{name}
%fdupes -s %{buildroot}%{_libdir}

%post
/sbin/ldconfig
%{_bindir}/update-mime-database %{_datadir}/mime >/dev/null
%{_bindir}/update-desktop-database

%postun
/sbin/ldconfig
%{_bindir}/update-mime-database %{_datadir}/mime >/dev/null
%{_bindir}/update-desktop-database

%post contrib -p /sbin/ldconfig

%post -n libcodeblocks%{soname} -p /sbin/ldconfig

%post -n libwxruntime%{soname} -p /sbin/ldconfig

%postun contrib -p /sbin/ldconfig

%postun -n libcodeblocks%{soname} -p /sbin/ldconfig

%postun -n libwxruntime%{soname} -p /sbin/ldconfig

%define wxSmithLibDir %{_libdir}/codeblocks/wxContribItems

%files
%defattr(-,root,root)
%doc AUTHORS BUGS ChangeLog COMPILERS COPYING README TODO
%{_bindir}/cb_console_runner
%{_bindir}/codeblocks
%dir %{_libdir}/codeblocks
%dir %{_libdir}/codeblocks/plugins
%{_libdir}/codeblocks/plugins/libastyle.so
%{_libdir}/codeblocks/plugins/libautosave.so
%{_libdir}/codeblocks/plugins/libclasswizard.so
%{_libdir}/codeblocks/plugins/libcodecompletion.so
%{_libdir}/codeblocks/plugins/libcompiler.so
%{_libdir}/codeblocks/plugins/libcopystrings.so
%{_libdir}/codeblocks/plugins/libdebugger.so
%{_libdir}/codeblocks/plugins/libdefaultmimehandler.so
%{_libdir}/codeblocks/plugins/liboccurrenceshighlighting.so
%{_libdir}/codeblocks/plugins/libopenfileslist.so
%{_libdir}/codeblocks/plugins/libprojectsimporter.so
%{_libdir}/codeblocks/plugins/libscriptedwizard.so
%{_libdir}/codeblocks/plugins/libtodo.so
%{_libdir}/codeblocks/plugins/libEditorConfig.so
%{_libdir}/codeblocks/plugins/libProjectOptionsManipulator.so
%{_datadir}/codeblocks/compilers
%{_datadir}/applications/codeblocks.desktop
%dir %{_datadir}/codeblocks
%{_datadir}/codeblocks/astyle.zip
%{_datadir}/codeblocks/autosave.zip
%{_datadir}/codeblocks/classwizard.zip
%{_datadir}/codeblocks/codecompletion.zip
%{_datadir}/codeblocks/compiler.zip
%{_datadir}/codeblocks/copystrings.zip
%{_datadir}/codeblocks/debugger.zip
%{_datadir}/codeblocks/defaultmimehandler.zip
%{_datadir}/codeblocks/manager_resources.zip
%{_datadir}/codeblocks/occurrenceshighlighting.zip
%{_datadir}/codeblocks/openfileslist.zip
%{_datadir}/codeblocks/projectsimporter.zip
%{_datadir}/codeblocks/resources.zip
%{_datadir}/codeblocks/scriptedwizard.zip
%{_datadir}/codeblocks/start_here.zip
%{_datadir}/codeblocks/tips.txt
%{_datadir}/codeblocks/todo.zip
%{_datadir}/codeblocks/EditorConfig.zip
%{_datadir}/codeblocks/ProjectOptionsManipulator.zip
%{_datadir}/codeblocks/icons
%{_datadir}/codeblocks/images
%exclude %{_datadir}/codeblocks/images/ThreadSearch
%exclude %{_datadir}/codeblocks/images/codesnippets
%exclude %{_datadir}/codeblocks/images/wxsmith
%{_datadir}/codeblocks/lexers
%{_datadir}/codeblocks/scripts
%{_datadir}/codeblocks/templates
%{_datadir}/icons/hicolor/48x48/mimetypes/application-x-codeblocks*
%{_mandir}/man1/cb_console_runner.1.*
%{_mandir}/man1/codeblocks.1.*
%{_datadir}/mime/packages/codeblocks.xml
%{_datadir}/pixmaps/codeblocks.png

%files contrib
%defattr(-,root,root)
%{_bindir}/cb_share_config
%{_libdir}/libwxsmithlib.so
%dir %{_libdir}/codeblocks
%dir %{_libdir}/codeblocks/plugins
%{_libdir}/codeblocks/plugins/libAutoVersioning.so
%{_libdir}/codeblocks/plugins/libBrowseTracker.so
%{_libdir}/codeblocks/plugins/libCccc.so
%{_libdir}/codeblocks/plugins/libCppCheck.so
%{_libdir}/codeblocks/plugins/libHexEditor.so
%{_libdir}/codeblocks/plugins/libIncrementalSearch.so
%{_libdir}/codeblocks/plugins/libMouseSap.so
%{_libdir}/codeblocks/plugins/libProfiler.so
%{_libdir}/codeblocks/plugins/libRegExTestbed.so
%{_libdir}/codeblocks/plugins/libSymTab.so
%{_libdir}/codeblocks/plugins/libThreadSearch.so
%{_libdir}/codeblocks/plugins/libValgrind.so
%{_libdir}/codeblocks/plugins/libbyogames.so
%{_libdir}/codeblocks/plugins/libcb_koders.so
%{_libdir}/codeblocks/plugins/libcodesnippets.so
%{_libdir}/codeblocks/plugins/libcodestat.so
%{_libdir}/codeblocks/plugins/libdragscroll.so
%{_libdir}/codeblocks/plugins/libenvvars.so
%{_libdir}/codeblocks/plugins/libexporter.so
%{_libdir}/codeblocks/plugins/libheaderfixup.so
%{_libdir}/codeblocks/plugins/libhelp_plugin.so
%{_libdir}/codeblocks/plugins/libkeybinder.so
%{_libdir}/codeblocks/plugins/liblib_finder.so
%{_libdir}/codeblocks/plugins/libwxsmith.so
%{_libdir}/codeblocks/plugins/libwxsmithcontribitems.so
%{_libdir}/codeblocks/plugins/libCscope.so
%{_libdir}/codeblocks/plugins/libDoxyBlocks.so
%{_libdir}/codeblocks/plugins/libEditorTweaks.so
%{_libdir}/codeblocks/plugins/libFileManager.so
%{_libdir}/codeblocks/plugins/libNassiShneiderman.so
%{_libdir}/codeblocks/plugins/libReopenEditor.so
%{_libdir}/codeblocks/plugins/libSpellChecker.so
%{_libdir}/codeblocks/plugins/libToolsPlus.so
%{_libdir}/codeblocks/plugins/libabbreviations.so
%{_libdir}/codeblocks/plugins/libSmartIndentCpp.so
%{_libdir}/codeblocks/plugins/libSmartIndentFortran.so
%{_libdir}/codeblocks/plugins/libSmartIndentHDL.so
%{_libdir}/codeblocks/plugins/libSmartIndentLua.so
%{_libdir}/codeblocks/plugins/libSmartIndentPascal.so
%{_libdir}/codeblocks/plugins/libSmartIndentPython.so
%{_libdir}/codeblocks/plugins/libSmartIndentXML.so
%dir %{_datadir}/codeblocks
%{_datadir}/codeblocks/AutoVersioning.zip
%{_datadir}/codeblocks/BrowseTracker.zip
%{_datadir}/codeblocks/Cccc.zip
%{_datadir}/codeblocks/CppCheck.zip
%{_datadir}/codeblocks/HexEditor.zip
%{_datadir}/codeblocks/IncrementalSearch.zip
%{_datadir}/codeblocks/MouseSap.zip
%{_datadir}/codeblocks/Profiler.zip
%{_datadir}/codeblocks/RegExTestbed.zip
%{_datadir}/codeblocks/SymTab.zip
%{_datadir}/codeblocks/ThreadSearch.zip
%{_datadir}/codeblocks/Valgrind.zip
%{_datadir}/codeblocks/byogames.zip
%{_datadir}/codeblocks/cb_koders.zip
%{_datadir}/codeblocks/codesnippets.zip
%{_datadir}/codeblocks/codestat.zip
%{_datadir}/codeblocks/dragscroll.zip
%{_datadir}/codeblocks/envvars.zip
%{_datadir}/codeblocks/exporter.zip
%{_datadir}/codeblocks/headerfixup.zip
%{_datadir}/codeblocks/help_plugin.zip
%{_datadir}/codeblocks/images/ThreadSearch
%{_datadir}/codeblocks/images/codesnippets
%{_datadir}/codeblocks/images/wxsmith
%{_datadir}/codeblocks/keybinder.zip
%{_datadir}/codeblocks/lib_finder
%{_datadir}/codeblocks/lib_finder.zip
%{_datadir}/codeblocks/wxsmith.zip
%{_datadir}/codeblocks/wxsmithcontribitems.zip
%{_datadir}/codeblocks/Cscope.zip
%{_datadir}/codeblocks/DoxyBlocks.zip
%{_datadir}/codeblocks/EditorTweaks.zip
%{_datadir}/codeblocks/FileManager.zip
%{_datadir}/codeblocks/NassiShneiderman.zip
%{_datadir}/codeblocks/ReopenEditor.zip
%{_datadir}/codeblocks/SpellChecker.zip
%{_datadir}/codeblocks/SpellChecker
%{_datadir}/codeblocks/ToolsPlus.zip
%{_datadir}/codeblocks/abbreviations.zip
%{_datadir}/codeblocks/SmartIndentCpp.zip
%{_datadir}/codeblocks/SmartIndentFortran.zip
%{_datadir}/codeblocks/SmartIndentHDL.zip
%{_datadir}/codeblocks/SmartIndentLua.zip
%{_datadir}/codeblocks/SmartIndentPascal.zip
%{_datadir}/codeblocks/SmartIndentPython.zip
%{_datadir}/codeblocks/SmartIndentXML.zip
%{_mandir}/man1/cb_share_config.1.*
%{_mandir}/man1/codesnippets.1.*
%{_libdir}/codeblocks/plugins/libwxSmithAui.so
%{_datadir}/codeblocks/wxSmithAui.zip

%files devel
%defattr(-,root,root)
%{_includedir}/codeblocks
%{_includedir}/wxsmith
%{_libdir}/libcodeblocks.so
%{wxSmithLibDir}/libwxchartctrl.so
%{wxSmithLibDir}/libwxcustombutton.so
%{wxSmithLibDir}/libwxflatnotebook.so
%{wxSmithLibDir}/libwximagepanel.so
%{wxSmithLibDir}/libwxkwic.so
%{wxSmithLibDir}/libwxled.so
%{wxSmithLibDir}/libwxspeedbutton.so
%{wxSmithLibDir}/libwxtreelist.so
%{wxSmithLibDir}/libwxmathplot.so
%{_libdir}/pkgconfig/cb_wxKWIC.pc
%{_libdir}/pkgconfig/cb_wxchartctrl.pc
%{_libdir}/pkgconfig/cb_wxcontrib.pc
%{_libdir}/pkgconfig/cb_wxcustombutton.pc
%{_libdir}/pkgconfig/cb_wxflatnotebook.pc
%{_libdir}/pkgconfig/cb_wximagepanel.pc
%{_libdir}/pkgconfig/cb_wxled.pc
%{_libdir}/pkgconfig/cb_wxspeedbutton.pc
%{_libdir}/pkgconfig/cb_wxtreelist.pc
%{_libdir}/pkgconfig/codeblocks.pc
%{_libdir}/pkgconfig/wxsmith.pc
%{_libdir}/pkgconfig/wxsmith-contrib.pc
%{_libdir}/pkgconfig/wxsmithaui.pc
%{_libdir}/pkgconfig/cb_wxmathplot.pc

%files -n libcodeblocks%{soname}
%defattr(-,root,root)
%{_libdir}/libcodeblocks.so.%{soname}*

%files -n libwxruntime%{soname}
%defattr(-,root,root)
%{_libdir}/libwxsmithlib.so.%{soname}*
%dir %{wxSmithLibDir}
%{wxSmithLibDir}/libwxchartctrl.so.%{soname}*
%{wxSmithLibDir}/libwxcustombutton.so.%{soname}*
%{wxSmithLibDir}/libwxflatnotebook.so.%{soname}*
%{wxSmithLibDir}/libwximagepanel.so.%{soname}*
%{wxSmithLibDir}/libwxkwic.so.%{soname}*
%{wxSmithLibDir}/libwxled.so.%{soname}*
%{wxSmithLibDir}/libwxspeedbutton.so.%{soname}*
%{wxSmithLibDir}/libwxtreelist.so.%{soname}*
%{wxSmithLibDir}/libwxmathplot.so.%{soname}*

%changelog