LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File codeblocks-unstable.spec of Package codeblocks (Project devel:tools:ide)

# norootforbuild

%define soname 0

# In codeblocks-unstable.spec, change this to codeblocks-unstable. This is the only change.
Name:           codeblocks-unstable
# Sync MainVersion with _service.
%define MainVersion	12.11
# Version is updated by set_service automatically in codeblocks-unstable.
Version:        12.11
Release:        1.0
License:        GNU GPL v3
Group:          Development/Tools/IDE
URL:            http://www.codeblocks.org/
Provides:       codeblocks = %{version}
Source0:        %{name}-%{version}.tar.bz2
Source1:        codeblocks-rpmlintrc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  boost-devel
BuildRequires:  findutils
BuildRequires:  gamin-devel
BuildRequires:  gcc-c++
BuildRequires:  hunspell-devel
BuildRequires:  pcre-devel
BuildRequires:  subversion
BuildRequires:  zip
BuildRequires:  autoconf libtool

%if 0%{?suse_version}
BuildRequires:	fdupes
BuildRequires:  update-desktop-files
%if 0%{?suse_version} < 1140
BuildRequires:  wxGTK-devel
%else
BuildRequires:  wxWidgets-wxcontainer-devel
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
%endif

%if 0%{?fedora_version}
BuildRequires:	wxGTK-devel
%endif

%if 0%{?mandriva_version}
%ifarch i586
BuildRequires:	libwxgtku2.8-devel
%endif
%ifarch x86_64
BuildRequires:	lib64wxgtku2.8-devel
%endif
%endif

%if !0%{?fedora_version}
Recommends:	codeblocks-contrib = %{version}
%endif

PreReq:         desktop-file-utils shared-mime-info
Summary:        Open source, cross platform, free C++ IDE

%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
Group:          Development/Tools/IDE
Requires:       codeblocks = %{version} libwxruntime = %{version}
Summary:        Code::Blocks contrib plugins

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

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

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

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

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

%package -n libwxruntime
Group:          System/Libraries
Summary:	wxSmith shared Library
Provides:	libwxchartctrl0 libwxflatnotebook0 libwxsmithlib0 libwxcustombutton0

%description -n libwxruntime
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 -c -n codeblocks
d=`echo codeblocks-*`
mv "$d"/* .
rm -f "$d"/.??*
rmdir "$d"
sed -i "s/\r//" src/sdk/resources/lexers/lexer_bash.sample
# Fix Revision setter
if [ -r update_revision.sh ] ; then
  REV="`echo %{version} | sed 's/^%{MainVersion}.//'`"
  LCD="`stat -c %y %{SOURCE0} | sed 's/ .*$//'`"
  sed -i 's/^\s*REV=0\s*$/\tREV='"$REV"'/;s/^\s*LCD=""\s*$/\tLCD="'"$LCD"'"/;' update_revision.sh
  sh ./update_revision.sh
fi
%if "%{name}" != "codeblocks-unstable"
autoreconf -fi
%endif

%build
./bootstrap
%configure --with-contrib-plugins=all
%__make %{?_smp_mflags}

%install
%__make install DESTDIR=%{buildroot}
find %{buildroot} -name "*.la" -delete

%if 0%{?suse_version}
%suse_update_desktop_file codeblocks
%fdupes %{buildroot}%{_datadir}/codeblocks
%endif

%clean
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}

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

%postun contrib -p /sbin/ldconfig

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

%postun -n libwxruntime -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/libopenfileslist.so
%{_libdir}/codeblocks/plugins/libprojectsimporter.so
%{_libdir}/codeblocks/plugins/libscriptedwizard.so
%{_libdir}/codeblocks/plugins/libtodo.so
%{_libdir}/codeblocks/plugins/libEditorConfig.so
%if "%{name}" == "codeblocks-unstable"
%dir %{_datadir}/codeblocks/compilers
%{_datadir}/codeblocks/compilers
%endif
%{_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/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/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
%{_bindir}/codesnippets
%{_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
%{_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


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

%files -n libwxruntime
%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}*


%changelog