0d0e00f
%define		rev	4413
0d0e00f
%define		date	20070828
a53cad6
a53cad6
Name:		codeblocks
a53cad6
Version:	1.0
0d0e00f
Release:	0.27.%{date}svn%{rev}%{?dist}
a53cad6
Summary:	An open source, cross platform, free C++ IDE
a53cad6
Group:		Development/Tools
f839921
License:	GPLv2+
a53cad6
URL:		http://www.codeblocks.org/
a53cad6
Source:		%{name}-svn%{rev}.tar.bz2
a53cad6
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a53cad6
BuildRequires:	wxGTK-devel >= 2.6.0
a53cad6
BuildRequires:	zip
a53cad6
BuildRequires:	dos2unix
a53cad6
BuildRequires:	autoconf, automake, libtool
a53cad6
BuildRequires:	desktop-file-utils
1217352
Requires:	%{name}-libs = %{version}-%{release}
a53cad6
Requires:	shared-mime-info
a53cad6
Patch1:		codeblocks-plugins.patch
a53cad6
Patch2:		codeblocks-desktop.patch
a53cad6
Patch3:		codeblocks-autorev.patch
0d0e00f
Patch100:	codeblocks-infopane.patch
a53cad6
Source100:	codeblocks-getsvn
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
1217352
%package libs
1217352
Summary:	Libraries needed to run Code::Blocks and its plugins
1217352
Group:		System Environment/Libraries
1217352
1217352
%description libs
1217352
Libraries needed to run Code::Blocks and its plugins.
1217352
a53cad6
%package devel
a53cad6
Summary:	Files needed to build Code::Blocks plugins
a53cad6
Group:		Development/Libraries
1217352
Requires:	%{name}-libs = %{version}-%{release}
a53cad6
Requires:	pkgconfig
a53cad6
a53cad6
%description devel
a53cad6
Development files needed to build Code::Blocks plugins.
a53cad6
a53cad6
%package contrib
a53cad6
Summary:	Additional Code::Blocks plugins
a53cad6
Group:		Development/Tools
a53cad6
Requires:	%{name} = %{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
0d0e00f
%prep
a53cad6
%setup -q -n codeblocks
75b25a3
%patch1
a53cad6
%patch2 -p1
a53cad6
%patch3
0d0e00f
%patch100
0d0e00f
a53cad6
a53cad6
%build
a53cad6
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 &> /dev/null
a53cad6
chmod a+x bootstrap src/update
a53cad6
65ab042
# fix the dir, where plugins are installed
2ee1d48
for p in astyle autosave classwizard codecompletion compilergcc debuggergdb defaultmimehandler projectsimporter scriptedwizard todo xpmanifest
65ab042
do
65ab042
	sed -i 's|$(pkgdatadir)|@libdir@/@PACKAGE@|' src/plugins/$p/Makefile.am
65ab042
done
65ab042
2ee1d48
for p in byogames cb_koders codesnippets codestat dragscroll envvars help_plugin keybinder lib_finder profiler regex_testbed source_exporter symtab wxSmith wxSmithContribItems
65ab042
do
65ab042
	sed -i 's|$(pkgdatadir)|@libdir@/@PACKAGE@|' src/plugins/contrib/$p/Makefile.am
65ab042
done
65ab042
2ee1d48
sed -i 's|$(pkgdatadir)|@libdir@/@PACKAGE@|' src/plugins/contrib/wxSmith/plugin/Makefile.am
2ee1d48
75b25a3
sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp
75b25a3
2ee1d48
# remove execute bits from source files
2ee1d48
find src/plugins/contrib/regex_testbed -type f -exec chmod a-x {} ';'
2ee1d48
75b25a3
# generate revision.m4
1217352
echo "m4_define([SVN_REV], %{rev})" > revision.m4
0d0e00f
echo "m4_define([SVN_REVISION], 1.0svn%{rev})" >> revision.m4
0d0e00f
echo "m4_define([SVN_DATE], %{date})" >> revision.m4
a53cad6
a53cad6
./bootstrap
a53cad6
a53cad6
2ee1d48
%configure --with-contrib-plugins=all
a53cad6
3e0d5ac
# Don't use rpath!
3e0d5ac
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
3e0d5ac
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
3e0d5ac
a53cad6
make %{?_smp_mflags}
a53cad6
0d0e00f
a53cad6
%install
a53cad6
rm -rf $RPM_BUILD_ROOT
a53cad6
a53cad6
make DESTDIR=$RPM_BUILD_ROOT install
a53cad6
  
a53cad6
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
a53cad6
rm -f $RPM_BUILD_ROOT%{plugindir}/*.la
a53cad6
a53cad6
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/codeblocks.desktop
a53cad6
desktop-file-install --vendor fedora \
a53cad6
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
a53cad6
	--add-category X-Fedora \
a53cad6
	src/setup/mime/codeblocks.desktop
a53cad6
0d0e00f
a53cad6
%clean
a53cad6
rm -rf $RPM_BUILD_ROOT
a53cad6
0d0e00f
a53cad6
%post
a53cad6
update-mime-database /usr/share/mime &> /dev/null || :
a53cad6
a53cad6
%postun
a53cad6
update-mime-database /usr/share/mime &> /dev/null || :
a53cad6
1217352
%post libs -p /sbin/ldconfig
1217352
1217352
%postun libs -p /sbin/ldconfig
1217352
2ee1d48
%post contrib -p /sbin/ldconfig
2ee1d48
2ee1d48
%postun contrib -p /sbin/ldconfig
2ee1d48
0d0e00f
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
2ee1d48
%{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
bd20af3
%{_datadir}/mime/packages/%{name}.xml
bd20af3
%{_datadir}/pixmaps/%{name}.png
a53cad6
a53cad6
%dir %{pkgdatadir}
3e0d5ac
%{pkgdatadir}/icons
3e0d5ac
%dir %{pkgdatadir}/images
a53cad6
%{pkgdatadir}/images/*.png
3e0d5ac
%{pkgdatadir}/images/16x16
3e0d5ac
%{pkgdatadir}/images/codecompletion
3e0d5ac
%{pkgdatadir}/images/settings
3e0d5ac
%{pkgdatadir}/lexers
3e0d5ac
%{pkgdatadir}/scripts
3e0d5ac
%{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
2ee1d48
%{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
1217352
%files libs
1217352
%defattr(-,root,root)
2ee1d48
%{_libdir}/lib%{name}.so.*
1217352
a53cad6
%files devel
a53cad6
%defattr(-,root,root)
a53cad6
%{_includedir}/%{name}
2ee1d48
%{_libdir}/lib%{name}.so
a53cad6
%{_libdir}/pkgconfig/%{name}.pc
a53cad6
a53cad6
%files contrib
a53cad6
%defattr(-,root,root)
2ee1d48
%{_libdir}/libwxsmithlib.so.*
2ee1d48
%exclude %{_libdir}/libwxsmithlib.so
2ee1d48
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
3e0d5ac
%{pkgdatadir}/lib_finder.zip
3e0d5ac
%{pkgdatadir}/Profiler.zip
09f939f
%{pkgdatadir}/RegExTestbed.zip
3e0d5ac
%{pkgdatadir}/SymTab.zip
a53cad6
%{pkgdatadir}/wxsmith.zip
2ee1d48
%{pkgdatadir}/wxsmithcontribitems.zip
a53cad6
%{pkgdatadir}/images/codesnippets
a53cad6
%{pkgdatadir}/images/wxsmith
a53cad6
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
3e0d5ac
%{plugindir}/liblib_finder.so
3e0d5ac
%{plugindir}/libProfiler.so
09f939f
%{plugindir}/libRegExTestbed.so
3e0d5ac
%{plugindir}/libSymTab.so
a53cad6
%{plugindir}/libwxsmith.so
2ee1d48
%{plugindir}/libwxsmithcontribitems.so
a53cad6
a53cad6
a53cad6
%changelog
0d0e00f
* Wed Aug 29 2007 Dan Horak <dan[at]danny.cz> 1.0-0.27.20070828svn4413
0d0e00f
- update to revision 4413
0d0e00f
- update the License tag
0d0e00f
0d0e00f
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.0-0.26.20070718svn4280
0d0e00f
- Rebuild for selinux ppc32 issue (F8).
0d0e00f
2ee1d48
* Thu Jul 19 2007 Dan Horak <dan[at]danny.cz> 1.0-0.25.20070718svn4280
2ee1d48
- update to revision 4280
2ee1d48
- added missing ldconfig call for the contrib subpackage
2ee1d48
- fix permissions for source files
2ee1d48
bd20af3
* Sat Apr  7 2007 Dan Horak <dan[at]danny.cz> 1.0-0.24.20070406svn3816
bd20af3
- update to revision 3816
bd20af3
1217352
* Tue Feb 13 2007 Dan Horak <dan[at]danny.cz> 1.0-0.23.20070211svn3592
1217352
- update the autorev.patch
1217352
1217352
* Tue Feb 13 2007 Dan Horak <dan[at]danny.cz> 1.0-0.22.20070211svn3592
1217352
- update to revision 3592
1217352
- added patch for New Project wizard with wxGTK 2.8 (#225058)
1217352
- created -libs subpackage to make package multilib-aware (#228356)
1217352
457681d
* Fri Jan 26 2007 Dan Horak <dan[at]danny.cz> 1.0-0.21.20070125svn3540
457681d
- update the listbook.patch
457681d
32d6795
* Fri Jan 26 2007 Dan Horak <dan[at]danny.cz> 1.0-0.20.20070125svn3540
32d6795
- update to revision 3540
32d6795
76992d0
* Thu Jan 18 2007 Dan Horak <dan[at]danny.cz> 1.0-0.19.20070117svn3500
76992d0
- update to revision 3500
76992d0
- added patch for compiling with wxGTK 2.8
76992d0
76992d0
* Fri Dec  8 2006 Dan Horak <dan[at]danny.cz> 1.0-0.18.20061207svn3357
6729c34
- update to revision 3357
6729c34
09f939f
* Thu Nov 30 2006 Dan Horak <dan[at]danny.cz> 1.0-0.17.20061130svn3315
09f939f
- update to revision 3315
09f939f
5bbedcf
* Tue Nov 28 2006 Dan Horak <dan[at]danny.cz> 1.0-0.16.20061128svn3295
5bbedcf
- update to revision 3295
5bbedcf
91f9c7a
* Sat Nov 25 2006 Dan Horak <dan[at]danny.cz> 1.0-0.15.20061125svn3268
91f9c7a
- update to revision 3268
91f9c7a
- fixes #217081
91f9c7a
36cb840
* Tue Nov 21 2006 Dan Horak <dan[at]danny.cz> 1.0-0.14.20061121svn3253
36cb840
- update to revision 3253
36cb840
75b25a3
* Fri Nov 10 2006 Dan Horak <dan[at]danny.cz> 1.0-0.13.20061110svn3202
75b25a3
- update to revision 3202
75b25a3
- fixed plugin loading on 64-bit platforms
75b25a3
75b25a3
* Fri Nov  3 2006 Dan Horak <dan[at]danny.cz> 1.0-0.12.20061102svn3170
cc79b41
- update to revision 3170
cc79b41
3e0d5ac
* Mon Oct 30 2006 Dan Horak <dan[at]danny.cz> 1.0-0.11.20061029svn3157
3e0d5ac
- update to revision 3157
3e0d5ac
- kill rpath in the spec file using sed
3e0d5ac
- fix directory ownership
3e0d5ac
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