Menu

[r13645]: / branches / release-08.02 / codeblocks.spec.in  Maximize  Restore  History

Download this file

316 lines (280 with data), 9.9 kB

%define _svnrev		@REVISION@
%define req_wxgtk	2.8.0
%define _fedora		%(if [ -f /etc/fedora-release ]; then echo 1; else echo 0; fi)
%define _redhat		%(if [ -f /etc/redhat-release ]; then echo 1; else echo 0; fi)
%define _mandrake       %(if [ -f /etc/mandrake-release ]; then echo 1; else echo 0; fi)
%define _version        1.0_0.svn.%{_svnrev}
%define _rel		0
%define __release	%{_rel}
%define jobs		%(if [ -e /usr/bin/getconf ]; then echo $(( `/usr/bin/getconf _NPROCESSORS_ONLN` + 1 )); else echo 1; fi)

%if 0%{?suse_version}
%define __release	%{_rel}.suse%{suse_version}
%endif
%if 0%{?mandriva_version}
%define __release            %{_rel}.mdk%{mandrake_version}
%define _redhat 0
%endif
%if 0%{?fedora_version}
%define __release            %{_rel}.fc%{fedora_version}
%define _redhat 0
%endif
%if 0%{?_redhat}
%define _redhat_prefix      %(grep -q "Red Hat Linux" /etc/redhat-release && echo rhl || echo el)
%define _redhat_vernum      %(rpm -qf --queryformat %{VERSION} /etc/redhat-release|tr -d '.')
%define __release            %{_rel}.%{_redhat_prefix}%{_redhat_vernum}
%endif

%define _release           %{__release}

%if 0%{?suse_version} >= 930
%define debugrpm	    1
%endif

%if 0%{?mandriva_version}
%define debugrpm            1
%endif

%define automake17	    0

%if 0%{?_redhat}
%if 0%{?_redhat_vernum} < 4
%define automake17	    1
%endif
%endif

Name:			codeblocks
Version:		%{_version}.%{_release}
Release:		0
Summary:		OpenSource Cross Platform Free C++ IDE
Group:			Development/Tools/IDE
License:		GPL
URL:			http://www.codeblocks.org/
Packager:		TheTuxKeeper <thetuxkeeper@googlemail.com>
Source:			%{name}-@VERSION@.tar.gz
BuildRoot:		%{_tmppath}/%{name}-%{version}-buildroot

Provides:		codeblocks

%if 0%{?mandriva_version}
Requires:               wxgtk2.8 >= %{req_wxgtk}
BuildRequires:          wxgtk2.8 >= %{req_wxgtk}, libwxgtku2.8-devel >= %{req_wxgtk}
%else
%if 0%{?suse_version}
%if 0%{?suse_version} < 1030
Requires:               wxWidgets >= %{req_wxgtk}
BuildRequires:          wxWidgets >= %{req_wxgtk}, wxWidgets-devel >= %{req_wxgtk}
%else
Requires:               wxGTK >= %{req_wxgtk}
BuildRequires:  	wxGTK >= %{req_wxgtk}, wxGTK-devel >= %{req_wxgtk}
%endif
%else
Requires:               wxGTK >= %{req_wxgtk}
BuildRequires:  	wxGTK >= %{req_wxgtk}, wxGTK-devel >= %{req_wxgtk}
%endif
%endif

%if ! 0%{?automake17}
BuildRequires:          intltool, gcc-c++, make, gettext, autoconf >= 2.5, automake >= 1.7, libtool >= 1.4, m4
%else
BuildRequires:          intltool, gcc-c++, make, gettext, autoconf >= 2.5, automake17, libtool >= 1.4, m4
%endif
BuildRequires:  	libstdc++, libstdc++-devel, gtk2-devel, libjpeg-devel, libtiff-devel
BuildRequires:  	zip, subversion, pkgconfig

%if 0%{?suse_version}
BuildRequires:		update-desktop-files
%endif

%if 0%{?fedora_version}
BuildRequires:  	lynx
%endif

#{?_distribution:Distribution:%_distribution}

%define pkgdata		%{_datadir}/%{name}

%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.

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

%description contrib
Additional Code::Blocks plugins


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

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

%{?debugrpm:%debug_package}

%prep

%setup -n codeblocks-@VERSION@

