a53cad6
Name:		codeblocks
5feeff6
Version:	8.02
5feeff6
Release:	1%{?dist}
a53cad6
Summary:	An open source, cross platform, free C++ IDE
a53cad6
Group:		Development/Tools
5feeff6
License:	GPLv3+
a53cad6
URL:		http://www.codeblocks.org/
5feeff6
Source:		http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.bz2
a53cad6
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5feeff6
BuildRequires:	wxGTK-devel >= 2.8.0, zlib-devel, bzip2-devel
a53cad6
BuildRequires:	zip
a53cad6
BuildRequires:	dos2unix
a53cad6
BuildRequires:	desktop-file-utils
cde338c
Requires:	%{name}-libs = %{version}-%{release}
a53cad6
Requires:	shared-mime-info
a53cad6
Patch1:		codeblocks-plugins.patch
a53cad6
Patch2:		codeblocks-desktop.patch
a53cad6
a53cad6
%description
a53cad6
Code::Blocks is a free C++ IDE built specifically to meet the most demanding
a53cad6
needs of its users. It was designed, right from the start, to be extensible
a53cad6
and configurable. Built around a plugin framework, Code::Blocks can be
a53cad6
extended with plugin DLLs. It includes a plugin wizard, so you can compile
a53cad6
your own plugins.
a53cad6
cde338c
%package libs
cde338c
Summary:	Libraries needed to run Code::Blocks and its plugins
cde338c
Group:		System Environment/Libraries
cde338c
cde338c
%description libs
cde338c
Libraries needed to run Code::Blocks and its plugins.
cde338c
a53cad6
%package devel
a53cad6
Summary:	Files needed to build Code::Blocks plugins
a53cad6
Group:		Development/Libraries
cde338c
Requires:	%{name}-libs = %{version}-%{release}
a53cad6
Requires:	pkgconfig
a53cad6
a53cad6
%description devel
a53cad6
Development files needed to build Code::Blocks plugins.
a53cad6
3edb0a9
%package contrib-libs
3edb0a9
Summary:	Libraries needed to run Code::Blocks contrib plugins
3edb0a9
Group:		System Environment/Libraries
3005c4b
Obsoletes:	%{name}-contrib < 1.0-0.28.20071210svn4719
3edb0a9
3edb0a9
%description contrib-libs
3edb0a9
Libraries needed to run Code::Blocks contrib plugins.
3edb0a9
a53cad6
%package contrib
a53cad6
Summary:	Additional Code::Blocks plugins
a53cad6
Group:		Development/Tools
a53cad6
Requires:	%{name} = %{version}-%{release}
3edb0a9
Requires:	%{name}-contrib-libs = %{version}-%{release}
a53cad6
a53cad6
%description contrib
a53cad6
Additional Code::Blocks plugins.
a53cad6
a53cad6
a53cad6
%define		pkgdatadir	%{_datadir}/%{name}
a53cad6
%define		pkglibdir	%{_libdir}/%{name}
a53cad6
%define		plugindir	%{pkglibdir}/plugins
a53cad6
a53cad6
c48ce3f
%prep
5feeff6
%setup -q
8afd302
%patch1
a53cad6
%patch2 -p1
c48ce3f
3edb0a9
# convert EOLs
3edb0a9
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
a53cad6
65ab042
# fix the dir, where plugins are installed
3edb0a9
for p in astyle autosave classwizard codecompletion compilergcc debuggergdb defaultmimehandler openfileslist projectsimporter scriptedwizard todo xpmanifest
65ab042
do
5feeff6
	sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/$p/Makefile.*
65ab042
done
65ab042
5feeff6
for p in AutoVersioning BrowseTracker ThreadSearch byogames cb_koders codesnippets codestat dragscroll envvars help_plugin keybinder lib_finder profiler regex_testbed source_exporter symtab wxSmith wxSmithContribItems
65ab042
do
5feeff6
	sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/$p/Makefile.*
