| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | ## Instructions for building the official rpms.## These are instructions for building Tor binaries in the rpm format onvarious cpu architectures and operating systems.  Each rpm will requireglibc on the target system.  It is believed that any rpm-based linuxdistribution should have semi-current glibc installed by default.If you run into a distribution that does not work with glibc, or doesnot contain it, please let us know the details.These are the exact steps used to build the official rpms of Tor.If you wish to further tune Tor binaries in rpm format beyond this list,see the GCC doc page for further options:http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/The tor.spec.in file contains the basic info needed to tune the binariesproduced in rpm format. The key parameters to tune are located in thethird section of the tor.spec.in file.  Locate the section similar tothis:## Target a specific arch and OS## default is i386 linux%define target gnu%define target_cpu i386%define target_os linuxThe three parameters: target, target_cpu, and target_os are usedthroughout the "make dist-rpm" process.  They control the parameterspassed to "configure" and the final tuning of the binaries produced.The default settings, as shown above, create binaries for the widestrange of Intel x86 or x86-compatible architectures.The parameters can be set as follows:The "target" parameter:This should be "gnu", "redhat", or the short name of your linux distribution.Other possibilities are "mandrake" or "suse".  This is passed to"configure" through the --host, --build, and --target parameters.Therefore, this "target" parameter must be a valid OS for "configure" aswell.The "target_cpu" parameter:This parameter controls the optimization and tuning of your binaries viagcc and "configure".  This parameter is passed to gcc via the -mtune= or-mcpu= options.  The "configure" script will also receive this parameterthrough the --host, --build, and --target parameters.  Therefore, this"target_cpu" parameter must be valid for both gcc and "configure".  Afew common options for this parameter may be "athlon64, i686, pentium4" orothers.The "target_os" parameter:This parameter controls the target operating system.  Normally, this isonly "linux".  If you wish to build rpms for a non-linux operatingsystem, you can replace "linux" with your operating system.The process used to create the distributed rpms is as follows:Download and Extract the latest tor source code from https://www.torproject.org/.In the Tor directory:./configuremake dist-rpmYou should have at least two, maybe three, rpms.  There should be the binaryi386.rpm, a src.rpm, and on redhat/centos machines, a debuginfo.rpm.
 |