%{?suse_update_libdir:%{suse_update_libdir}}
%{?suse_update_config:%{suse_update_config -f}}

%build
  %if ! %{automake17}
     ./bootstrap
  %else
     AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 ACLOCAL_FLAGS="-I %{_datadir}/aclocal" ./bootstrap
  %endif
  %if 0%{?suse_version}
  %if 0%{?suse_version} > 1020
  %configure \
      --with-wx-config="%{_bindir}/wx-config" \
      --with-contrib-plugins=all $CONF_OPTS
  %else
  %configure \
      --with-wx-config="%{_bindir}/wx-config-2.8" \
      --with-contrib-plugins=all $CONF_OPTS
  %endif
  %else
  %configure \
      --with-wx-config="%{_bindir}/wx-config" \
      --with-contrib-plugins=all $CONF_OPTS
  %endif

  %{__make} %{?jobs:-j %{jobs}}

%install
  %__rm -rf $RPM_BUILD_ROOT
  %__make DESTDIR=$RPM_BUILD_ROOT install

%post
  if [ -x /usr/bin/update-mime-database ]; then
  	/usr/bin/update-mime-database "%{_datadir}/mime"
  fi
  test -x /sbin/ldconfig && /sbin/ldconfig

%preun
  if [ -x /usr/bin/update-mime-database ]; then
     /usr/bin/update-mime-database "%{_datadir}/mime"
  fi

%clean
  test -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && %{__rm} -rf $RPM_BUILD_ROOT

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