65ab042
done
65ab042
5feeff6
sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/wxSmith/plugin/Makefile.*
c943010
8afd302
sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp
8afd302
c943010
# remove execute bits from source files
c943010
find src/plugins/contrib/regex_testbed -type f -exec chmod a-x {} ';'
3edb0a9
find src/plugins/compilergcc -type f -exec chmod a-x {} ';'
c943010
5feeff6
# fix version inside the configure script
5feeff6
sed -i 's/1\.0svn/%{version}/g' configure
a53cad6
a53cad6
3edb0a9
%build
c943010
%configure --with-contrib-plugins=all
a53cad6
5a89724
# Don't use rpath!
5a89724
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
5a89724
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
5a89724
a53cad6
make %{?_smp_mflags}
a53cad6
c48ce3f
a53cad6
%install
a53cad6
rm -rf $RPM_BUILD_ROOT
a53cad6
3edb0a9
make DESTDIR=$RPM_BUILD_ROOT INSTALL="/usr/bin/install -p" install
a53cad6
  
a53cad6
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
a53cad6
rm -f $RPM_BUILD_ROOT%{plugindir}/*.la
a53cad6
a53cad6
desktop-file-install --vendor fedora \
a53cad6
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
a53cad6
	--add-category X-Fedora \
3edb0a9
	--delete-original \
3edb0a9
	$RPM_BUILD_ROOT%{_datadir}/applications/codeblocks.desktop
3edb0a9
3edb0a9
# set a fixed timestamp (source archive creation) to generated resource archives
3edb0a9
touch -r %{SOURCE0} $RPM_BUILD_ROOT%{pkgdatadir}/*.zip
a53cad6
c48ce3f
a53cad6
%clean
a53cad6
rm -rf $RPM_BUILD_ROOT
a53cad6
c48ce3f
a53cad6
%post
a53cad6
update-mime-database /usr/share/mime &> /dev/null || :
a53cad6
a53cad6
%postun
a53cad6
update-mime-database /usr/share/mime &> /dev/null || :
a53cad6
cde338c
%post libs -p /sbin/ldconfig
cde338c
cde338c
%postun libs -p /sbin/ldconfig
cde338c
3edb0a9
%post contrib-libs -p /sbin/ldconfig
c943010
3edb0a9
%postun contrib-libs -p /sbin/ldconfig
c943010
c48ce3f
a53cad6
%files
a53cad6
%defattr(-,root,root)
a53cad6
%doc README COPYING AUTHORS BUGS COMPILERS NEWS ChangeLog
a53cad6
a53cad6
%{_bindir}/*
a53cad6
%{_mandir}/man1/*.gz
a53cad6
a53cad6
%dir %{pkglibdir}
a53cad6
%dir %{plugindir}
a53cad6
%{plugindir}/libastyle.so
a53cad6
%{plugindir}/libautosave.so
a53cad6
%{plugindir}/libclasswizard.so
a53cad6
%{plugindir}/libcodecompletion.so
a53cad6
%{plugindir}/libcompiler.so
65ab042
%{plugindir}/libdebugger.so
a53cad6
%{plugindir}/libdefaultmimehandler.so
3edb0a9
%{plugindir}/libopenfileslist.so
c943010
%{plugindir}/libprojectsimporter.so
a53cad6
%{plugindir}/libscriptedwizard.so
a53cad6
%{plugindir}/libtodo.so
a53cad6
a53cad6
%{_datadir}/applications/fedora-%{name}.desktop
a53cad6
%{_datadir}/icons/gnome/48x48/mimetypes/*.png
f8b6f4b
%{_datadir}/mime/packages/%{name}.xml
f8b6f4b
%{_datadir}/pixmaps/%{name}.png
a53cad6
a53cad6
%dir %{pkgdatadir}
5a89724
%{pkgdatadir}/icons
5a89724
%dir %{pkgdatadir}/images
a53cad6
%{pkgdatadir}/images/*.png
5a89724
%{pkgdatadir}/images/16x16
5a89724
%{pkgdatadir}/images/codecompletion
5a89724
%{pkgdatadir}/images/settings
5a89724
%{pkgdatadir}/lexers
5a89724
%{pkgdatadir}/scripts
5a89724
%{pkgdatadir}/templates
a53cad6
%{pkgdatadir}/astyle.zip
a53cad6
%{pkgdatadir}/autosave.zip
65ab042
%{pkgdatadir}/classwizard.zip
65ab042
%{pkgdatadir}/codecompletion.zip
65ab042
%{pkgdatadir}/compiler.zip
65ab042
%{pkgdatadir}/debugger.zip
a53cad6
%{pkgdatadir}/defaultmimehandler.zip
a53cad6
%{pkgdatadir}/manager_resources.zip
3edb0a9
%{pkgdatadir}/openfileslist.zip
c943010
%{pkgdatadir}/projectsimporter.zip
a53cad6
%{pkgdatadir}/resources.zip
65ab042
%{pkgdatadir}/scriptedwizard.zip
a53cad6
%{pkgdatadir}/start_here.zip
a53cad6
%{pkgdatadir}/todo.zip
a53cad6
%{pkgdatadir}/tips.txt
a53cad6
cde338c
%files libs
cde338c
%defattr(-,root,root)
c943010
%{_libdir}/lib%{name}.so.*
cde338c
a53cad6
%files devel
a53cad6
%defattr(-,root,root)
a53cad6
%{_includedir}/%{name}
c943010
%{_libdir}/lib%{name}.so
a53cad6
%{_libdir}/pkgconfig/%{name}.pc
a53cad6
3edb0a9
%files contrib-libs
a53cad6
%defattr(-,root,root)
c943010
%{_libdir}/libwxsmithlib.so.*
c943010
%exclude %{_libdir}/libwxsmithlib.so
c943010
3edb0a9
%files contrib
3edb0a9
%defattr(-,root,root)
3edb0a9
%{pkgdatadir}/AutoVersioning.zip
5feeff6
%{pkgdatadir}/BrowseTracker.zip
cac7412
%{pkgdatadir}/ThreadSearch.zip
65ab042
%{pkgdatadir}/byogames.zip
65ab042
%{pkgdatadir}/cb_koders.zip
65ab042
%{pkgdatadir}/codesnippets.zip
a53cad6
%{pkgdatadir}/codestat.zip
65ab042
%{pkgdatadir}/dragscroll.zip
a53cad6
%{pkgdatadir}/envvars.zip
65ab042
%{pkgdatadir}/exporter.zip
a53cad6
%{pkgdatadir}/help_plugin.zip
65ab042
%{pkgdatadir}/keybinder.zip
5a89724
%{pkgdatadir}/lib_finder.zip
5a89724
%{pkgdatadir}/Profiler.zip
c253288
%{pkgdatadir}/RegExTestbed.zip
5a89724
%{pkgdatadir}/SymTab.zip
a53cad6
%{pkgdatadir}/wxsmith.zip
c943010
%{pkgdatadir}/wxsmithcontribitems.zip
cac7412
%{pkgdatadir}/images/ThreadSearch
a53cad6
%{pkgdatadir}/images/codesnippets
a53cad6
%{pkgdatadir}/images/wxsmith
cac7412
%{pkgdatadir}/lib_finder
a53cad6
3edb0a9
%{plugindir}/libAutoVersioning.so
5feeff6
%{plugindir}/libBrowseTracker.so
cac7412
%{plugindir}/libThreadSearch.so
a53cad6
%{plugindir}/libbyogames.so
a53cad6
%{plugindir}/libcb_koders.so
a53cad6
%{plugindir}/libcodesnippets.so
a53cad6
%{plugindir}/libcodestat.so
a53cad6
%{plugindir}/libdragscroll.so
a53cad6
%{plugindir}/libenvvars.so
a53cad6
%{plugindir}/libexporter.so
a53cad6
%{plugindir}/libhelp_plugin.so
a53cad6
%{plugindir}/libkeybinder.so
5a89724
%{plugindir}/liblib_finder.so
5a89724
%{plugindir}/libProfiler.so
c253288
%{plugindir}/libRegExTestbed.so
5a89724
%{plugindir}/libSymTab.so
a53cad6
%{plugindir}/libwxsmith.so
c943010
%{plugindir}/libwxsmithcontribitems.so
a53cad6
a53cad6
a53cad6
%changelog
5feeff6
* Sun Mar  2 2008 Dan Horak <dan[at]danny.cz> 8.02-1
5feeff6
- update to stable release 8.02
5feeff6
- update BR to use system libraries
5feeff6
3005c4b
* Mon Feb 18 2008 Dan Horak <dan[at]danny.cz> 1.0-0.30.20080211svn4872
3005c4b
- update to revision 4872
3005c4b
- really fix the multilib problem with the contrib subpackage (#433124)
3005c4b
cac7412
* Sun Feb 10 2008 Dan Horak <dan[at]danny.cz> 1.0-0.29.20080209svn4868
cac7412
- update to revision 4868
cac7412
3edb0a9
* Tue Dec 11 2007 Dan Horak <dan[at]danny.cz> 1.0-0.28.20071210svn4719
3edb0a9
- update to revision 4719
3edb0a9
- fix multiarch problem with contrib subpackage (#340911)
3edb0a9
- set a fixed timestamp on all installed data files
3edb0a9
- preserve timestamps on updated files
3edb0a9
c48ce3f
* Wed Aug 29 2007 Dan Horak <dan[at]danny.cz> 1.0-0.27.20070828svn4413
c48ce3f
- update to revision 4413
c48ce3f
- update the License tag
c48ce3f
c48ce3f
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.0-0.26.20070718svn4280
c48ce3f
- Rebuild for selinux ppc32 issue (F8).
c48ce3f
c943010
* Thu Jul 19 2007 Dan Horak <dan[at]danny.cz> 1.0-0.25.20070718svn4280
c943010
- update to revision 4280
c943010
- added missing ldconfig call for the contrib subpackage
c943010
- fix permissions for source files
c943010
f8b6f4b
* Sat Apr  7 2007 Dan Horak <dan[at]danny.cz> 1.0-0.24.20070406svn3816
f8b6f4b
- update to revision 3816
f8b6f4b
e0d38cd
* Tue Feb 13 2007 Dan Horak <dan[at]danny.cz> 1.0-0.23.20070211svn3592
e0d38cd
- update the autorev.patch
e0d38cd
cde338c
* Tue Feb 13 2007 Dan Horak <dan[at]danny.cz> 1.0-0.22.20070211svn3592
cde338c
- update to revision 3592
cde338c
- added patch for New Project wizard with wxGTK 2.8 (#225058)
cde338c
- created -libs subpackage to make package multilib-aware (#228356)
cde338c
c0e5618
* Fri Jan 26 2007 Dan Horak <dan[at]danny.cz> 1.0-0.21.20070125svn3540
c0e5618
- update the listbook.patch
c0e5618
d8f4253
* Fri Jan 26 2007 Dan Horak <dan[at]danny.cz> 1.0-0.20.20070125svn3540
d8f4253
- update to revision 3540
d8f4253
41f3d7e
* Thu Jan 18 2007 Dan Horak <dan[at]danny.cz> 1.0-0.19.20070117svn3500
41f3d7e
- update to revision 3500
41f3d7e
- added patch for compiling with wxGTK 2.8
41f3d7e
41f3d7e
* Fri Dec  8 2006 Dan Horak <dan[at]danny.cz> 1.0-0.18.20061207svn3357
d91657b
- update to revision 3357
d91657b
c253288
* Thu Nov 30 2006 Dan Horak <dan[at]danny.cz> 1.0-0.17.20061130svn3315
c253288
- update to revision 3315
c253288
9600f0e
* Tue Nov 28 2006 Dan Horak <dan[at]danny.cz> 1.0-0.16.20061128svn3295
9600f0e
- update to revision 3295
9600f0e
16469c2
* Sat Nov 25 2006 Dan Horak <dan[at]danny.cz> 1.0-0.15.20061125svn3268
16469c2
- update to revision 3268
16469c2
- fixes #217081
16469c2
1d4edb2
* Tue Nov 21 2006 Dan Horak <dan[at]danny.cz> 1.0-0.14.20061121svn3253
1d4edb2
- update to revision 3253
1d4edb2
8afd302
* Fri Nov 10 2006 Dan Horak <dan[at]danny.cz> 1.0-0.13.20061110svn3202
8afd302
- update to revision 3202
8afd302
- fixed plugin loading on 64-bit platforms
8afd302
8afd302
* Fri Nov  3 2006 Dan Horak <dan[at]danny.cz> 1.0-0.12.20061102svn3170
aea8489
- update to revision 3170
aea8489
5a89724
* Mon Oct 30 2006 Dan Horak <dan[at]danny.cz> 1.0-0.11.20061029svn3157
5a89724
- update to revision 3157
5a89724
- kill rpath in the spec file using sed
5a89724
- fix directory ownership
5a89724
65ab042
* Sun Oct  8 2006 Dan Horak <dan[at]danny.cz> 1.0-0.10.20061007svn3030
65ab042
- update to revision 3030
65ab042
- change the install paths for plugins in the spec file
65ab042
a53cad6
* Wed Sep 13 2006 Dan Horak <dan[at]danny.cz> 1.0-0.9.20060909svn2965
a53cad6
- do not require .svn directories for building
a53cad6
a53cad6
* Sun Sep 10 2006 Dan Horak <dan[at]danny.cz> 1.0-0.8.20060909svn2965
a53cad6
- update to revision 2965
a53cad6
- use %%configure macro
a53cad6
- properly install the desktop file
a53cad6
- update the mime database after install and uninstall
a53cad6
- do not own only %%{_libdir}/codeblock/plugins, but also %%{_libdir}/codeblock
a53cad6
- added a script for retrieving and packing a revision from the SVN repo
a53cad6
a53cad6
* Sun Sep  3 2006 Dan Horak <dan[at]danny.cz> 1.0-0.7.20060902svn2944
a53cad6
- update to revision 2944
a53cad6
a53cad6
* Sun Aug 20 2006 Dan Horak <dan[at]danny.cz> 1.0-0.6.20060820svn2882
a53cad6
- update to revision 2882
a53cad6
- added missing Requires for devel subpackage
a53cad6
a53cad6
* Wed Aug 16 2006 Dan Horak <dan[at]danny.cz> 1.0-0.5.20060815svn2854
a53cad6
- update to revision 2854
a53cad6
a53cad6
* Wed Aug 16 2006 Dan Horak <dan[at]danny.cz> 1.0-0.4.20060812svn2840
a53cad6
- make setup section quiet
a53cad6
- use only tabs for indentation
a53cad6
a53cad6
* Tue Aug 15 2006 Dan Horak <dan[at]danny.cz> 1.0-0.3.20060812svn2840
a53cad6
- define libdir in configure
a53cad6
a53cad6
* Sun Aug 13 2006 Dan Horak <dan[at]danny.cz> 1.0-0.2.20060812svn2840
a53cad6
- update to revision 2840
a53cad6
- added BR for autotools
a53cad6
a53cad6
* Tue Aug 08 2006 Dan Horak <dan[at]danny.cz> 1.0-0.1.2824svn
a53cad6
- initial spec file based on upstream