Difference between revisions of "Installing Code::Blocks from source on RPM based distributions"

From Code::Blocks
(reorganize and categorize)
Line 4: Line 4:
 
TODO: the builds should not be done as root
 
TODO: the builds should not be done as root
  
=== Compiling the SVN version ===
+
== Install Requirements ==
 +
 
 +
=== Install Developer Tools ===
  
 
This has to be installed before starting:
 
This has to be installed before starting:
* wxGTK >= 2.6.0 and its devel package,
 
 
* zip,  
 
* zip,  
 
* subversion, (see [http://subversion.tigris.org subversion.tigris.org])
 
* subversion, (see [http://subversion.tigris.org subversion.tigris.org])
Line 20: Line 21:
 
* gcc-c++ and
 
* gcc-c++ and
 
* libstdc++-devel
 
* libstdc++-devel
 +
 +
=== Install wxWidgets 2.6.x ===
 +
 +
This has to be installed before starting:
 +
* wxGTK >= 2.6.0 and its devel package,
 +
 +
=== Setup RPM environment ===
 +
 +
This has to be installed before starting:
 +
* rpm-build
 +
 +
=== Install Subversion client ===
 +
 +
This has to be installed before starting:
 +
* subversion, (see [http://subversion.tigris.org subversion.tigris.org])
 +
 +
== Compiling Code::Blocks ==
 +
 +
=== Compiling the SVN version ===
  
 
1. You need to get the latest sources from SVN (described here [[Compiling_Code::Blocks_in_Linux_(applies_to_all_distros)#Getting_the_latest_sources_from_SVN]])
 
1. You need to get the latest sources from SVN (described here [[Compiling_Code::Blocks_in_Linux_(applies_to_all_distros)#Getting_the_latest_sources_from_SVN]])

Revision as of 09:43, 28 October 2006


TODO: the builds should not be done as root

Install Requirements

Install Developer Tools

This has to be installed before starting:

  • zip,
  • subversion, (see subversion.tigris.org)
  • update-desktop-files, (only on SUSE)
  • make,
  • gettext,
  • autoconf >= 2.5,
  • automake >= 1.7,
  • libtool >= 1.4,
  • m4,
  • intltool,
  • gcc-c++ and
  • libstdc++-devel

Install wxWidgets 2.6.x

This has to be installed before starting:

  • wxGTK >= 2.6.0 and its devel package,

Setup RPM environment

This has to be installed before starting:

  • rpm-build

Install Subversion client

This has to be installed before starting:

Compiling Code::Blocks

Compiling the SVN version

1. You need to get the latest sources from SVN (described here Compiling_Code::Blocks_in_Linux_(applies_to_all_distros)#Getting_the_latest_sources_from_SVN)

2. go into trunk, if you haven't already done it.

3. run these three commands in this order

./bootstrap
./configure --enable-contrib
make dist

the last one will create a .tar.gz archive that contains the sources.

4. copy the archive as root to the directory /usr/src/packages/SOURCES

sudo mv codeblocks-trunk-r$REVISION.tar.gz /usr/src/packages/SOURCES

5. build the binary packages as root with

sudo rpmbuild -bb codeblocks.spec

This will create several packages in one of the architecture specific subdirectories (i586, x86_64, ...) of /usr/src/packages/RPMS/. These are:

  • codeblocks: main package
  • codeblocks-contrib: contrib plugins
  • codeblocks-devel: SDK headers
  • codeblocks-debuginfo: stripped debug information

6. Install the packages you want (usually codeblocks and codeblocks-contrib) and enjoy Code::Blocks!

Compiling the Release Candidate 2

The build requirements in the source RPM are set to a minimum. 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)

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