%{_bindir}/codeblocks
%{_bindir}/cb_console_runner
%{_libdir}/libcodeblocks.so.*
%{_datadir}/applications/codeblocks.desktop
%{_datadir}/icons/gnome/48x48/mimetypes/*
%{_datadir}/mime/packages/codeblocks.xml
%{_datadir}/pixmaps/codeblocks.png
%{pkgdata}/astyle.zip
%{pkgdata}/autosave.zip
%{pkgdata}/classwizard.zip
%{pkgdata}/codecompletion.zip
%{pkgdata}/compiler.zip
%{pkgdata}/debugger.zip
%{pkgdata}/defaultmimehandler.zip
%{pkgdata}/manager_resources.zip
%{pkgdata}/openfileslist.zip
%{pkgdata}/projectsimporter.zip
%{pkgdata}/resources.zip
%{pkgdata}/scriptedwizard.zip
%{pkgdata}/start_here.zip
%{pkgdata}/tips.txt
%{pkgdata}/todo.zip
%{pkgdata}/icons/*
%{pkgdata}/images/*.png
%{pkgdata}/images/16x16/*
%{pkgdata}/images/codecompletion/*
%{pkgdata}/images/settings/*
%{pkgdata}/lexers/*
%{pkgdata}/plugins/libastyle.*
%{pkgdata}/plugins/libautosave.*
%{pkgdata}/plugins/libclasswizard.*
%{pkgdata}/plugins/libcodecompletion.*
%{pkgdata}/plugins/libcompiler.*
%{pkgdata}/plugins/libdebugger.*
%{pkgdata}/plugins/libdefaultmimehandler.*
%{pkgdata}/plugins/libopenfileslist.*
%{pkgdata}/plugins/libprojectsimporter.*
%{pkgdata}/plugins/libscriptedwizard.*
%{pkgdata}/plugins/libtodo.*
%{pkgdata}/scripts/*
%{pkgdata}/templates/*
%{_mandir}/*

%files contrib
%defattr(-,root,root)
%{_bindir}/cb_share_config
%{_bindir}/codesnippets
%{pkgdata}/AutoVersioning.zip
%{pkgdata}/BrowseTracker.zip
%{pkgdata}/byogames.zip
%{pkgdata}/cb_koders.zip
%{pkgdata}/codesnippets.zip
%{pkgdata}/codestat.zip
%{pkgdata}/dragscroll.zip
%{pkgdata}/envvars.zip
%{pkgdata}/exporter.zip
%{pkgdata}/help_plugin.zip
%{pkgdata}/keybinder.zip
%{pkgdata}/lib_finder.zip
%{pkgdata}/Profiler.zip
%{pkgdata}/RegExTestbed.zip
%{pkgdata}/SymTab.zip
%{pkgdata}/ThreadSearch.zip
%{pkgdata}/wxsmith.zip
%{pkgdata}/wxsmithcontribitems.zip
%{pkgdata}/images/wxsmith/*
%{pkgdata}/images/codesnippets/*
%{pkgdata}/images/ThreadSearch/*
%{pkgdata}/lib_finder/*
%{pkgdata}/plugins/libAutoVersioning.*
%{pkgdata}/plugins/libBrowseTracker.*
%{pkgdata}/plugins/libbyogames.*
%{pkgdata}/plugins/libcb_koders.*
%{pkgdata}/plugins/libcodesnippets.*
%{pkgdata}/plugins/libcodestat.*
%{pkgdata}/plugins/libdragscroll.*
%{pkgdata}/plugins/libenvvars.*
%{pkgdata}/plugins/libexporter.*
%{pkgdata}/plugins/libhelp_plugin.*
%{pkgdata}/plugins/libkeybinder.*
%{pkgdata}/plugins/liblib_finder.*
%{pkgdata}/plugins/libProfiler.*
%{pkgdata}/plugins/libRegExTestbed.*
%{pkgdata}/plugins/libSymTab.*
%{pkgdata}/plugins/libThreadSearch.*
%{pkgdata}/plugins/libwxsmith.*
%{_libdir}/libwxsmithlib.*
%{pkgdata}/plugins/libwxsmithcontribitems.*

%files devel
%defattr(-,root,root)
%{_libdir}/libcodeblocks.so
%{_libdir}/libcodeblocks.la
%{_libdir}/pkgconfig/codeblocks.pc
%{_includedir}/%{name}/*

%changelog
* Thu Jan 03 2008 Daniel Orb <thetuxkeeper@googlemail.com>
- added missing files to file list (libfinder)
- changed dependencies for mandriva
- some clean-ups
* Wed Nov 14 2007 Daniel Orb <thetuxkeeper@googlemail.com>
- added new plugin to file list
- added make job number "detection"
* Sun Oct 14 2007 Daniel Orb <thetuxkeeper@googlemail.com>
- applied changes made on opensuse buildservice
* Mon Apr 16 2007 Daniel Orb <danielorb2000@googlemail.com>
- added wxsmithcontribitems files to filelist
* Fri Jan  5 2007 Daniel Orb <danielorb2000@googlemail.com>
- changed prefix on suse to default (from /opt/gnome to /usr)
* Sun Dec  2 2006 Daniel Orb <danielorb2000@googlemail.com>
- Added RegExTestbed plugin to filelist
* Sun Nov  5 2006 Daniel Orb <danielorb2000@googlemail.com>
- applied patch #1605
- renamed _mandriva to _mandrake
* Wed Oct 11 2006 Daniel Orb <danielorb2000@googlemail.com>
- Added cb_share_config to filelist
* Sun Aug 20 2006 Daniel Orb <danielorb2000@googlemail.com>
- Added missing files to filelist
* Sat Jul 22 2006 Daniel Orb <danielorb2000@googlemail.com>
- adapted versioning to autotools
* Fri Jul 14 2006 Daniel Orb <danielorb2000@googlemail.com>
- added man pages to filelist
* Tue Jul 11 2006 Yiannis Mandravellos <mandrav@codeblocks.org>
- removed pluginwizard files
- replaced libprojectwizard by libscriptedwizard (renamed)
* Tue Jul 11 2006 Daniel Orb <danielorb2000@googlemail.com>
- removed libwxscintilla from filelist
* Mon Jul 10 2006 Daniel Orb <danielorb2000@googlemail.com>
- fixed wrong path of fedora-release file
- fixed mixed cases in one description macro call
- removed and added finally again libwxscintilla from/to filelist
- added versions to some buildrequires
- added byogames plugin to filelist
* Sun Mar  5 2006 Daniel Orb <danielorb2000@googlemail.com>
- rewrite of release tag setting
* Mon Jan  5 2006 Daniel Orb <danielorb2000@googlemail.com>
- had to add Mandriva specific requires
* Mon Jan  2 2006 Daniel Orb <danielorb2000@googlemail.com>
- simplified the changes made before
* Sun Jan  1 2006 Daniel Orb <danielorb2000@googlemail.com>
- added distribution check (SuSE, Fedora, Mandriva/Mandrake)
- added distribution specific Requires and BuildRequires
- added run of update-mime-database if installed
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.