Blob Blame History Raw
Name:		codeblocks
Version:	10.05
Release:	9%{?dist}
Summary:	An open source, cross platform, free C++ IDE
Group:		Development/Tools
License:	GPLv3+
URL:		http://www.codeblocks.org/
Source0:	http://download.berlios.de/%{name}/%{name}-%{version}-src.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	libtool
BuildRequires:	wxGTK-devel >= 2.8.0
BuildRequires:	zlib-devel
BuildRequires:	bzip2-devel
BuildRequires:	tinyxml-devel
BuildRequires:	squirrel-devel
BuildRequires:	zip
BuildRequires:	dos2unix
BuildRequires:	desktop-file-utils
Requires:	%{name}-libs = %{version}-%{release}
Requires:	shared-mime-info
Requires:	xterm
# use system tinyxml lib
Patch1:		%{name}-tinyxml.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=565198 (fully fixed in svn rev 6330)
Patch2:		%{name}-dso.patch
# update for tinyxml 2.6
Patch3:		%{name}-tinyxml-26.patch
# D support - svn revisions 6553-6556
Patch4:         %{name}-10.05-D.patch
# use system squirrel library
Patch5:		%{name}-squirrel.patch
# fix build with gcc 4.7
Patch6:		%{name}-gcc47.patch

%define		pkgdatadir	%{_datadir}/%{name}
%define		pkglibdir	%{_libdir}/%{name}
%define		plugindir	%{pkglibdir}/plugins

%filter_provides_in %{plugindir}
%filter_setup


%description
Code::Blocks is a free C++ IDE built specifically to meet the most demanding
needs of its users. It was designed, right from the start, to be extensible
and configurable. Built around a plug-in framework, Code::Blocks can be
extended with plug-in DLLs. It includes a plug-in wizard, so you can compile
your own plug-ins.

%package libs
Summary:	Libraries needed to run Code::Blocks and its plug-ins
Group:		System Environment/Libraries

%description libs
Libraries needed to run Code::Blocks and its plug-ins.

%package devel
Summary:	Files needed to build Code::Blocks plug-ins
Group:		Development/Libraries
Requires:	%{name}-libs = %{version}-%{release}

%description devel
Development files needed to build Code::Blocks plug-ins.

%package contrib-libs
Summary:	Libraries needed to run Code::Blocks contrib plug-ins
Group:		System Environment/Libraries

%description contrib-libs
Libraries needed to run Code::Blocks contrib plug-ins.

%package contrib-devel
Summary:	Files needed to build Code::Blocks contrib plug-ins
Group:		Development/Libraries
Requires:	%{name}-contrib-libs = %{version}-%{release}

%description contrib-devel
Development files needed to build Code::Blocks contrib plug-ins.

%package contrib
Summary:	Additional Code::Blocks plug-ins
Group:		Development/Tools
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-contrib-libs = %{version}-%{release}
Requires:	cppcheck
Requires:	valgrind

%description contrib
Additional Code::Blocks plug-ins.


%prep
%setup -q -n %{name}-%{version}-release
%patch1 -p1 -b .tinyxml
%patch2 -p1 -b .dso
%patch3 -p1 -b .tinyxml-26
%patch4 -p1 -b .D
%patch5 -p1 -b .squirrel
%patch6 -p1 -b .gcc47

# convert EOLs
find . -type f -and -not -name "*.cpp" -and -not -name "*.h" -and -not -name "*.png" -and -not -name "*.bmp" -and -not -name "*.c" -and -not -name "*.cxx" -and -not -name "*.ico" | sed "s/.*/\"\\0\"/" | xargs dos2unix --keepdate &> /dev/null

# remove execute bits from source files
find src/plugins/contrib/regex_testbed -type f -exec chmod a-x {} ';'
find src/plugins/contrib/IncrementalSearch -type f -exec chmod a-x {} ';'
find src/plugins/compilergcc -type f -exec chmod a-x {} ';'

# fix version string
sed -i 's/-release//g' revision.m4

