1 Building RPM from source tarball
2 ================================================================
4 It is possible to build directly from a source tarball if it contains
7 Before you can run rpmbuild, you need to setup a directory tree and a
11 ----------------------------------------------------------------
13 You may already have one in /usr/src/RPM, but as rebuilding packages
14 as root is evil, we recommend that you create one in a place where
15 your normal user account allows you to write, such as your home
16 directory. This build tree should have the following structure:
26 The following command should build what you need:
28 mkdir -p ${HOME}/rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp}
30 Setup rpmbuild configuration file
31 ----------------------------------------------------------------
33 Now you need to do some rpm configuration. A simple ~/.rpmmacros with
34 the following contents should be enough:
36 cat > ~/.rpmmacros <<EOF
37 %_topdir %(echo ${HOME}/rpm)
38 %_tmppath %{_topdir}/tmp
40 %packager Firstname Lastname <your.address@here>
42 # Have built RPMs land in RPMS/ instead of RPMS/<arch>/
43 %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
46 Make sure to replace the %packager fields with your actual name and email address.
49 ----------------------------------------------------------------
51 There are some important details:
53 * The tarball name must have the ACE version in the name, for example:
55 ACE+TAO-src-6.3.3.tar.gz
57 * The spec file inside the tarball
58 (ACE_wrappers/rpmbuild/ace-tao.spec) must have the correct version
59 numbers for ACE and TAO at the top:
64 * The following files in the source distribution must have the correct
67 ACE_wrappers/ace/Version.h
68 ACE_wrappers/TAO/tao/Version.h
72 ----------------------------------------------------------------
74 You can kick off the rpmbuild anywhere; the tarball will be unpacked
75 and built in your rpmbuild directory described in the previous
78 rpmbuild -tb your-tarball.tar.gz
80 Some packages take quite a while to build.
83 Harvesting the Binary RPM
84 ----------------------------------------------------------------
86 When the build completes, the binary rpms are deposited in rpm/RPMS.
88 ls -lart ${HOME}/rpm/RPMS
90 Please let me know if there are questions/problems.
92 -- Ken Sedgwick (ken@bonsai.com)