Difference between revisions of "HowTo Compile In RedHat-Fedora"
(→Running rpmbuild) |
|||
(98 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
− | <h1>aMule in | + | <h1>aMule in Fedora</h1> |
− | == | + | == Contents == |
− | This | + | This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br> |
− | + | ||
− | + | ||
− | + | It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br> | |
− | + | It applies to Fedora 9 and later distributions, and aMule v2.2.x | |
− | == | + | == Installing pre-compiled packages == |
− | + | First of all, be aware that pre-compiled packages may or may not include all amule features. It depends on configuration choices done by the packager.<br> | |
+ | You can be sure that the amule 'monolithic' version is always included, but cannot say about other features (amule daemon, link creator or so).<br> | ||
− | |||
− | + | === Installing via [http://fedoraproject.org/wiki/Tools/yum yum] === | |
− | + | aMule is not included by default in official fedora repositories. | |
− | + | But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br> | |
− | + | [http://rpmfusion.org Rpmfusion] free packages repository includes amule stable packages<br> | |
− | + | You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm. For example, for [http://rpmfusion.org rpmfusion] you have to do as root:<br> | |
− | + | <code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code> | |
− | + | Then, you can install amule simply with:<br> | |
− | + | <code>yum install amule</code><br> | |
− | + | All dependencies will be automatically resolved by yum, and it will download and install the amule rpm package as well as all other rpm packages needed to run amule (wxGTK etc.)<br> | |
− | + | That's it ! Now you can just run 'amule' !<br> | |
− | + | === Installing user-contributed RPM packages === | |
+ | You can find in the [http://forum.amule.org aMule forum] user-contributed RPM packages for amule, both for the [http://forum.amule.org/index.php?board=69.0 stable version] and for [http://forum.amule.org/index.php?board=70.0 development versions]<br> | ||
− | + | Having a working internet connection, download the amule packages, become 'root' user and do a :<br> | |
− | + | <code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br> | |
+ | |||
+ | aMule requires other libraries (wxGTK, GeoIP, uPnP ...) to be installed, if they are missing on your system yum will download & install them together with the amule package. | ||
+ | |||
+ | If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "amule &" in a shell.<br> | ||
+ | |||
+ | == Compiling & installing amule from sources == | ||
+ | |||
+ | The "do-it-yourself" section ... | ||
+ | |||
+ | Please, be sure to have enough space. You need 700Mb-1Gbyte of temporary space on your disk. | ||
+ | The last nuclear-powered,speed-of light capable CPU is not necessary (even if it helps!). | ||
+ | |||
+ | |||
+ | === Setting up a compilation environment === | ||
+ | |||
+ | The starting point is the amule source code, that you can find in the amule project website at http://www.amule.org/files/files.php?cat=34 . Download it.<br> | ||
+ | |||
+ | Even if it is not strictly related to aMule compilation, I recommend to update your Fedora installation to the latest package versions. It could help you avoiding problems later. You can update already installed packages with (run as root):<br> | ||
+ | |||
+ | <code>yum update</code> <br> | ||
+ | |||
+ | Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br> | ||
+ | |||
+ | You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br> | ||
+ | |||
+ | Here again, yum helps us:<br> | ||
+ | |||
+ | <code>yum install gcc gcc-c++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel zlib-devel libpng-devel gd-devel libupnp-devel cryptopp-devel</code> <br><br> | ||
+ | |||
+ | Many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br> | ||
+ | If you want to build your own amule rpm package, you need also:<br> | ||
+ | |||
+ | <code>yum install rpm-build redhat-rpm-config</code> | ||
+ | |||
+ | === Downloading & compiling crypto++ === | ||
+ | |||
+ | [http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. | ||
+ | |||
+ | On Fedora 9 and later, this library is included in standard Fedora repositories and you should have installed such library following the previous section instructions. | ||
+ | |||
+ | On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required. | ||
+ | |||
+ | Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008). | ||
+ | |||
+ | Unzip crypto++ sources in a directory, open a shell and change directory on it.<br> | ||
+ | Then get root privileges and type:<br><br> | ||
+ | <code>make</code><br> | ||
+ | <code>make install</code><br> | ||
+ | <code>ldconfig</code><br><br> | ||
+ | The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br> | ||
+ | In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed. | ||
+ | |||
+ | |||
+ | Hint:<br> | ||
+ | If crypto++ tests fail, you can try to modify compilations options as follows: go to the crypto++ sources directory. Locate the "GNUmakefile" file and edit it. In the first line, change<br> | ||
+ | <code>CXXFLAGS = -DNDEBUG -g -O2</code><br> | ||
+ | to<br> | ||
+ | <code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br> | ||
+ | and then recompile / test your crypto++ build again as written above. | ||
+ | |||
+ | === The usual way: configure/compile/install === | ||
==== Configuring your [[aMule]] build ==== | ==== Configuring your [[aMule]] build ==== | ||
− | + | Unzip aMule source file in the current directory with:<br> | |
− | '' | + | <code>tar -xvjf amule-''x.y.z''.tar.bz2</code> |
− | + | Change into the [[aMule]] sources directory created by the untar operation and type :<br> | |
− | + | <code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br> | |
− | + | or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a | |
+ | |||
+ | <code>./configure --prefix=/usr --with-denoise-level=4 --enable-optimize --disable-debug --enable-cas --enable-wxcas --enable-alc --enable-alcc --enable-amulecmd --enable-amule-daemon --enable-amule-gui --enable-geoip --enable-webserver --enable-verbose --disable-ccache</code><br> | ||
+ | |||
+ | (You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br> | ||
+ | |||
+ | Now you should see a bunch of output, while your system tries to configure [[aMule]] for building. The configure phase should not take that long (30 - 60 seconds on a modern system, a little more on older systems), and it ends with a summary of the selected options & installed libraries which will be used in the compilation.<br> | ||
+ | |||
+ | ==== Compiling your [[aMule]] build ==== | ||
+ | |||
+ | Type "<code>make</code>" then sit down and relax. Depending on your systems speed this can take 'a while'. Prepare for at least 5 minutes of strange output.<br> | ||
+ | If make stops check the last few lines of output for something that looks like an error message. If you can find something that looks like an error message, again, join the amule forum and prepare for pasting or do a "<code>make clean</code>", try to change some of your configure options and restart "<code>make</code>".<br> | ||
+ | If it's still not working, ask someone at the amule forum for help. | ||
If your build completed without error you're nearly done. | If your build completed without error you're nearly done. | ||
− | Get root privileges and type | + | ==== Installing your [[aMule]] build ==== |
+ | |||
+ | Get root privileges and type <code>make install</code> to install your newly built [[aMule]]. Now drop your root privileges and try to start [[aMule]] with "<code>amule &</code>". If your build was ok you may have a great piece of software running by now. <br> | ||
+ | |||
+ | If your [[aMule]] instantly dies and produces a bunch of output containing words like "backtrace" - don't worry, join the amule forum and somebody might help you. | ||
After building you can remove the directory you just built [[aMule]] in, as well as you can remove the installed -devel [http://www.rpm.org RPM]s. I suggest you leave the [http://www.rpm.org RPM]s in place in case you want to rebuild or build a new version some other day. | After building you can remove the directory you just built [[aMule]] in, as well as you can remove the installed -devel [http://www.rpm.org RPM]s. I suggest you leave the [http://www.rpm.org RPM]s in place in case you want to rebuild or build a new version some other day. | ||
− | + | === Creating your own RPM packages === | |
− | + | Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage: | |
− | This | + | It performs such steps in a controlled way, following "instructions" contained in a file (the spec file) |
+ | |||
+ | Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC. | ||
+ | |||
+ | As a prerequisite, please install on your fedora system the following two packages, which installs 'rpmbuild' - the application needed to create RPM packages- and set up the standard Fedora RPM configuration. | ||
+ | |||
+ | <code>yum install rpm-build redhat-rpm-config</code> | ||
+ | |||
+ | ==== The spec file ==== | ||
+ | In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages. | ||
+ | |||
+ | Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention. | ||
+ | |||
+ | Please update the spec file your information "Packager" and changing the "Version" row as appropriate. | ||
+ | |||
+ | |||
+ | Name: amule | ||
+ | Version: 2.2.5 | ||
+ | Release: 1%{?dist} | ||
+ | Summary: File sharing client | ||
+ | License: GPLv2+ | ||
+ | Group: Applications/Internet | ||
+ | Source: aMule-%{version}.tar.bz2 | ||
+ | Packager: thepackager <thepackager@yourmail.com> | ||
+ | URL: http://www.amule.org | ||
+ | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
+ | BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils | ||
+ | BuildRequires: gettext-devel, flex, bison, GeoIP-devel | ||
+ | BuildRequires: gd-devel >= 2.0.0, libpng-devel | ||
+ | BuildRequires: cryptopp-devel, libupnp-devel | ||
+ | Requires(pre): chkconfig | ||
+ | Requires: %{name}-nogui = %{version}-%{release} | ||
+ | |||
+ | |||
+ | %description | ||
+ | aMule is a peer to peer file sharing client, based on the well known eMule. | ||
+ | aMule works on Linux, Mac, *BSD and Windows, which makes it the first | ||
+ | multi-platform edonkey network client. | ||
+ | |||
+ | %package nogui | ||
+ | Summary: aMule components which don't require a GUI (for servers) | ||
+ | Group: Applications/Internet | ||
+ | |||
+ | %description nogui | ||
+ | This package containes the aMule components which don't require a GUI. | ||
+ | It is useful for servers which don't have Xorg. | ||
+ | |||
+ | |||
+ | %package -n xchat-%{name} | ||
+ | Summary: Plugin to display aMule's statistics in XChat | ||
+ | Group: Applications/Internet | ||
+ | Requires: %{name} = %{version}-%{release} | ||
+ | Requires: xchat | ||
+ | |||
+ | %description -n xchat-%{name} | ||
+ | This plugins allows you to display aMule statistics in XChat | ||
+ | |||
+ | |||
+ | %prep | ||
+ | %setup -q -n aMule-%{version} | ||
+ | |||
+ | %build | ||
+ | %configure \ | ||
+ | --prefix=/usr \ | ||
+ | --with-denoise-level=4 \ | ||
+ | --enable-optimize \ | ||
+ | --enable-debug \ | ||
+ | --enable-alc \ | ||
+ | --enable-alcc \ | ||
+ | --enable-cas \ | ||
+ | --enable-wxcas \ | ||
+ | --enable-amulecmd \ | ||
+ | --enable-amule-daemon \ | ||
+ | --enable-amule-gui \ | ||
+ | --enable-geoip \ | ||
+ | --enable-webserver \ | ||
+ | --enable-xas \ | ||
+ | --disable-ccache | ||
+ | |||
+ | %{__make} | ||
+ | |||
+ | %install | ||
+ | %{__rm} -rf $RPM_BUILD_ROOT _docs | ||
+ | %{__make} install DESTDIR=$RPM_BUILD_ROOT | ||
+ | |||
+ | %find_lang %{name} | ||
+ | # desktop files | ||
+ | desktop-file-install --vendor "" \ | ||
+ | --delete-original\ | ||
+ | --dir $RPM_BUILD_ROOT%{_datadir}/applications\ | ||
+ | $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop | ||
+ | |||
+ | iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \ | ||
+ | > $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop | ||
+ | desktop-file-install --vendor "" \ | ||
+ | --delete-original\ | ||
+ | --dir $RPM_BUILD_ROOT%{_datadir}/applications\ | ||
+ | $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop | ||
+ | |||
+ | desktop-file-install --vendor "" \ | ||
+ | --delete-original\ | ||
+ | --dir $RPM_BUILD_ROOT%{_datadir}/applications\ | ||
+ | $RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop | ||
+ | |||
+ | desktop-file-install --vendor "" \ | ||
+ | --delete-original\ | ||
+ | --dir $RPM_BUILD_ROOT%{_datadir}/applications\ | ||
+ | $RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop | ||
+ | |||
+ | %clean | ||
+ | %{__rm} -rf $RPM_BUILD_ROOT | ||
+ | |||
+ | %files -f %{name}.lang | ||
+ | |||
+ | %defattr(-,root,root) | ||
+ | %doc %{_datadir}/doc/aMule-%{version} | ||
+ | %{_bindir}/alc | ||
+ | %{_bindir}/amule | ||
+ | %{_bindir}/wxcas | ||
+ | %{_bindir}/amulegui | ||
+ | %{_datadir}/%{name}/ | ||
+ | %{_datadir}/applications/*.desktop | ||
+ | %{_datadir}/pixmaps/* | ||
+ | %{_mandir}/man1/alc.1.gz | ||
+ | %{_mandir}/*/man1/alc.1.gz | ||
+ | %{_mandir}/man1/amule.1.gz | ||
+ | %{_mandir}/*/man1/amule.1.gz | ||
+ | %{_mandir}/man1/wxcas.1.gz | ||
+ | %{_mandir}/*/man1/wxcas.1.gz | ||
+ | %{_mandir}/man1/amulegui.1.gz | ||
+ | %{_mandir}/*/man1/amulegui.1.gz | ||
+ | %exclude %{_datadir}/%{name}/webserver | ||
+ | |||
+ | %files nogui | ||
+ | %{_bindir}/alcc | ||
+ | %{_bindir}/amulecmd | ||
+ | %{_bindir}/amuled | ||
+ | %{_bindir}/amuleweb | ||
+ | %{_bindir}/cas | ||
+ | %{_bindir}/ed2k | ||
+ | %{_datadir}/%{name}/webserver | ||
+ | %{_datadir}/cas | ||
+ | %{_mandir}/man1/alcc.1.gz | ||
+ | %{_mandir}/*/man1/alcc.1.gz | ||
+ | %{_mandir}/man1/amulecmd.1.gz | ||
+ | %{_mandir}/*/man1/amulecmd.1.gz | ||
+ | %{_mandir}/man1/amuled.1.gz | ||
+ | %{_mandir}/*/man1/amuled.1.gz | ||
+ | %{_mandir}/man1/amuleweb.1.gz | ||
+ | %{_mandir}/*/man1/amuleweb.1.gz | ||
+ | %{_mandir}/man1/cas.1.gz | ||
+ | %{_mandir}/*/man1/cas.1.gz | ||
+ | %{_mandir}/man1/ed2k.1.gz | ||
+ | %{_mandir}/*/man1/ed2k.1.gz | ||
+ | |||
+ | |||
+ | %files -n xchat-%{name} | ||
+ | %defattr(-,root,root) | ||
+ | %{_bindir}/autostart-xas | ||
+ | %{_libdir}/xchat/plugins/xas.pl | ||
+ | %{_mandir}/man1/xas.1.gz | ||
+ | %{_mandir}/*/man1/xas.1.gz | ||
+ | |||
+ | |||
+ | %changelog | ||
+ | * Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> | ||
+ | - Updated to aMule 2.2.4 | ||
+ | - Fixed dependency between amule and amule-nogui | ||
+ | * Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it> | ||
+ | - Alignment to rpmfusion spec file | ||
+ | - gui/nogui split | ||
+ | |||
+ | ==== Running rpmbuild ==== | ||
+ | Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory. | ||
+ | |||
+ | Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec | ||
+ | |||
+ | Build the packages (binary, sources, debuginfo) with | ||
+ | |||
+ | rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec | ||
+ | |||
+ | If everything goes fine, you have your packages built in the following directory: | ||
+ | |||
+ | Source RPM package in ~/rpmbuild/SRPMS | ||
+ | |||
+ | Binary RPM packages, including debuginfo packages: | ||
+ | |||
+ | Fedora 12 and later in ~/rpmbuild/RPMS/i686 | ||
+ | |||
+ | Fedora 11 in ~/rpmbuild/RPMS/i586 | ||
+ | |||
+ | Fedora 10 and previous in ~/rpmbuild/RPMS/i386 | ||
+ | |||
+ | == Suggestions == | ||
: * Drop your root privileges. Don't work/play/watch movies/drive a car/{you're favourite way to waste some time here} as root. Working as root can be dangerous. One mistake can lead to some interesting hours, restoring your system's health. If you know what you're doing: fine, but it's probably still better if you don't work as root. | : * Drop your root privileges. Don't work/play/watch movies/drive a car/{you're favourite way to waste some time here} as root. Working as root can be dangerous. One mistake can lead to some interesting hours, restoring your system's health. If you know what you're doing: fine, but it's probably still better if you don't work as root. | ||
Line 71: | Line 340: | ||
: * Keep an eye on the [http://forum.amule.org aMule forum] and the [[Main_Page|aMule Project FAQ]] and probably use the search function: most questions have been answered before. | : * Keep an eye on the [http://forum.amule.org aMule forum] and the [[Main_Page|aMule Project FAQ]] and probably use the search function: most questions have been answered before. | ||
− | : | + | =Creating RPMs for RHEL 5 (CentOS 5)= |
+ | ==Prerequisites== | ||
+ | # Working rpmforge repository. | ||
+ | # Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories. | ||
+ | # Installed libcrypto++ (and headers). | ||
+ | # Installed and updated version of flex (2.5.35 for example) | ||
+ | # amule-2.2.1 SPEC file. | ||
+ | # amule-2.2.1 sources. | ||
+ | # Working rpmbuild tools (and compilers and all the packages needed and listed in this page). | ||
+ | |||
+ | ==Steps== | ||
+ | ===Configure rpmforge repository=== | ||
+ | If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it. | ||
+ | I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones. | ||
+ | |||
+ | ===Install wxGTK 2.8.x=== | ||
+ | You can go to FC9 repository ( http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/Packages/ ) and download wxGTK binaries and install them. | ||
+ | |||
+ | If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too. | ||
+ | |||
+ | ===Install libcrypto++=== | ||
+ | You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work). | ||
+ | |||
+ | To package it for CentOS 5, use this SPEC file: | ||
+ | Name: libcrypto++ | ||
+ | Version: 5.5.2 | ||
+ | Release: 1_ArcosCom | ||
+ | |||
+ | Summary: Crypto++: a C++ Class Library of Cryptographic Primitives | ||
+ | License: BSD-like | ||
+ | Group: System/Libraries | ||
+ | Url: http://www.cryptopp.com | ||
+ | Packager: Andrey Semenov <mitrofan@altlinux.ru> | ||
+ | |||
+ | Source: crypto-%version.tar.bz2 | ||
+ | |||
+ | # Automatically added by buildreq on Sat May 15 2004 | ||
+ | BuildRequires: gcc-c++ libstdc++-devel | ||
+ | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
+ | |||
+ | %description | ||
+ | Crypto++: a C++ Class Library of Cryptographic Primitives | ||
+ | |||
+ | %package -n %name-devel | ||
+ | Summary: Development files for libcrypto | ||
+ | Group: Development/C | ||
+ | PreReq: %name = %version-%release | ||
+ | License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved. | ||
+ | |||
+ | %description -n %name-devel | ||
+ | This package contains development files required for packaging | ||
+ | libcrypto-based software. | ||
+ | |||
+ | %prep | ||
+ | %setup -q -n crypto-%version | ||
+ | |||
+ | %build | ||
+ | make -f GNUmakefile | ||
+ | |||
+ | %install | ||
+ | %__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp | ||
+ | %__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp | ||
+ | %__mkdir_p ${RPM_BUILD_ROOT}%_libdir | ||
+ | %__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir | ||
+ | |||
+ | %post -n %name -p /sbin/ldconfig | ||
+ | |||
+ | %postun -n %name -p /sbin/ldconfig | ||
+ | |||
+ | %files -n %name | ||
+ | %doc Readme.txt License.txt | ||
+ | %_libdir/*.a | ||
+ | |||
+ | %files -n %name-devel | ||
+ | %_includedir/cryptopp | ||
+ | |||
+ | %changelog | ||
+ | * Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom | ||
+ | - Updated to 5.5.2 | ||
+ | - Rebuild for CentOS 5.2 | ||
+ | |||
+ | * Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1 | ||
+ | - fix realese | ||
+ | |||
+ | * Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1 | ||
+ | - First version of RPM package | ||
+ | |||
+ | You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do: | ||
+ | # wget http://www.cryptopp.com/cryptopp552.zip | ||
+ | # mkdir crypto-5.5.2 | ||
+ | # cd crypto-5.5.2 | ||
+ | # unzip ../cryptopp552.zip | ||
+ | # cd .. | ||
+ | # tar -cf crypto-5.5.2.tar crypto-5.5.2/ | ||
+ | # bzip2 crypto-5.5.2.tar | ||
+ | |||
+ | Then, with the libcrypto++.spec file in ~/rpmbuild/SPECS and the crypto-5.5.2.tar.bz2 in ~/rpmbuild/SOURCES you can build your binary package (and source package too) with: | ||
+ | # rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec | ||
+ | |||
+ | And install it (and the devel one) as root: | ||
+ | # sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm | ||
+ | # sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm | ||
+ | |||
+ | ===Upgrade flex=== | ||
+ | When I tried to build amule package, I encountered problems with the flex version in CentOS 5.x, amule need a more recent version of flex and I have to create an upgraded package for it. | ||
− | + | Be warned: An updated version of flex is only needed for compile/build amule, if you have a binary package YOU DON'T NEED IT. | |
− | + | Go to you ~/rpmbuild/SOURCES and download a recent flex version: | |
+ | # wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download | ||
− | + | Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches: | |
+ | # cd ~/rpmbuild/SRPMS | ||
+ | # wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm | ||
+ | # rpm -ihv flex-2.5.4a-41.fc6.src.rpm | ||
− | + | Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one: | |
+ | Summary: A tool for creating scanners (text pattern recognizers). | ||
+ | Name: flex | ||
+ | Version: 2.5.35 | ||
+ | Release: 1_ArcosCom%{?dist} | ||
+ | License: BSD | ||
+ | Group: Development/Tools | ||
+ | URL: http://www.gnu.org/software/flex/ | ||
+ | BuildRoot: %{_tmppath}/%{name}-root | ||
+ | Source: %{name}-%{version}.tar.bz2 | ||
+ | Patch0: flex-2.5.4a-skel.patch | ||
+ | Patch1: flex-2.5.4-glibc22.patch | ||
+ | Patch2: flex-2.5.4a-gcc3.patch | ||
+ | Patch3: flex-2.5.4a-gcc31.patch | ||
+ | Patch4: flex-2.5.4a2.patch | ||
+ | Patch5: flex-pic.patch | ||
+ | Patch6: flex-2.5.4a2-std.patch | ||
+ | Patch7: flex-2.5.4a2-warn.patch | ||
+ | Patch8: flex-2.5.4a2-shapwarn.patch | ||
+ | Patch9: flex-2.5.4a2-iniscan.patch | ||
+ | Patch10: flex-2.5.4a-Makefile.in.patch | ||
+ | #Patch11: flex-2.5.4a-posix.patch | ||
+ | BuildRequires: autoconf, byacc | ||
+ | |||
+ | %description | ||
+ | The flex program generates scanners. Scanners are programs which can | ||
+ | recognize lexical patterns in text. Flex takes pairs of regular | ||
+ | expressions and C code as input and generates a C source file as | ||
+ | output. The output file is compiled and linked with a library to | ||
+ | produce an executable. The executable searches through its input for | ||
+ | occurrences of the regular expressions. When a match is found, it | ||
+ | executes the corresponding C code. Flex was designed to work with | ||
+ | both Yacc and Bison, and is used by many programs as part of their | ||
+ | build process. | ||
+ | |||
+ | You should install flex if you are going to use your system for | ||
+ | application development. | ||
+ | |||
+ | %prep | ||
+ | %setup -q -n %{name}-%{version} | ||
+ | %patch0 -p1 | ||
+ | #%patch1 -p1 -b .glibc22 | ||
+ | #%patch2 -p1 -b .glib3 | ||
+ | #%patch3 -p1 -b .gcc31 | ||
+ | #%patch4 -p1 -b .yynoinput | ||
+ | #%patch5 -p1 -b .pic | ||
+ | #%patch6 -p1 -b .std | ||
+ | #%patch7 -p1 -b .warn | ||
+ | #%patch8 -p1 -b .shapwarn | ||
+ | #%patch9 -p1 -b .iniscan | ||
+ | #%patch10 -p1 | ||
+ | #%patch11 -p1 | ||
+ | |||
+ | %build | ||
+ | autoconf | ||
+ | %configure | ||
+ | make | ||
+ | |||
+ | %install | ||
+ | rm -rf $RPM_BUILD_ROOT | ||
+ | |||
+ | %makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1 | ||
+ | |||
+ | ( cd ${RPM_BUILD_ROOT} | ||
+ | ln -sf flex .%{_bindir}/lex | ||
+ | ln -s flex.1 .%{_mandir}/man1/lex.1 | ||
+ | ln -s flex.1 .%{_mandir}/man1/flex++.1 | ||
+ | ln -s libfl.a .%{_libdir}/libl.a | ||
+ | ) | ||
+ | |||
+ | %check | ||
+ | echo ============TESTING=============== | ||
+ | #make bigcheck | ||
+ | echo ============END TESTING=========== | ||
+ | |||
+ | %clean | ||
+ | rm -rf ${RPM_BUILD_ROOT} | ||
+ | |||
+ | %files | ||
+ | %defattr(-,root,root) | ||
+ | %doc COPYING NEWS README | ||
+ | %{_bindir}/* | ||
+ | %{_mandir}/man1/* | ||
+ | %{_libdir}/*.a | ||
+ | %{_includedir}/FlexLexer.h | ||
+ | %{_datadir}/info/dir | ||
+ | %{_datadir}/info/flex.info-1.gz | ||
+ | %{_datadir}/info/flex.info-2.gz | ||
+ | %{_datadir}/info/flex.info.gz | ||
+ | %{_datadir}/locale/ca/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/da/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/de/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/es/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/fr/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/ga/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/ko/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/nl/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/pl/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/ro/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/ru/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/sv/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/tr/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/vi/LC_MESSAGES/flex.mo | ||
+ | %{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo | ||
+ | |||
+ | %changelog | ||
+ | * Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom | ||
+ | - Updated to 2.5.35 | ||
+ | |||
+ | * Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41 | ||
+ | - Reverting posix patch. Imposing posix because of warning is too | ||
+ | much of a restriction. | ||
+ | |||
+ | * Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40 | ||
+ | - using dist tag | ||
+ | |||
+ | * Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39 | ||
+ | - fileno is defined in posix standard, so adding #define _POSIX_SOURCE | ||
+ | to compile without warnings (#195687) | ||
+ | - dropping 183098 test, since the original bug was already resolved | ||
+ | |||
+ | * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1 | ||
+ | - rebuild | ||
+ | |||
+ | * Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38 | ||
+ | - Caught the real cause of #183098. It failed because the parser | ||
+ | built with `flex -f' *sometimes* made it into the final package, and | ||
+ | -f assumes seven-bit tables. Solution has two steps. Move `make | ||
+ | bigcheck' to `%%check' part, where it belongs anyway, so that flexes | ||
+ | built during `make bigcheck' don't overwrite original build. And | ||
+ | change makefile so that `make bigcheck' will *always* execute *all* | ||
+ | check commands. | ||
+ | |||
+ | * Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4 | ||
+ | - adding test for #183098 into build process | ||
+ | |||
+ | * Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3 | ||
+ | - rebuilt, no changes inside. In hunt for #183098 | ||
+ | |||
+ | * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2 | ||
+ | - bump again for double-long bug on ppc(64) | ||
+ | |||
+ | * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1 | ||
+ | - rebuilt for new gcc4.1 snapshot and glibc changes | ||
+ | |||
+ | * Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37 | ||
+ | - adding `make bigcheck' into build process. Refreshing initscan.c to | ||
+ | make this possible. | ||
+ | |||
+ | * Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36 | ||
+ | - Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes | ||
+ | and better way to silent warnings under gcc. | ||
+ | |||
+ | * Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35 | ||
+ | - Adding `std::' prefixes, got rid of `using namespace std'. (#115354) | ||
+ | - Dummy use of `yy_flex_realloc' to silent warnings. (#30943) | ||
+ | - Adding URL of flex home page to spec (#142675) | ||
+ | |||
+ | * Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com> | ||
+ | - rebuild with 'flex-pic.patch' to enable -pie links | ||
+ | on x86_64 (patch from Jesse Keating) . | ||
+ | |||
+ | * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> | ||
+ | - rebuilt | ||
+ | |||
+ | * Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34 | ||
+ | - rebuilt with GCC 4 | ||
+ | - add %%check script | ||
+ | |||
+ | * Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33 | ||
+ | - #116407 BR byacc | ||
+ | |||
+ | * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com> | ||
+ | - rebuilt | ||
+ | |||
+ | * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com> | ||
+ | - rebuilt | ||
+ | |||
+ | * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> | ||
+ | - rebuilt | ||
+ | |||
+ | * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> | ||
+ | - rebuilt | ||
+ | |||
+ | * Wed Jan 22 2003 Tim Powers <timp@redhat.com> | ||
+ | - rebuilt | ||
+ | |||
+ | * Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28 | ||
+ | - don't include -debuginfo files in package. | ||
+ | |||
+ | * Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27 | ||
+ | - YY_NO_INPUT patch from Jean Marie | ||
+ | |||
+ | * Fri Jun 21 2002 Tim Powers <timp@redhat.com> | ||
+ | - automated rebuild | ||
+ | |||
+ | * Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25 | ||
+ | - don't forcibly strip binaries | ||
+ | |||
+ | * Thu May 23 2002 Tim Powers <timp@redhat.com> | ||
+ | - automated rebuild | ||
+ | |||
+ | * Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23 | ||
+ | - More ISO C++ 98 fixes (#59670) | ||
+ | |||
+ | * Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22 | ||
+ | - rebuild in new enviroment | ||
+ | |||
+ | * Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21 | ||
+ | - More ISO C++ 98 fixes (#59670) | ||
+ | |||
+ | * Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20 | ||
+ | - Fix ISO C++ 98 compliance (#59670) | ||
+ | |||
+ | * Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19 | ||
+ | - fixed #58643 | ||
+ | |||
+ | * Wed Jan 09 2002 Tim Powers <timp@redhat.com> | ||
+ | - automated rebuild | ||
+ | |||
+ | * Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17 | ||
+ | - fixed for working with gcc 3 (bug #55778) | ||
+ | |||
+ | * Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16 | ||
+ | - fix wrong License (bug #54574) | ||
+ | |||
+ | * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com> | ||
+ | - Bump release + rebuild. | ||
+ | |||
+ | * Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com> | ||
+ | - Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2) | ||
+ | This broke, among other things, the kdelibs 2.0 build | ||
+ | - Fix source URL | ||
+ | |||
+ | * Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com> | ||
+ | - FHS packaging (64bit systems need to use libdir). | ||
+ | |||
+ | * Wed Jul 12 2000 Prospector <bugzilla@redhat.com> | ||
+ | - automatic rebuild | ||
+ | |||
+ | * Tue Jun 6 2000 Bill Nottingham <notting@redhat.com> | ||
+ | - rebuild, FHS stuff. | ||
+ | |||
+ | * Thu Feb 3 2000 Bill Nottingham <notting@redhat.com> | ||
+ | - handle compressed man pages | ||
+ | |||
+ | * Fri Jan 28 2000 Bill Nottingham <notting@redhat.com> | ||
+ | - add a libl.a link to libfl.a | ||
+ | |||
+ | * Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com> | ||
+ | - avoid uninitialized variable warning (Erez Zadok). | ||
+ | |||
+ | * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> | ||
+ | - auto rebuild in the new build environment (release 6) | ||
+ | |||
+ | * Fri Dec 18 1998 Bill Nottingham <notting@redhat.com> | ||
+ | - build for 6.0 tree | ||
+ | |||
+ | * Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com> | ||
+ | - build root | ||
+ | |||
+ | * Mon Apr 27 1998 Prospector System <bugs@redhat.com> | ||
+ | - translations modified for de, fr, tr | ||
+ | |||
+ | * Thu Oct 23 1997 Donnie Barnes <djb@redhat.com> | ||
+ | - updated from 2.5.4 to 2.5.4a | ||
+ | |||
+ | * Mon Jun 02 1997 Erik Troan <ewt@redhat.com> | ||
+ | - built against glibc | ||
+ | |||
+ | * Thu Mar 20 1997 Michael Fulbright <msf@redhat.com> | ||
+ | - Updated to v. 2.5.4 | ||
− | + | The changes against the oficial SPEC were: | |
+ | #) Added comments for the don't needed patches. | ||
+ | #) Comment the test step. | ||
+ | #) Upgrade the version and release. | ||
+ | #) Don't remember more. | ||
− | + | Build your flex package: | |
− | + | # rpmbuild -ba ~/rpmbuild/SPECS/flex.spec | |
− | + | ||
− | + | ||
− | + | ||
− | + | Update/install your flex binary package: | |
+ | # rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update) | ||
+ | # rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install) | ||
− | + | Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence. | |
+ | # rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm | ||
+ | Preparing... ########################################### [100%] | ||
+ | 1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave | ||
+ | ########################################### [100%] | ||
− | Install | + | ===Upgrade/Install aMule-2.2.1=== |
+ | # Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory. | ||
+ | # Use this SPEC file (create into your ~/rpmbuild/SPECS directory): | ||
+ | Summary: aMule - another eMule p2p client | ||
+ | Name: amule | ||
+ | Version: 2.2.1 | ||
+ | Release: 1_ArcosCom | ||
+ | License: GPL | ||
+ | Group: Applications/Internet | ||
+ | Packager: The aMule Team (http://forum.amule.org/) | ||
+ | Vendor: The aMule Project | ||
+ | URL: http://www.amule.org/ | ||
+ | Source: aMule-%{version}.tar.bz2 | ||
+ | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
+ | #BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root | ||
+ | BuildRequires: wxGTK-devel >= 2.8.0 | ||
+ | BuildRequires: gettext-devel, bison, GeoIP-devel | ||
+ | BuildRequires: libcrypto++-devel >= 5.1.0 | ||
+ | BuildRequires: flex >= 2.5.33 | ||
+ | Requires: libcrypto++ >= 5.1.0 | ||
+ | |||
+ | %description | ||
+ | aMule is a peer to peer file sharing client, based on the well known eMule. | ||
+ | Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it | ||
+ | the first multi-platform edonkey network client. | ||
+ | |||
+ | %prep | ||
+ | %setup -q -n aMule-2.2.1 | ||
+ | |||
+ | %build | ||
+ | %configure \ | ||
+ | --prefix=/usr \ | ||
+ | --with-denoise-level=4 \ | ||
+ | --enable-optimize \ | ||
+ | --disable-debug \ | ||
+ | --enable-cas \ | ||
+ | --enable-wxcas \ | ||
+ | --enable-alc \ | ||
+ | --enable-alcc \ | ||
+ | --enable-amulecmd \ | ||
+ | --enable-amule-daemon \ | ||
+ | --enable-amule-gui \ | ||
+ | --enable-geoip \ | ||
+ | --enable-webserver \ | ||
+ | --enable-verbose \ | ||
+ | --disable-ccache | ||
+ | |||
+ | %{__make} | ||
+ | |||
+ | %install | ||
+ | [ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs | ||
+ | %{__make} install DESTDIR=$RPM_BUILD_ROOT | ||
+ | |||
+ | %clean | ||
+ | [ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT" | ||
+ | |||
+ | %files | ||
+ | %defattr(-,root,root) | ||
+ | %doc %{_datadir}/doc/* | ||
+ | %{_bindir}/* | ||
+ | %{_libdir}/* | ||
+ | %{_datadir}/* | ||
+ | %{_datadir}/applications/* | ||
+ | %{_datadir}/amule/* | ||
+ | %{_datadir}/locale/* | ||
+ | %{_datadir}/pixmaps/* | ||
+ | %{_mandir}/* | ||
+ | |||
+ | %changelog | ||
+ | |||
+ | * Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom | ||
+ | - Rebuild for CentOS 5.2. | ||
+ | |||
+ | * Tue Jun 13 2008 iz0bbz 1.1.2-1 | ||
+ | - Initial version | ||
− | + | Thanks to iz0bbz for the initial version of this SPEC. | |
+ | # Build your binary and source packages: | ||
+ | # rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec | ||
+ | # Install (or update) as root: | ||
+ | # rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install) | ||
+ | # rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update) | ||
− | + | #Enjoy!! | |
− | + | ==Notes== | |
+ | # You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources. | ||
+ | # rpmforge is for RHEL 5 as livna is for FC8/9. |
Latest revision as of 12:00, 22 December 2010
Contents
- 1 aMule in Fedora
- 2 Creating RPMs for RHEL 5 (CentOS 5)
aMule in Fedora
Contents
This page explains how to get a working aMule installation on Fedora distributions.
It covers installing by pre-compiled RPM packages as well as building from sources.
It applies to Fedora 9 and later distributions, and aMule v2.2.x
Installing pre-compiled packages
First of all, be aware that pre-compiled packages may or may not include all amule features. It depends on configuration choices done by the packager.
You can be sure that the amule 'monolithic' version is always included, but cannot say about other features (amule daemon, link creator or so).
Installing via yum
aMule is not included by default in official fedora repositories.
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.
Rpmfusion free packages repository includes amule stable packages
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm. For example, for rpmfusion you have to do as root:
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
Then, you can install amule simply with:
yum install amule
All dependencies will be automatically resolved by yum, and it will download and install the amule rpm package as well as all other rpm packages needed to run amule (wxGTK etc.)
That's it ! Now you can just run 'amule' !
Installing user-contributed RPM packages
You can find in the aMule forum user-contributed RPM packages for amule, both for the stable version and for development versions
Having a working internet connection, download the amule packages, become 'root' user and do a :
yum --nogpgcheck localinstall <your-amule-RPM-package>
aMule requires other libraries (wxGTK, GeoIP, uPnP ...) to be installed, if they are missing on your system yum will download & install them together with the amule package.
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "amule &" in a shell.
Compiling & installing amule from sources
The "do-it-yourself" section ...
Please, be sure to have enough space. You need 700Mb-1Gbyte of temporary space on your disk. The last nuclear-powered,speed-of light capable CPU is not necessary (even if it helps!).
Setting up a compilation environment
The starting point is the amule source code, that you can find in the amule project website at http://www.amule.org/files/files.php?cat=34 . Download it.
Even if it is not strictly related to aMule compilation, I recommend to update your Fedora installation to the latest package versions. It could help you avoiding problems later. You can update already installed packages with (run as root):
yum update
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.
Here again, yum helps us:
yum install gcc gcc-c++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel zlib-devel libpng-devel gd-devel libupnp-devel cryptopp-devel
Many other packages are installed by yum together with the ones above, due to dependencies. That's regular.
If you want to build your own amule rpm package, you need also:
yum install rpm-build redhat-rpm-config
Downloading & compiling crypto++
crypto++ is a cryptographic library needed by amule compilation process.
On Fedora 9 and later, this library is included in standard Fedora repositories and you should have installed such library following the previous section instructions.
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).
Unzip crypto++ sources in a directory, open a shell and change directory on it.
Then get root privileges and type:
make
make install
ldconfig
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe.
In order to validate your crypto++ build , you must run "cryptest.exe v
" and check if all tests are passed.
Hint:
If crypto++ tests fail, you can try to modify compilations options as follows: go to the crypto++ sources directory. Locate the "GNUmakefile" file and edit it. In the first line, change
CXXFLAGS = -DNDEBUG -g -O2
to
CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM
and then recompile / test your crypto++ build again as written above.
The usual way: configure/compile/install
Configuring your aMule build
Unzip aMule source file in the current directory with:
tar -xvjf amule-x.y.z.tar.bz2
Change into the aMule sources directory created by the untar operation and type :
./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a
./configure --prefix=/usr --with-denoise-level=4 --enable-optimize --disable-debug --enable-cas --enable-wxcas --enable-alc --enable-alcc --enable-amulecmd --enable-amule-daemon --enable-amule-gui --enable-geoip --enable-webserver --enable-verbose --disable-ccache
(You may want to check the configure article to understand switches meaning and eventually try different configurations.)
Now you should see a bunch of output, while your system tries to configure aMule for building. The configure phase should not take that long (30 - 60 seconds on a modern system, a little more on older systems), and it ends with a summary of the selected options & installed libraries which will be used in the compilation.
Compiling your aMule build
Type "make
" then sit down and relax. Depending on your systems speed this can take 'a while'. Prepare for at least 5 minutes of strange output.
If make stops check the last few lines of output for something that looks like an error message. If you can find something that looks like an error message, again, join the amule forum and prepare for pasting or do a "make clean
", try to change some of your configure options and restart "make
".
If it's still not working, ask someone at the amule forum for help.
If your build completed without error you're nearly done.
Installing your aMule build
Get root privileges and type make install
to install your newly built aMule. Now drop your root privileges and try to start aMule with "amule &
". If your build was ok you may have a great piece of software running by now.
If your aMule instantly dies and produces a bunch of output containing words like "backtrace" - don't worry, join the amule forum and somebody might help you.
After building you can remove the directory you just built aMule in, as well as you can remove the installed -devel RPMs. I suggest you leave the RPMs in place in case you want to rebuild or build a new version some other day.
Creating your own RPM packages
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.
As a prerequisite, please install on your fedora system the following two packages, which installs 'rpmbuild' - the application needed to create RPM packages- and set up the standard Fedora RPM configuration.
yum install rpm-build redhat-rpm-config
The spec file
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.
Name: amule Version: 2.2.5 Release: 1%{?dist} Summary: File sharing client License: GPLv2+ Group: Applications/Internet Source: aMule-%{version}.tar.bz2 Packager: thepackager <thepackager@yourmail.com> URL: http://www.amule.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils BuildRequires: gettext-devel, flex, bison, GeoIP-devel BuildRequires: gd-devel >= 2.0.0, libpng-devel BuildRequires: cryptopp-devel, libupnp-devel Requires(pre): chkconfig Requires: %{name}-nogui = %{version}-%{release} %description aMule is a peer to peer file sharing client, based on the well known eMule. aMule works on Linux, Mac, *BSD and Windows, which makes it the first multi-platform edonkey network client. %package nogui Summary: aMule components which don't require a GUI (for servers) Group: Applications/Internet %description nogui This package containes the aMule components which don't require a GUI. It is useful for servers which don't have Xorg. %package -n xchat-%{name} Summary: Plugin to display aMule's statistics in XChat Group: Applications/Internet Requires: %{name} = %{version}-%{release} Requires: xchat %description -n xchat-%{name} This plugins allows you to display aMule statistics in XChat %prep %setup -q -n aMule-%{version} %build %configure \ --prefix=/usr \ --with-denoise-level=4 \ --enable-optimize \ --enable-debug \ --enable-alc \ --enable-alcc \ --enable-cas \ --enable-wxcas \ --enable-amulecmd \ --enable-amule-daemon \ --enable-amule-gui \ --enable-geoip \ --enable-webserver \ --enable-xas \ --disable-ccache %{__make} %install %{__rm} -rf $RPM_BUILD_ROOT _docs %{__make} install DESTDIR=$RPM_BUILD_ROOT %find_lang %{name} # desktop files desktop-file-install --vendor "" \ --delete-original\ --dir $RPM_BUILD_ROOT%{_datadir}/applications\ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \ > $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop desktop-file-install --vendor "" \ --delete-original\ --dir $RPM_BUILD_ROOT%{_datadir}/applications\ $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop desktop-file-install --vendor "" \ --delete-original\ --dir $RPM_BUILD_ROOT%{_datadir}/applications\ $RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop desktop-file-install --vendor "" \ --delete-original\ --dir $RPM_BUILD_ROOT%{_datadir}/applications\ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop %clean %{__rm} -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root) %doc %{_datadir}/doc/aMule-%{version} %{_bindir}/alc %{_bindir}/amule %{_bindir}/wxcas %{_bindir}/amulegui %{_datadir}/%{name}/ %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/* %{_mandir}/man1/alc.1.gz %{_mandir}/*/man1/alc.1.gz %{_mandir}/man1/amule.1.gz %{_mandir}/*/man1/amule.1.gz %{_mandir}/man1/wxcas.1.gz %{_mandir}/*/man1/wxcas.1.gz %{_mandir}/man1/amulegui.1.gz %{_mandir}/*/man1/amulegui.1.gz %exclude %{_datadir}/%{name}/webserver %files nogui %{_bindir}/alcc %{_bindir}/amulecmd %{_bindir}/amuled %{_bindir}/amuleweb %{_bindir}/cas %{_bindir}/ed2k %{_datadir}/%{name}/webserver %{_datadir}/cas %{_mandir}/man1/alcc.1.gz %{_mandir}/*/man1/alcc.1.gz %{_mandir}/man1/amulecmd.1.gz %{_mandir}/*/man1/amulecmd.1.gz %{_mandir}/man1/amuled.1.gz %{_mandir}/*/man1/amuled.1.gz %{_mandir}/man1/amuleweb.1.gz %{_mandir}/*/man1/amuleweb.1.gz %{_mandir}/man1/cas.1.gz %{_mandir}/*/man1/cas.1.gz %{_mandir}/man1/ed2k.1.gz %{_mandir}/*/man1/ed2k.1.gz %files -n xchat-%{name} %defattr(-,root,root) %{_bindir}/autostart-xas %{_libdir}/xchat/plugins/xas.pl %{_mandir}/man1/xas.1.gz %{_mandir}/*/man1/xas.1.gz %changelog * Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> - Updated to aMule 2.2.4 - Fixed dependency between amule and amule-nogui * Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it> - Alignment to rpmfusion spec file - gui/nogui split
Running rpmbuild
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec
Build the packages (binary, sources, debuginfo) with
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec
If everything goes fine, you have your packages built in the following directory:
Source RPM package in ~/rpmbuild/SRPMS
Binary RPM packages, including debuginfo packages:
Fedora 12 and later in ~/rpmbuild/RPMS/i686
Fedora 11 in ~/rpmbuild/RPMS/i586
Fedora 10 and previous in ~/rpmbuild/RPMS/i386
Suggestions
- * Drop your root privileges. Don't work/play/watch movies/drive a car/{you're favourite way to waste some time here} as root. Working as root can be dangerous. One mistake can lead to some interesting hours, restoring your system's health. If you know what you're doing: fine, but it's probably still better if you don't work as root.
- * Keep an eye on the aMule forum and the aMule Project FAQ and probably use the search function: most questions have been answered before.
Creating RPMs for RHEL 5 (CentOS 5)
Prerequisites
- Working rpmforge repository.
- Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.
- Installed libcrypto++ (and headers).
- Installed and updated version of flex (2.5.35 for example)
- amule-2.2.1 SPEC file.
- amule-2.2.1 sources.
- Working rpmbuild tools (and compilers and all the packages needed and listed in this page).
Steps
Configure rpmforge repository
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it. I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.
Install wxGTK 2.8.x
You can go to FC9 repository ( http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Everything/i386/os/Packages/ ) and download wxGTK binaries and install them.
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.
Install libcrypto++
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).
To package it for CentOS 5, use this SPEC file:
Name: libcrypto++ Version: 5.5.2 Release: 1_ArcosCom Summary: Crypto++: a C++ Class Library of Cryptographic Primitives License: BSD-like Group: System/Libraries Url: http://www.cryptopp.com Packager: Andrey Semenov <mitrofan@altlinux.ru> Source: crypto-%version.tar.bz2 # Automatically added by buildreq on Sat May 15 2004 BuildRequires: gcc-c++ libstdc++-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Crypto++: a C++ Class Library of Cryptographic Primitives %package -n %name-devel Summary: Development files for libcrypto Group: Development/C PreReq: %name = %version-%release License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved. %description -n %name-devel This package contains development files required for packaging libcrypto-based software. %prep %setup -q -n crypto-%version %build make -f GNUmakefile %install %__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp %__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp %__mkdir_p ${RPM_BUILD_ROOT}%_libdir %__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir %post -n %name -p /sbin/ldconfig %postun -n %name -p /sbin/ldconfig %files -n %name %doc Readme.txt License.txt %_libdir/*.a %files -n %name-devel %_includedir/cryptopp %changelog * Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom - Updated to 5.5.2 - Rebuild for CentOS 5.2 * Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1 - fix realese * Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1 - First version of RPM package
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:
# wget http://www.cryptopp.com/cryptopp552.zip # mkdir crypto-5.5.2 # cd crypto-5.5.2 # unzip ../cryptopp552.zip # cd .. # tar -cf crypto-5.5.2.tar crypto-5.5.2/ # bzip2 crypto-5.5.2.tar
Then, with the libcrypto++.spec file in ~/rpmbuild/SPECS and the crypto-5.5.2.tar.bz2 in ~/rpmbuild/SOURCES you can build your binary package (and source package too) with:
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec
And install it (and the devel one) as root:
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm # sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm
Upgrade flex
When I tried to build amule package, I encountered problems with the flex version in CentOS 5.x, amule need a more recent version of flex and I have to create an upgraded package for it.
Be warned: An updated version of flex is only needed for compile/build amule, if you have a binary package YOU DON'T NEED IT.
Go to you ~/rpmbuild/SOURCES and download a recent flex version:
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:
# cd ~/rpmbuild/SRPMS # wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm # rpm -ihv flex-2.5.4a-41.fc6.src.rpm
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:
Summary: A tool for creating scanners (text pattern recognizers). Name: flex Version: 2.5.35 Release: 1_ArcosCom%{?dist} License: BSD Group: Development/Tools URL: http://www.gnu.org/software/flex/ BuildRoot: %{_tmppath}/%{name}-root Source: %{name}-%{version}.tar.bz2 Patch0: flex-2.5.4a-skel.patch Patch1: flex-2.5.4-glibc22.patch Patch2: flex-2.5.4a-gcc3.patch Patch3: flex-2.5.4a-gcc31.patch Patch4: flex-2.5.4a2.patch Patch5: flex-pic.patch Patch6: flex-2.5.4a2-std.patch Patch7: flex-2.5.4a2-warn.patch Patch8: flex-2.5.4a2-shapwarn.patch Patch9: flex-2.5.4a2-iniscan.patch Patch10: flex-2.5.4a-Makefile.in.patch #Patch11: flex-2.5.4a-posix.patch BuildRequires: autoconf, byacc %description The flex program generates scanners. Scanners are programs which can recognize lexical patterns in text. Flex takes pairs of regular expressions and C code as input and generates a C source file as output. The output file is compiled and linked with a library to produce an executable. The executable searches through its input for occurrences of the regular expressions. When a match is found, it executes the corresponding C code. Flex was designed to work with both Yacc and Bison, and is used by many programs as part of their build process. You should install flex if you are going to use your system for application development. %prep %setup -q -n %{name}-%{version} %patch0 -p1 #%patch1 -p1 -b .glibc22 #%patch2 -p1 -b .glib3 #%patch3 -p1 -b .gcc31 #%patch4 -p1 -b .yynoinput #%patch5 -p1 -b .pic #%patch6 -p1 -b .std #%patch7 -p1 -b .warn #%patch8 -p1 -b .shapwarn #%patch9 -p1 -b .iniscan #%patch10 -p1 #%patch11 -p1 %build autoconf %configure make %install rm -rf $RPM_BUILD_ROOT %makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1 ( cd ${RPM_BUILD_ROOT} ln -sf flex .%{_bindir}/lex ln -s flex.1 .%{_mandir}/man1/lex.1 ln -s flex.1 .%{_mandir}/man1/flex++.1 ln -s libfl.a .%{_libdir}/libl.a ) %check echo ============TESTING=============== #make bigcheck echo ============END TESTING=========== %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %doc COPYING NEWS README %{_bindir}/* %{_mandir}/man1/* %{_libdir}/*.a %{_includedir}/FlexLexer.h %{_datadir}/info/dir %{_datadir}/info/flex.info-1.gz %{_datadir}/info/flex.info-2.gz %{_datadir}/info/flex.info.gz %{_datadir}/locale/ca/LC_MESSAGES/flex.mo %{_datadir}/locale/da/LC_MESSAGES/flex.mo %{_datadir}/locale/de/LC_MESSAGES/flex.mo %{_datadir}/locale/es/LC_MESSAGES/flex.mo %{_datadir}/locale/fr/LC_MESSAGES/flex.mo %{_datadir}/locale/ga/LC_MESSAGES/flex.mo %{_datadir}/locale/ko/LC_MESSAGES/flex.mo %{_datadir}/locale/nl/LC_MESSAGES/flex.mo %{_datadir}/locale/pl/LC_MESSAGES/flex.mo %{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo %{_datadir}/locale/ro/LC_MESSAGES/flex.mo %{_datadir}/locale/ru/LC_MESSAGES/flex.mo %{_datadir}/locale/sv/LC_MESSAGES/flex.mo %{_datadir}/locale/tr/LC_MESSAGES/flex.mo %{_datadir}/locale/vi/LC_MESSAGES/flex.mo %{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo %changelog * Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom - Updated to 2.5.35 * Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41 - Reverting posix patch. Imposing posix because of warning is too much of a restriction. * Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40 - using dist tag * Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39 - fileno is defined in posix standard, so adding #define _POSIX_SOURCE to compile without warnings (#195687) - dropping 183098 test, since the original bug was already resolved * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1 - rebuild * Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38 - Caught the real cause of #183098. It failed because the parser built with `flex -f' *sometimes* made it into the final package, and -f assumes seven-bit tables. Solution has two steps. Move `make bigcheck' to `%%check' part, where it belongs anyway, so that flexes built during `make bigcheck' don't overwrite original build. And change makefile so that `make bigcheck' will *always* execute *all* check commands. * Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4 - adding test for #183098 into build process * Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3 - rebuilt, no changes inside. In hunt for #183098 * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1 - rebuilt for new gcc4.1 snapshot and glibc changes * Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37 - adding `make bigcheck' into build process. Refreshing initscan.c to make this possible. * Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36 - Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes and better way to silent warnings under gcc. * Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35 - Adding `std::' prefixes, got rid of `using namespace std'. (#115354) - Dummy use of `yy_flex_realloc' to silent warnings. (#30943) - Adding URL of flex home page to spec (#142675) * Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com> - rebuild with 'flex-pic.patch' to enable -pie links on x86_64 (patch from Jesse Keating) . * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> - rebuilt * Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34 - rebuilt with GCC 4 - add %%check script * Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33 - #116407 BR byacc * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com> - rebuilt * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com> - rebuilt * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> - rebuilt * Wed Jan 22 2003 Tim Powers <timp@redhat.com> - rebuilt * Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28 - don't include -debuginfo files in package. * Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27 - YY_NO_INPUT patch from Jean Marie * Fri Jun 21 2002 Tim Powers <timp@redhat.com> - automated rebuild * Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25 - don't forcibly strip binaries * Thu May 23 2002 Tim Powers <timp@redhat.com> - automated rebuild * Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23 - More ISO C++ 98 fixes (#59670) * Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22 - rebuild in new enviroment * Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21 - More ISO C++ 98 fixes (#59670) * Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20 - Fix ISO C++ 98 compliance (#59670) * Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19 - fixed #58643 * Wed Jan 09 2002 Tim Powers <timp@redhat.com> - automated rebuild * Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17 - fixed for working with gcc 3 (bug #55778) * Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16 - fix wrong License (bug #54574) * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com> - Bump release + rebuild. * Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com> - Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2) This broke, among other things, the kdelibs 2.0 build - Fix source URL * Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com> - FHS packaging (64bit systems need to use libdir). * Wed Jul 12 2000 Prospector <bugzilla@redhat.com> - automatic rebuild * Tue Jun 6 2000 Bill Nottingham <notting@redhat.com> - rebuild, FHS stuff. * Thu Feb 3 2000 Bill Nottingham <notting@redhat.com> - handle compressed man pages * Fri Jan 28 2000 Bill Nottingham <notting@redhat.com> - add a libl.a link to libfl.a * Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com> - avoid uninitialized variable warning (Erez Zadok). * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 6) * Fri Dec 18 1998 Bill Nottingham <notting@redhat.com> - build for 6.0 tree * Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com> - build root * Mon Apr 27 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr, tr * Thu Oct 23 1997 Donnie Barnes <djb@redhat.com> - updated from 2.5.4 to 2.5.4a * Mon Jun 02 1997 Erik Troan <ewt@redhat.com> - built against glibc * Thu Mar 20 1997 Michael Fulbright <msf@redhat.com> - Updated to v. 2.5.4
The changes against the oficial SPEC were:
- ) Added comments for the don't needed patches.
- ) Comment the test step.
- ) Upgrade the version and release.
- ) Don't remember more.
Build your flex package:
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec
Update/install your flex binary package:
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update) # rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm Preparing... ########################################### [100%] 1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave ########################################### [100%]
Upgrade/Install aMule-2.2.1
- Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.
- Use this SPEC file (create into your ~/rpmbuild/SPECS directory):
Summary: aMule - another eMule p2p client Name: amule Version: 2.2.1 Release: 1_ArcosCom License: GPL Group: Applications/Internet Packager: The aMule Team (http://forum.amule.org/) Vendor: The aMule Project URL: http://www.amule.org/ Source: aMule-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root #BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root BuildRequires: wxGTK-devel >= 2.8.0 BuildRequires: gettext-devel, bison, GeoIP-devel BuildRequires: libcrypto++-devel >= 5.1.0 BuildRequires: flex >= 2.5.33 Requires: libcrypto++ >= 5.1.0 %description aMule is a peer to peer file sharing client, based on the well known eMule. Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it the first multi-platform edonkey network client. %prep %setup -q -n aMule-2.2.1 %build %configure \ --prefix=/usr \ --with-denoise-level=4 \ --enable-optimize \ --disable-debug \ --enable-cas \ --enable-wxcas \ --enable-alc \ --enable-alcc \ --enable-amulecmd \ --enable-amule-daemon \ --enable-amule-gui \ --enable-geoip \ --enable-webserver \ --enable-verbose \ --disable-ccache %{__make} %install [ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs %{__make} install DESTDIR=$RPM_BUILD_ROOT %clean [ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT" %files %defattr(-,root,root) %doc %{_datadir}/doc/* %{_bindir}/* %{_libdir}/* %{_datadir}/* %{_datadir}/applications/* %{_datadir}/amule/* %{_datadir}/locale/* %{_datadir}/pixmaps/* %{_mandir}/* %changelog * Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom - Rebuild for CentOS 5.2. * Tue Jun 13 2008 iz0bbz 1.1.2-1 - Initial version
Thanks to iz0bbz for the initial version of this SPEC.
- Build your binary and source packages:
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec
- Install (or update) as root:
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install) # rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)
- Enjoy!!
Notes
- You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.
- rpmforge is for RHEL 5 as livna is for FC8/9.