# remove resource archives, they are corrupted
rm -f src/src/resources/*.zip

autoreconf -f -i


%build
# workaround C++ in the sqplus templates (g++ >= 4.7), disable aliasing
%global optflags %{optflags} -fpermissive -fno-strict-aliasing

%configure --with-contrib-plugins=all

# remove unbundled stuff
rm -rf src/include/tinyxml src/base/tinyxml
rm -rf src/include/scripting/{include,squirrel,sqstdlib}
rm -rf src/sdk/scripting/{squirrel,sqstdlib}

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" install
  
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/wxSmithContribItems/*.la
rm -f $RPM_BUILD_ROOT%{plugindir}/*.la

desktop-file-install --vendor fedora \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
	--delete-original \
	$RPM_BUILD_ROOT%{_datadir}/applications/codeblocks.desktop

# set a fixed timestamp (source archive creation) to generated resource archives
touch -r %{SOURCE0} $RPM_BUILD_ROOT%{pkgdatadir}/*.zip

# generate linker config file for wxSmithContribItems libraries
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/wxSmithContribItems" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/%{name}-contrib-%{_arch}.conf


%clean
rm -rf $RPM_BUILD_ROOT


%post
update-mime-database /usr/share/mime &> /dev/null || :

%postun
update-mime-database /usr/share/mime &> /dev/null || :

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%post contrib-libs -p /sbin/ldconfig

%postun contrib-libs -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc README AUTHORS BUGS COMPILERS NEWS ChangeLog

%{_bindir}/*
%{_mandir}/man1/*.gz

%dir %{pkglibdir}
%dir %{plugindir}
%{plugindir}/libastyle.so
%{plugindir}/libautosave.so
%{plugindir}/libclasswizard.so
%{plugindir}/libcodecompletion.so
%{plugindir}/libcompiler.so
%{plugindir}/libdebugger.so
%{plugindir}/libdefaultmimehandler.so
%{plugindir}/libopenfileslist.so
%{plugindir}/libprojectsimporter.so
%{plugindir}/libscriptedwizard.so
%{plugindir}/libtodo.so

%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/mimetypes/*.png
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/pixmaps/%{name}.png

%dir %{pkgdatadir}
%{pkgdatadir}/icons
%dir %{pkgdatadir}/images
%{pkgdatadir}/images/*.png
%{pkgdatadir}/images/16x16
%{pkgdatadir}/images/codecompletion
%{pkgdatadir}/images/settings
%{pkgdatadir}/lexers
%{pkgdatadir}/scripts
%{pkgdatadir}/templates
%{pkgdatadir}/astyle.zip
%{pkgdatadir}/autosave.zip
%{pkgdatadir}/classwizard.zip
%{pkgdatadir}/codecompletion.zip
%{pkgdatadir}/compiler.zip
%{pkgdatadir}/debugger.zip
%{pkgdatadir}/defaultmimehandler.zip
%{pkgdatadir}/manager_resources.zip
%{pkgdatadir}/openfileslist.zip
%{pkgdatadir}/projectsimporter.zip
%{pkgdatadir}/resources.zip
%{pkgdatadir}/scriptedwizard.zip
%{pkgdatadir}/start_here.zip
%{pkgdatadir}/todo.zip
%{pkgdatadir}/tips.txt

%files libs
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/lib%{name}.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%files contrib-libs
%defattr(-,root,root,-)
%{_sysconfdir}/ld.so.conf.d/%{name}-contrib-%{_arch}.conf
%{_libdir}/libwxsmithlib.so.*
%{_libdir}/wxSmithContribItems/*.so.*
%exclude %{_libdir}/libwxsmithlib.so

%files contrib-devel
%defattr(-,root,root,-)
%{_includedir}/wxsmith
%{_includedir}/wxSmithContribItems
%{_libdir}/wxSmithContribItems/*.so
%{_libdir}/pkgconfig/wxsmith.pc
%{_libdir}/pkgconfig/wxsmithaui.pc
%{_libdir}/pkgconfig/wxsmith-contrib.pc

%files contrib
%defattr(-,root,root,-)
%{pkgdatadir}/AutoVersioning.zip
%{pkgdatadir}/BrowseTracker.zip
%{pkgdatadir}/Cccc.zip
%{pkgdatadir}/CppCheck.zip
%{pkgdatadir}/HexEditor.zip
%{pkgdatadir}/IncrementalSearch.zip
%{pkgdatadir}/MouseSap.zip
%{pkgdatadir}/ThreadSearch.zip
%{pkgdatadir}/Valgrind.zip
%{pkgdatadir}/byogames.zip
%{pkgdatadir}/cb_koders.zip
%{pkgdatadir}/codesnippets.zip
%{pkgdatadir}/codestat.zip
%{pkgdatadir}/copystrings.zip
%{pkgdatadir}/dragscroll.zip
%{pkgdatadir}/envvars.zip
%{pkgdatadir}/exporter.zip
%{pkgdatadir}/headerfixup.zip
%{pkgdatadir}/help_plugin.zip
%{pkgdatadir}/keybinder.zip
%{pkgdatadir}/lib_finder.zip
%{pkgdatadir}/Profiler.zip
%{pkgdatadir}/RegExTestbed.zip
%{pkgdatadir}/SymTab.zip
%{pkgdatadir}/wxsmith.zip
%{pkgdatadir}/wxSmithAui.zip
%{pkgdatadir}/wxsmithcontribitems.zip
%{pkgdatadir}/images/ThreadSearch
%{pkgdatadir}/images/codesnippets
%{pkgdatadir}/images/wxsmith
%{pkgdatadir}/lib_finder

%{plugindir}/libAutoVersioning.so
%{plugindir}/libBrowseTracker.so
%{plugindir}/libCccc.so
%{plugindir}/libCppCheck.so
%{plugindir}/libHexEditor.so
%{plugindir}/libIncrementalSearch.so
%{plugindir}/libMouseSap.so
%{plugindir}/libThreadSearch.so
%{plugindir}/libValgrind.so
%{plugindir}/libbyogames.so
%{plugindir}/libcb_koders.so
%{plugindir}/libcodesnippets.so
%{plugindir}/libcodestat.so
%{plugindir}/libcopystrings.so
%{plugindir}/libdragscroll.so
%{plugindir}/libenvvars.so
%{plugindir}/libexporter.so
%{plugindir}/libheaderfixup.so
%{plugindir}/libhelp_plugin.so
%{plugindir}/libkeybinder.so
%{plugindir}/liblib_finder.so
%{plugindir}/libProfiler.so
%{plugindir}/libRegExTestbed.so
%{plugindir}/libSymTab.so
%{plugindir}/libwxsmith.so
%{plugindir}/libwxSmithAui.so
%{plugindir}/libwxsmithcontribitems.so


%changelog
* Tue May 22 2012 Dan Horák <dan@danny.cz> - 10.05-9
- build with system squirrel
- fix FTBFS with g++ 4.7 (#823697)

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.05-8
- Rebuilt for c++ ABI breakage

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.05-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 10.05-6
- Rebuild for new libpng

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 10.05-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Aug 28 2010 Dan Horák <dan@danny.cz> - 10.05-4
- xterm is the default terminal application, added as Requires (#622753)
- backport D language support from trunk (http://fedoraproject.org/wiki/Features/D_Programming)

* Mon Jul 12 2010 Dan Horák <dan@danny.cz> - 10.05-3
- rebuilt against wxGTK-2.8.11-2

* Thu Jul  8 2010 Dan Horák <dan[at]danny.cz> - 10.05-2
- moved license text into -libs subpackage

* Sun Jun 27 2010 Dan Horák <dan[at]danny.cz> - 10.05-1
- updated to 10.05 release

* Sat Feb 13 2010 Dan Horák <dan[at]danny.cz> - 8.02-10
- fixed linking with the new --no-add-needed default (#564644)

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.02-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Jun 15 2009 Dan Horák <dan[at]danny.cz> 8.02-8
- fix gsocket between glib >= 2.21 and wxGTK in rawhide

* Sat Feb 28 2009 Dan Horák <dan[at]danny.cz> 8.02-7
- update desktop file (#487796)

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.02-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 18 2009 Dan Horak <dan[at]danny.cz> 8.02-5
- fix compile error with gcc 4.4/glibc 2.9.90

* Fri Oct 31 2008 Dan Horak <dan[at]danny.cz> 8.02-4
- fix gcc detection (#469096)

* Sat Sep 20 2008 Dan Horak <dan[at]danny.cz> 8.02-3
- update desktop file
- fix running console applications (#461120)

* Fri Aug 29 2008 Dan Horak <dan[at]danny.cz> 8.02-2
- refresh patches

* Sun Mar  2 2008 Dan Horak <dan[at]danny.cz> 8.02-1
- update to stable release 8.02
- update BR to use system libraries

* Mon Feb 18 2008 Dan Horak <dan[at]danny.cz> 1.0-0.30.20080211svn4872
- update to revision 4872
- really fix the multilib problem with the contrib subpackage (#433124)

* Sun Feb 10 2008 Dan Horak <dan[at]danny.cz> 1.0-0.29.20080209svn4868
- update to revision 4868

* Tue Dec 11 2007 Dan Horak <dan[at]danny.cz> 1.0-0.28.20071210svn4719
- update to revision 4719
- fix multiarch problem with contrib subpackage (#340911)
- set a fixed timestamp on all installed data files
- preserve timestamps on updated files

* Wed Aug 29 2007 Dan Horak <dan[at]danny.cz> 1.0-0.27.20070828svn4413
- update to revision 4413
- update the License tag

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.0-0.26.20070718svn4280
- Rebuild for selinux ppc32 issue (F8).

* Thu Jul 19 2007 Dan Horak <dan[at]danny.cz> 1.0-0.25.20070718svn4280
- update to revision 4280
- added missing ldconfig call for the contrib subpackage
- fix permissions for source files

* Sat Apr  7 2007 Dan Horak <dan[at]danny.cz> 1.0-0.24.20070406svn3816
- update to revision 3816

* Tue Feb 13 2007 Dan Horak <dan[at]danny.cz> 1.0-0.23.20070211svn3592
- update the autorev.patch

* Tue Feb 13 2007 Dan Horak <dan[at]danny.cz> 1.0-0.22.20070211svn3592
- update to revision 3592
- added patch for New Project wizard with wxGTK 2.8 (#225058)
- created -libs subpackage to make package multilib-aware (#228356)

* Fri Jan 26 2007 Dan Horak <dan[at]danny.cz> 1.0-0.21.20070125svn3540
- update the listbook.patch

* Fri Jan 26 2007 Dan Horak <dan[at]danny.cz> 1.0-0.20.20070125svn3540
- update to revision 3540

* Thu Jan 18 2007 Dan Horak <dan[at]danny.cz> 1.0-0.19.20070117svn3500
- update to revision 3500
- added patch for compiling with wxGTK 2.8

* Fri Dec  8 2006 Dan Horak <dan[at]danny.cz> 1.0-0.18.20061207svn3357
- update to revision 3357

* Thu Nov 30 2006 Dan Horak <dan[at]danny.cz> 1.0-0.17.20061130svn3315
- update to revision 3315

* Tue Nov 28 2006 Dan Horak <dan[at]danny.cz> 1.0-0.16.20061128svn3295
- update to revision 3295

* Sat Nov 25 2006 Dan Horak <dan[at]danny.cz> 1.0-0.15.20061125svn3268
- update to revision 3268
- fixes #217081

* Tue Nov 21 2006 Dan Horak <dan[at]danny.cz> 1.0-0.14.20061121svn3253
- update to revision 3253

* Fri Nov 10 2006 Dan Horak <dan[at]danny.cz> 1.0-0.13.20061110svn3202
- update to revision 3202
- fixed plugin loading on 64-bit platforms

* Fri Nov  3 2006 Dan Horak <dan[at]danny.cz> 1.0-0.12.20061102svn3170
- update to revision 3170

* Mon Oct 30 2006 Dan Horak <dan[at]danny.cz> 1.0-0.11.20061029svn3157
- update to revision 3157
- kill rpath in the spec file using sed
- fix directory ownership

* Sun Oct  8 2006 Dan Horak <dan[at]danny.cz> 1.0-0.10.20061007svn3030
- update to revision 3030
- change the install paths for plugins in the spec file

* Wed Sep 13 2006 Dan Horak <dan[at]danny.cz> 1.0-0.9.20060909svn2965
- do not require .svn directories for building

* Sun Sep 10 2006 Dan Horak <dan[at]danny.cz> 1.0-0.8.20060909svn2965
- update to revision 2965
- use %%configure macro
- properly install the desktop file
- update the mime database after install and uninstall
- do not own only %%{_libdir}/codeblock/plugins, but also %%{_libdir}/codeblock
- added a script for retrieving and packing a revision from the SVN repo

* Sun Sep  3 2006 Dan Horak <dan[at]danny.cz> 1.0-0.7.20060902svn2944
- update to revision 2944

* Sun Aug 20 2006 Dan Horak <dan[at]danny.cz> 1.0-0.6.20060820svn2882
- update to revision 2882
- added missing Requires for devel subpackage

* Wed Aug 16 2006 Dan Horak <dan[at]danny.cz> 1.0-0.5.20060815svn2854
- update to revision 2854

* Wed Aug 16 2006 Dan Horak <dan[at]danny.cz> 1.0-0.4.20060812svn2840
- make setup section quiet
- use only tabs for indentation

* Tue Aug 15 2006 Dan Horak <dan[at]danny.cz> 1.0-0.3.20060812svn2840
- define libdir in configure

* Sun Aug 13 2006 Dan Horak <dan[at]danny.cz> 1.0-0.2.20060812svn2840
- update to revision 2840
- added BR for autotools

* Tue Aug 08 2006 Dan Horak <dan[at]danny.cz> 1.0-0.1.2824svn
- initial spec file based on upstream