Installing Code::Blocks from source on RPM based distributions

From Code::Blocks
Revision as of 17:57, 15 November 2005 by Zemo (talk | contribs) (to match Specfile)

General instructions

The build requirements in the specfile and the source RPM are set to a minimum because there are two different names of the wxGTK packages (wxGTK and wxGTK2). So it isn't checked whether wxGTK is installed or not. So you have to take a look at it yourself.

This has to be installed:

  1. wxGTK and its devel package
  2. wxGTK-xrc and its devel package (in some distributions included in the packages of point 1)

Compiling the Release Candidate 2

1. Download the source RPM from www.codeblocks.org/downloads.shtml

2. Build the binary package as root

rpmbuild --rebuild codeblocks-1.0-rc2.src.rpm

3. The binary RPM should be in one of the subdirectories of /usr/src/packages/RPMS

Compiling the CVS version

1. You need a fresh CVS version, no ./bootstrap or anything else should be done before in this directory !

2. add the directory codeblocks to an tar.gz archive named codeblocks-1.0-cvs.tar.gz

tar -czf codeblocks-1.0-cvs.tgz codeblocks

3. copy the archive in the directory /usr/src/packages/SOURCES and the Specfile to /usr/src/packages/SPECS/codeblocks.spec

4. build the binary package as root with

rpmbuild -bb /usr/src/packages/SPECS/codeblocks.spec

5. the package will be in one of the subdirectories of /usr/src/packages/RPMS/

6. Install it and enjoy !

Use this as Specfile:

Name:           codeblocks
Version:        1.0
Release:        cvs
Summary:        An open source, cross platform, free C++ IDE.
Group:          Development/Tools/IDE
License:        GPL
URL:            https://www.codeblocks.org/
Packager:       Daniel Orb <danielorb2000@yahoo.de>
Source:         %{name}-%{version}-%{release}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Provides:       codeblocks
BuildRequires:  zip
BuildRequires:  dos2unix
 
%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.

%prep

%setup -n codeblocks

%build
  ./bootstrap
  %configure
  %__make

%install
  %makeinstall

%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}/*

%{_libdir}/*
%{_datadir}/application-registry/codeblocks.applications
%{_datadir}/applications/codeblocks.desktop
%{_datadir}/icons/gnome/48x48/mimetypes/gnome-mime-application-x-codeblocks.png
%{_datadir}/mime-info/*
%{_datadir}/mime/packages/codeblocks.xml
%{_datadir}/pixmaps/codeblocks.png


%{pkgdata}/*