http://wiki.amule.org/w/api.php?action=feedcontributions&user=Iz0bbz&feedformat=atomAMule Project FAQ - User contributions [en]2024-03-28T19:05:31ZUser contributionsMediaWiki 1.23.3http://wiki.amule.org/wiki/BacktracesBacktraces2011-06-21T12:49:18Z<p>Iz0bbz: /* Backtraces in Fedora : Using ABRT */</p>
<hr />
<div><center><br />
[[Backtraces|English]] | <br />
[[Backtraces-es|Espa&ntilde;ol]]<br />
</center><br />
<br />
== Introduction ==<br />
Well, not hard to guess, this is about backtraces.<br />
<br />
Usually, it should not be necessary for the normal user to do this. However, we might have a bad day and release a somewhat buggy version or you are running [http://subversion.tigris.org SVN] which can also be unstable sometimes.<br />
This is where the backtraces come in: if [[aMule]] crashes, and you get an "OOPS - aMule crashed" and so on, we'd like to know. The backtrace [[aMule]] provides is not always very usefull as it contains little information, but, as usual, there's a better way: A *real* backtrace.<br />
<br />
== The GNU Debugger ==<br />
First of all, you need the [http://www.gnu.org/software/gdb/gdb.html GNU Debugger] installed. It's called ''gdb'' and you could check for that by typing ''which gdb'' in a console window. You should see something like this:<br />
<br />
$ which gdb<br />
/usr/bin/gdb<br />
<br />
If you don't have [http://www.gnu.org/software/gdb/gdb.html GDB] installed, you will get a message like this:<br><br />
<br />
$ which gdb<br />
which: no gdb in (/bin:/usr/bin:[etc])<br />
<br />
If that is the case, the [http://www.gnu.org/software/gdb/gdb.html GNU Debugger] is most likely not installed on your system and you should install it before you proceed.<br />
<br />
If your OS is [http://www.gentoo.org Gentoo Linux] you have just to type this:<br />
# emerge -av gdb<br />
<br />
== Compiling [[aMule]] ==<br />
Then, compile [[aMule]] with debugging information:<br />
<br />
$ ./configure --enable-debug --disable-optimize --prefix=/where/to/install/aMule<br />
$ make<br />
$ make install<br />
<br />
If you do not want to overwrite you old copy of [[aMule]], simply do this instead:<br />
<br />
$ ./configure --enable-debug --disable-optimize<br />
$ make<br />
<br />
[[aMule]] can then be run by going into the dir ''src'' and typing ''./amule''<br />
<br />
If you are unable or unwilling to recompile, or are running a RPM version, proceed anyway, but be aware that backtraces from debugging enabled builds are much more useful to us.<br />
<br />
=== On Gentoo ===<br />
You must follow [http://www.gentoo.org/proj/en/qa/backtraces.xml How to get meaningful backtraces in Gentoo].<br />
<br />
In short, most gentoo users want to edit ''/etc/make.conf'', add ''-ggdb'' into their CFLAGS and<br />
FEATURES="splitdebug"<br />
Those are needed by gdb in order to find the debug symbols.<br />
Emerge amule as usual with<br />
USE="debug" emerge amule<br />
If you don't use ''USE="debug"'', you will get a little bit less information from gdb, so it is better to use it.<br />
After merging amule, you can safely remove ''-ggdb'' and ''splitdebug'' from ''/etc/make.conf''.<br />
<br />
== Create a backtrace ==<br />
Now create in your home directory the file ''.gdbinit'' and put these lines into it (or you can type them in at the ''(gdb)'' prompt later):<br />
<br />
ha SIGPIPE nostop noprint pass<br />
ha SIG32 nostop noprint pass<br />
ha SIG33 nostop noprint pass<br />
ha SIG34 nostop noprint pass<br />
<br />
For those who want to know the meaning of the previous lines:<br />
the first one avoid [http://www.gnu.org/software/gdb/gdb.html GDB] stopping at broken pipes;<br />
the second one avoid [http://www.gnu.org/software/gdb/gdb.html GDB] stopping at new thread.<br />
<br />
To create a backtrace, open a console and do the following:<br />
<br />
$ gdb /where/to/install/aMule/bin/amule<br />
(gdb) run<br />
<br />
Now use [[aMule]] normally until it crashes. If it crashes do the following:<br />
<br />
(gdb) bt<br />
(gdb) bt full<br />
(gdb) thread apply all bt<br />
<br />
Post the output of the last three commands in the [http://forum.amule.org/index.php?board=33.0 backtraces forum] with some additional comment about the circumstances the segfault happened and what [[aMule]] version you used (or checkout time for [http://www.gnu.org/software/cvs CVS]).<br />
<br />
== The core file ==<br />
If your [[aMule]] executable has been compiled with debug information (''--enable-debug'' configure flag), but you were not running it from within [http://www.gnu.org/software/gdb/gdb.html GDB], there is still a way to generate a backtrace, if your system was configured to generate '''core files'''.<br />
<br />
Core files are the full memory image of a process that crashed. Your session must be properly configured, so that the system generates core files. Add the following command to ''~/.bashrc'':<br />
<br />
''ulimit -c unlimited''<br />
<br />
Now, when a program crashes, suppose it generate the file ''core.1234'' (this name can be different, but usually will start with 'core') you can enter [http://www.gnu.org/software/gdb/gdb.html GDB] like that:<br />
<br />
''$ gdb --core=/path/to/amule /path/to/core/file/core.1234''<br />
<br />
REMARK: ''$ gdb /path/to/amule --core=/path/to/core/file/core.<pid>''<br />
<br />
and then proceed as in the last session and issue 'bt' and 'bt full'.<br />
<br />
So, that's it, have fun with [[aMule]]<br />
<br />
Greetings, [[User:Citroklar|Citroklar]] & [[User:Phoenix|Phoenix]]<br />
<br />
(Most of the above shamelessly stolen from pure_ascii's post in backtraces forum, thanks, pure!)<br />
<br />
Please read [[Using_gdb_and_valgrind|this]] to learn more about [http://www.gnu.org/software/gdb/gdb.html GDB] and [http://valgrind.kde.org Valgrind].<br />
<br />
== General pitfalls and caveats ==<br />
<br />
;<tt>-fomit-frame-pointer</tt><br />
:On <tt>x86</tt> platforms the <tt>-fomit-frame-pointer</tt> compiler flag usually results in an extra free register to use, but unfortunately it most likely causes ''gdb'' to be unable to parse the resulting executable. Check your <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables.<br />
<br />
;<tt>-fPIE</tt><br />
:If you use the <tt>-fPIE</tt> compiler flag to compile aMule, you must use <tt>-nopie</tt> for the linking stage: add <tt>-nopie</tt> to your <tt>LDFLAGS</tt>.<br />
<br />
;Stripping binaries<br />
:You must not strip the binaries (remove debug info), if you want to create a backtrace. The make process does not automatically strip the binaries, except for the <tt>install-strip</tt> target. Do not use it.<br />
:The GNU linker (<tt>ld</tt>) is capable of automatically stripping the binaries, if the <tt>-s</tt> or <tt>-S</tt> flag is passed to it. This is usually passed via <tt>LDFLAGS</tt> as <tt>-Wl,-s</tt> or <tt>-Wl,-S</tt>. Please check that you don't use any of them.<br />
<br />
== Examples ==<br />
<br />
#0 0x000000000057b790 in ?? ()<br />
#1 0x000000000051e66b in ?? ()<br />
#2 0x000000000051edb6 in ?? ()<br />
...<br />
<br />
This is an exmple of an unuseful backtrace. It doesn't show where the error happened and what went wrong. If your backtrace looks like this, it is pretty unuseful for us. This backtrace is either created from a binary without debug information (stripped), or ''gdb'' was unable to parse it (see above section).<br />
<br />
#0 0x1003f604 in CUpDownClient::ClearDownloadBlockRequests ()<br />
#1 0x10044978 in CUpDownClient::Disconnected ()<br />
#2 0x1004d958 in CClientList::ProcessDirectCallbackList ()<br />
...<br />
<br />
Now this is better, but still not enough. We now have global symbols, so we can see which function called which. But this still lacks line number and local symbol information, making it really hard to find the cause of the crash.<br />
<br />
#0 0x000000000046fcab in CUpDownClient::ClearDownloadBlockRequests (this=0x45bf9e0) at BaseClient.cpp:1175<br />
#1 0x00000000004d1480 in CUpDownClient::SetDownloadState (this=0x45bf9e0, byNewState=1 '\001') at DownloadClient.cpp:541<br />
#2 0x00000000004703bd in CUpDownClient::Disconnected (this=0x45bf9e0, strReason=@0x7ffffc74e2b0, bFromSocket=false) at BaseClient.cpp:1239<br />
...<br />
<br />
Well, this is what I call a useful backtrace. It has both global and local symbols and line numbers. Now we can see the program state as it was at the time of the crash, and can possibly "easily" identify, what went wrong.<br />
<br />
== Backtraces in Fedora : Using ABRT ==<br />
<br />
Fedora includes an "Automatic Bug Reporting Tool" which helps in creating backtraces.<br />
<br />
ABRT can be used to provide useful amule backtraces on the following conditions:<br />
<br />
* you are running Fedora 14 or newer<br />
<br />
* amule is installed from rpmfusion, or you have compiled yourself amule with debug information (see above), using Fedora wxGTK libraries<br />
<br />
* for self-made amule binaries you have configured "OpenGPGCheck = no" in /etc/abrt/abrt.conf<br />
<br />
<br />
Please use the "Local GNU Debugger" as analyzer choice, and the "Logger" facility to create a backtrace report in a file you can send to the aMule team.<br />
<br />
<br />
You can find information on ABRT usage at the following link:<br />
<br />
* [https://fedorahosted.org/abrt/wiki/AbrtBasicFunctionality ABRT Basic functionality]<br />
<br />
== Links ==<br />
* [http://www.gentoo.org/proj/en/qa/backtraces.xml How to get meaningful backtraces in Gentoo]</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2010-12-22T11:00:29Z<p>Iz0bbz: /* Running rpmbuild */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 9 and later distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes amule stable packages<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space. You need 700Mb-1Gbyte of temporary space on your disk.<br />
The last nuclear-powered,speed-of light capable CPU is not necessary (even if it helps!).<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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><br />
<br />
Many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
Source RPM package in ~/rpmbuild/SRPMS<br />
<br />
Binary RPM packages, including debuginfo packages:<br />
<br />
Fedora 12 and later in ~/rpmbuild/RPMS/i686<br />
<br />
Fedora 11 in ~/rpmbuild/RPMS/i586<br />
<br />
Fedora 10 and previous in ~/rpmbuild/RPMS/i386<br />
<br />
== Suggestions ==<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2010-12-22T10:54:21Z<p>Iz0bbz: /* Contents */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 9 and later distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes amule stable packages<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space. You need 700Mb-1Gbyte of temporary space on your disk.<br />
The last nuclear-powered,speed-of light capable CPU is not necessary (even if it helps!).<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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><br />
<br />
Many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2010-12-22T10:53:41Z<p>Iz0bbz: Assuming Fedora 9 + cryptopp library is always available.</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes amule stable packages<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space. You need 700Mb-1Gbyte of temporary space on your disk.<br />
The last nuclear-powered,speed-of light capable CPU is not necessary (even if it helps!).<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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><br />
<br />
Many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/BacktracesBacktraces2010-12-02T11:35:53Z<p>Iz0bbz: </p>
<hr />
<div><center><br />
[[Backtraces|English]] | <br />
[[Backtraces-es|Espa&ntilde;ol]]<br />
</center><br />
<br />
== Introduction ==<br />
Well, not hard to guess, this is about backtraces.<br />
<br />
Usually, it should not be necessary for the normal user to do this. However, we might have a bad day and release a somewhat buggy version or you are running [http://subversion.tigris.org SVN] which can also be unstable sometimes.<br />
This is where the backtraces come in: if [[aMule]] crashes, and you get an "OOPS - aMule crashed" and so on, we'd like to know. The backtrace [[aMule]] provides is not always very usefull as it contains little information, but, as usual, there's a better way: A *real* backtrace.<br />
<br />
== The GNU Debugger ==<br />
First of all, you need the [http://www.gnu.org/software/gdb/gdb.html GNU Debugger] installed. It's called ''gdb'' and you could check for that by typing ''which gdb'' in a console window. You should see something like this:<br />
<br />
$ which gdb<br />
/usr/bin/gdb<br />
<br />
If you don't have [http://www.gnu.org/software/gdb/gdb.html GDB] installed, you will get a message like this:<br><br />
<br />
$ which gdb<br />
which: no gdb in (/bin:/usr/bin:[etc])<br />
<br />
If that is the case, the [http://www.gnu.org/software/gdb/gdb.html GNU Debugger] is most likely not installed on your system and you should install it before you proceed.<br />
<br />
If your OS is [http://www.gentoo.org Gentoo Linux] you have just to type this:<br />
# emerge -av gdb<br />
<br />
== Compiling [[aMule]] ==<br />
Then, compile [[aMule]] with debugging information:<br />
<br />
$ ./configure --enable-debug --disable-optimize --prefix=/where/to/install/aMule<br />
$ make<br />
$ make install<br />
<br />
If you do not want to overwrite you old copy of [[aMule]], simply do this instead:<br />
<br />
$ ./configure --enable-debug --disable-optimize<br />
$ make<br />
<br />
[[aMule]] can then be run by going into the dir ''src'' and typing ''./amule''<br />
<br />
If you are unable or unwilling to recompile, or are running a RPM version, proceed anyway, but be aware that backtraces from debugging enabled builds are much more useful to us.<br />
<br />
=== On Gentoo ===<br />
You must follow [http://www.gentoo.org/proj/en/qa/backtraces.xml How to get meaningful backtraces in Gentoo].<br />
<br />
In short, most gentoo users want to edit ''/etc/make.conf'', add ''-ggdb'' into their CFLAGS and<br />
FEATURES="splitdebug"<br />
Those are needed by gdb in order to find the debug symbols.<br />
Emerge amule as usual with<br />
USE="debug" emerge amule<br />
If you don't use ''USE="debug"'', you will get a little bit less information from gdb, so it is better to use it.<br />
After merging amule, you can safely remove ''-ggdb'' and ''splitdebug'' from ''/etc/make.conf''.<br />
<br />
== Create a backtrace ==<br />
Now create in your home directory the file ''.gdbinit'' and put these lines into it (or you can type them in at the ''(gdb)'' prompt later):<br />
<br />
ha SIGPIPE nostop noprint pass<br />
ha SIG32 nostop noprint pass<br />
ha SIG33 nostop noprint pass<br />
ha SIG34 nostop noprint pass<br />
<br />
For those who want to know the meaning of the previous lines:<br />
the first one avoid [http://www.gnu.org/software/gdb/gdb.html GDB] stopping at broken pipes;<br />
the second one avoid [http://www.gnu.org/software/gdb/gdb.html GDB] stopping at new thread.<br />
<br />
To create a backtrace, open a console and do the following:<br />
<br />
$ gdb /where/to/install/aMule/bin/amule<br />
(gdb) run<br />
<br />
Now use [[aMule]] normally until it crashes. If it crashes do the following:<br />
<br />
(gdb) bt<br />
(gdb) bt full<br />
(gdb) thread apply all bt<br />
<br />
Post the output of the last three commands in the [http://forum.amule.org/index.php?board=33.0 backtraces forum] with some additional comment about the circumstances the segfault happened and what [[aMule]] version you used (or checkout time for [http://www.gnu.org/software/cvs CVS]).<br />
<br />
== The core file ==<br />
If your [[aMule]] executable has been compiled with debug information (''--enable-debug'' configure flag), but you were not running it from within [http://www.gnu.org/software/gdb/gdb.html GDB], there is still a way to generate a backtrace, if your system was configured to generate '''core files'''.<br />
<br />
Core files are the full memory image of a process that crashed. Your session must be properly configured, so that the system generates core files. Add the following command to ''~/.bashrc'':<br />
<br />
''ulimit -c unlimited''<br />
<br />
Now, when a program crashes, suppose it generate the file ''core.1234'' (this name can be different, but usually will start with 'core') you can enter [http://www.gnu.org/software/gdb/gdb.html GDB] like that:<br />
<br />
''$ gdb --core=/path/to/amule /path/to/core/file/core.1234''<br />
<br />
REMARK: ''$ gdb /path/to/amule --core=/path/to/core/file/core.<pid>''<br />
<br />
and then proceed as in the last session and issue 'bt' and 'bt full'.<br />
<br />
So, that's it, have fun with [[aMule]]<br />
<br />
Greetings, [[User:Citroklar|Citroklar]] & [[User:Phoenix|Phoenix]]<br />
<br />
(Most of the above shamelessly stolen from pure_ascii's post in backtraces forum, thanks, pure!)<br />
<br />
Please read [[Using_gdb_and_valgrind|this]] to learn more about [http://www.gnu.org/software/gdb/gdb.html GDB] and [http://valgrind.kde.org Valgrind].<br />
<br />
== General pitfalls and caveats ==<br />
<br />
;<tt>-fomit-frame-pointer</tt><br />
:On <tt>x86</tt> platforms the <tt>-fomit-frame-pointer</tt> compiler flag usually results in an extra free register to use, but unfortunately it most likely causes ''gdb'' to be unable to parse the resulting executable. Check your <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables.<br />
<br />
;<tt>-fPIE</tt><br />
:If you use the <tt>-fPIE</tt> compiler flag to compile aMule, you must use <tt>-nopie</tt> for the linking stage: add <tt>-nopie</tt> to your <tt>LDFLAGS</tt>.<br />
<br />
;Stripping binaries<br />
:You must not strip the binaries (remove debug info), if you want to create a backtrace. The make process does not automatically strip the binaries, except for the <tt>install-strip</tt> target. Do not use it.<br />
:The GNU linker (<tt>ld</tt>) is capable of automatically stripping the binaries, if the <tt>-s</tt> or <tt>-S</tt> flag is passed to it. This is usually passed via <tt>LDFLAGS</tt> as <tt>-Wl,-s</tt> or <tt>-Wl,-S</tt>. Please check that you don't use any of them.<br />
<br />
== Examples ==<br />
<br />
#0 0x000000000057b790 in ?? ()<br />
#1 0x000000000051e66b in ?? ()<br />
#2 0x000000000051edb6 in ?? ()<br />
...<br />
<br />
This is an exmple of an unuseful backtrace. It doesn't show where the error happened and what went wrong. If your backtrace looks like this, it is pretty unuseful for us. This backtrace is either created from a binary without debug information (stripped), or ''gdb'' was unable to parse it (see above section).<br />
<br />
#0 0x1003f604 in CUpDownClient::ClearDownloadBlockRequests ()<br />
#1 0x10044978 in CUpDownClient::Disconnected ()<br />
#2 0x1004d958 in CClientList::ProcessDirectCallbackList ()<br />
...<br />
<br />
Now this is better, but still not enough. We now have global symbols, so we can see which function called which. But this still lacks line number and local symbol information, making it really hard to find the cause of the crash.<br />
<br />
#0 0x000000000046fcab in CUpDownClient::ClearDownloadBlockRequests (this=0x45bf9e0) at BaseClient.cpp:1175<br />
#1 0x00000000004d1480 in CUpDownClient::SetDownloadState (this=0x45bf9e0, byNewState=1 '\001') at DownloadClient.cpp:541<br />
#2 0x00000000004703bd in CUpDownClient::Disconnected (this=0x45bf9e0, strReason=@0x7ffffc74e2b0, bFromSocket=false) at BaseClient.cpp:1239<br />
...<br />
<br />
Well, this is what I call a useful backtrace. It has both global and local symbols and line numbers. Now we can see the program state as it was at the time of the crash, and can possibly "easily" identify, what went wrong.<br />
<br />
== Backtraces in Fedora : Using ABRT ==<br />
<br />
Fedora includes an "Automatic Bug Reporting Tool" which helps in creating backtraces.<br />
<br />
ABRT can be used to provide useful amule backtraces on the following conditions:<br />
<br />
* you are running Fedora 14 or later<br />
<br />
* amule is installed from rpmfusion, or you have compiled yourself amule with debug information (see above), using Fedora wxGTK libraries<br />
<br />
You can find information on ABRT usage at the following link:<br />
<br />
* [https://fedorahosted.org/abrt/wiki/AbrtBasicFunctionality ABRT Basic functionality]<br />
<br />
Please use the "Logger" facility to create a backtrace report in a file you can send to the aMule team.<br />
<br />
== Links ==<br />
* [http://www.gentoo.org/proj/en/qa/backtraces.xml How to get meaningful backtraces in Gentoo]</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-10-15T11:37:21Z<p>Iz0bbz: /* Compiling & installing amule from sources */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes amule stable packages<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space. You need 700Mb-1Gbyte of temporary space on your disk.<br />
The last nuclear-powered,speed-of light capable CPU is not necessary (even if it helps!).<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-10-15T11:33:55Z<p>Iz0bbz: /* Installing via yum */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes amule stable packages<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-30T10:35:59Z<p>Iz0bbz: /* Contents */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.4 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-30T10:33:43Z<p>Iz0bbz: /* Running rpmbuild */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.4 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everything goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-30T10:33:02Z<p>Iz0bbz: /* Running rpmbuild */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.4 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Put the aMule source file (aMule-2.2.5.tar.bz2) into your ~/rpmbuild/SOURCES directory.<br />
<br />
Put the spec file into ~/rpmbuild/SPECS/aMule-2.2.5.spec <br />
<br />
Build the packages (binary, sources, debuginfo) with<br />
<br />
rpmbuild -ba ~/rpmbuild/SPECS/aMule-2.2.5.spec<br />
<br />
If everithing goes fine, you have your packages built in the following directory:<br />
<br />
(Binaries, Fedora 11) ~/rpmbuild/RPMS/i586<br />
(Binaries, Fedora 10) ~/rpmbuild/RPMS/i386<br />
(Sources) ~/rpmbuild/SRPMS<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/Cross-compilation_for_windows_with_mingwCross-compilation for windows with mingw2009-06-30T09:45:55Z<p>Iz0bbz: </p>
<hr />
<div>If you know how to compile everything on Linux, there's not much new to learn.<br />
<br />
Two things are important:<br />
* use the cross-compile toolchain (i.e. i486-mingw32-gcc instead of gcc and i486-mingw32-ranlib instead of ranlib)<br />
* use the headers and libraries for the target system<br />
<br />
If something goes wrong, you can expect one of these two points to be the culprit. Wrong/different headers or additional libraries (like ws2_32 for sockets) are another major source of trouble.<br />
<br />
Most software using autotools will compile using ./configure --host=i486-mingw32; other software may require further changes.<br />
<br />
<br />
Install mingw32:<br />
<br />
Arch:<br />
pacman -S mingw32-{binutils,gcc,runtime,w32api}<br />
Debian/Ubuntu:<br />
aptitude install mingw32{,-binutils,-runtime}<br />
<br />
The value for TARGET depends on mingw32, it's i486-mingw32 for arch and i586-mingw32msvc for Debian.<br />
<br />
export TARGET=i486-mingw32<br />
#export TARGET=i586-mingw32msvc<br />
<br />
Set a directory for building aMule. These two export commands have to be once in every terminal used to execute other command blocks shown here.<br />
<br />
export BUILDDIR=$HOME/mingw32<br />
<br />
Prepare build directory:<br />
<br />
mkdir -p $BUILDDIR<br />
mkdir -p $BUILDDIR/tmp<br />
<br />
Build zlib<br />
<br />
cd $BUILDDIR<br />
wget http://www.zlib.net/zlib-1.2.3.tar.gz<br />
tar xzf zlib-1.2.3.tar.gz<br />
cd zlib-1.2.3<br />
CC=$TARGET-gcc AR="$TARGET-ar rc" RANLIB=$TARGET-ranlib ./configure --prefix=$BUILDDIR/tmp<br />
make install<br />
<br />
Build libiconv (needed for gettext)<br />
<br />
cd $BUILDDIR<br />
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz<br />
tar xzf libiconv-1.13.tar.gz<br />
cd libiconv-1.13<br />
./configure --host=$TARGET --prefix=$BUILDDIR/tmp<br />
make install<br />
<br />
Build gettext (patch needed)<br />
<br />
cd $BUILDDIR<br />
wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz<br />
tar xzf gettext-0.17.tar.gz<br />
cd gettext-0.17<br />
echo "29,30d28<br />
< VARIABLE(rpl_optarg)<br />
< VARIABLE(rpl_optind)<br />
" | patch gettext-tools/woe32dll/gettextlib-exports.c<br />
./configure --host=$TARGET --prefix=$BUILDDIR/tmp --with-libiconv-prefix=$BUILDDIR/tmp<br />
make install<br />
<br />
Build wxwidgets<br />
<br />
cd $BUILDDIR<br />
wget http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.10.tar.bz2<br />
tar xjf wxWidgets-2.8.10.tar.bz2<br />
cd wxWidgets-2.8.10<br />
./configure --host=$TARGET --prefix=$BUILDDIR/tmp --with-libiconv-prefix=$BUILDDIR/tmp --enable-unicode --disable-shared<br />
make install<br />
<br />
Build cryptopp, quite some patching necessary.<br />
<br />
cd $BUILDDIR<br />
wget http://cryptopp.com/cryptopp560.zip<br />
mkdir cryptopp<br />
cd cryptopp<br />
unzip -a ../cryptopp560.zip<br />
echo "71a72,73<br />
> #include <malloc.h><br />
> <br />
" | patch rijndael.cpp<br />
echo "69d68<br />
< LDFLAGS += -pthread" | patch GNUmakefile<br />
echo "9c9<br />
< RANLIB = ranlib<br />
---<br />
> RANLIB = $TARGET-ranlib" | patch GNUmakefile<br />
CXX=$TARGET-g++ RANLIB=$TARGET-ranlib AR=$TARGET-ar LDLIBS=-lws2_32 make -f GNUmakefile<br />
PREFIX=$BUILDDIR/tmp make -f GNUmakefile install<br />
<br />
And finally aMule:<br />
<br />
cd $BUILDDIR<br />
wget http://prdownloads.sourceforge.net/amule/aMule-2.2.5.tar.bz2<br />
tar xjf aMule-2.2.5.tar.bz2<br />
cd aMule-2.2.5<br />
./configure --host=$TARGET --with-zlib=$BUILDDIR/tmp --with-wx-prefix=$BUILDDIR/tmp --with-wx-config=$BUILDDIR/tmp/bin/wx-config --with-crypto-prefix=$BUILDDIR/tmp --prefix=$BUILDDIR/tmp<br />
make install<br />
<br />
Copying everything together:<br />
<br />
cd $BUILDDIR<br />
mkdir pkg<br />
cp /usr/$TARGET/bin/mingwm10.dll $BUILDDIR/pkg<br />
cp $BUILDDIR/tmp/lib/*.dll $BUILDDIR/pkg<br />
cp $BUILDDIR/tmp/bin/amule.exe $BUILDDIR/pkg<br />
<br />
Testing:<br />
<br />
cd $BUILDDIR/pkg<br />
wine amule<br />
<br />
Stripping binaries:<br />
<br />
It significantly reduces the binary sizes, but you will loose debug information! So don't do it if you need to send crash reports to the aMule developers.<br />
<br />
Locate the cross-compile strip tool.<br />
It can be i486-mingw32-strip , i686-pc-mingw32-strip or similar depending on your distribution.<br />
Then :<br />
<br />
cd $BUILDDIR/pkg<br />
i486-mingw32-strip amule</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-17T18:13:34Z<p>Iz0bbz: /* Creating your own RPM packages */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.4 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-17T18:12:12Z<p>Iz0bbz: /* Creating your own RPM packages */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.4 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Creating RPM files *implies* running configure/make/build as written in the section before, but, as an advantage:<br />
It performs such steps in a controlled way, following "instructions" contained in a file (the spec file)<br />
Having RPM package(s) in output, it gives you much more control on how to install/update software on your PC.<br />
<br />
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.<br />
<br />
yum install rpm-build redhat-rpm-config<br />
<br />
==== The spec file ====<br />
In this file you give instructions to rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-17T17:52:22Z<p>Iz0bbz: /* Installing via [http://fedoraproject.org/wiki/Tools/yum yum] */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.4 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Work in progress<br />
<br />
==== The spec file ====<br />
To create amule packages, you need a spec file.<br />
In this file you instruct rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-17T17:51:56Z<p>Iz0bbz: /* Installing via [http://fedoraproject.org/wiki/Tools/yum yum] */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of June 16, 2009 you'll find aMule v2.2.5 for Fedora 11, v2.2.43 for Fedora 9 & 10, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Work in progress<br />
<br />
==== The spec file ====<br />
To create amule packages, you need a spec file.<br />
In this file you instruct rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-06-17T17:51:05Z<p>Iz0bbz: /* Contents */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 to 11 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of May 26, 2009 you'll find aMule v2.2.4 for Fedora 10, v2.23 for Fedora 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Work in progress<br />
<br />
==== The spec file ====<br />
To create amule packages, you need a spec file.<br />
In this file you instruct rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-05-26T11:30:19Z<p>Iz0bbz: /* Compiling & installing amule from sources */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8-9-10 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of May 26, 2009 you'll find aMule v2.2.4 for Fedora 10, v2.23 for Fedora 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
Please, be sure to have enough space on your disk. You need 700Mb-1Gbyte of temporary space on your disk.<br />
<br />
The last nuclear-powered CPU is not necessary (even if it helps!). You can safely compile aMule on a i486 processor.<br />
<br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Work in progress<br />
<br />
==== The spec file ====<br />
To create amule packages, you need a spec file.<br />
In this file you instruct rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-05-26T11:24:25Z<p>Iz0bbz: /* The spec file */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8-9-10 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of May 26, 2009 you'll find aMule v2.2.4 for Fedora 10, v2.23 for Fedora 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Work in progress<br />
<br />
==== The spec file ====<br />
To create amule packages, you need a spec file.<br />
In this file you instruct rpmbuild on how to configure and compile amule - and how to organize the output packages.<br />
<br />
Here follows a (quite complex) example based on aMule 2.2.5 , which builds several packages following the rpmfusion convention.<br />
Please update the spec file your information "Packager" and changing the "Version" row as appropriate.<br />
<br />
<br />
Name: amule<br />
Version: 2.2.5<br />
Release: 1%{?dist}<br />
Summary: File sharing client<br />
License: GPLv2+<br />
Group: Applications/Internet<br />
Source: aMule-%{version}.tar.bz2<br />
Packager: thepackager <thepackager@yourmail.com><br />
URL: http://www.amule.org<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.9, desktop-file-utils<br />
BuildRequires: gettext-devel, flex, bison, GeoIP-devel<br />
BuildRequires: gd-devel >= 2.0.0, libpng-devel<br />
BuildRequires: cryptopp-devel, libupnp-devel<br />
Requires(pre): chkconfig<br />
Requires: %{name}-nogui = %{version}-%{release}<br />
<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
aMule works on Linux, Mac, *BSD and Windows, which makes it the first<br />
multi-platform edonkey network client.<br />
<br />
%package nogui<br />
Summary: aMule components which don't require a GUI (for servers)<br />
Group: Applications/Internet<br />
<br />
%description nogui<br />
This package containes the aMule components which don't require a GUI.<br />
It is useful for servers which don't have Xorg.<br />
<br />
<br />
%package -n xchat-%{name}<br />
Summary: Plugin to display aMule's statistics in XChat<br />
Group: Applications/Internet<br />
Requires: %{name} = %{version}-%{release}<br />
Requires: xchat<br />
<br />
%description -n xchat-%{name}<br />
This plugins allows you to display aMule statistics in XChat<br />
<br />
<br />
%prep<br />
%setup -q -n aMule-%{version}<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--enable-debug \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-xas \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
%{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%find_lang %{name}<br />
# desktop files<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop<br />
<br />
iconv -f ISO-8859-1 -t UTF-8 < src/utils/aLinkCreator/alc.desktop \<br />
> $RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/alc.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/wxcas.desktop<br />
<br />
desktop-file-install --vendor "" \<br />
--delete-original\<br />
--dir $RPM_BUILD_ROOT%{_datadir}/applications\<br />
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}gui.desktop<br />
<br />
%clean<br />
%{__rm} -rf $RPM_BUILD_ROOT<br />
<br />
%files -f %{name}.lang<br />
<br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/aMule-%{version}<br />
%{_bindir}/alc<br />
%{_bindir}/amule<br />
%{_bindir}/wxcas<br />
%{_bindir}/amulegui<br />
%{_datadir}/%{name}/<br />
%{_datadir}/applications/*.desktop<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/man1/alc.1.gz<br />
%{_mandir}/*/man1/alc.1.gz<br />
%{_mandir}/man1/amule.1.gz<br />
%{_mandir}/*/man1/amule.1.gz<br />
%{_mandir}/man1/wxcas.1.gz<br />
%{_mandir}/*/man1/wxcas.1.gz<br />
%{_mandir}/man1/amulegui.1.gz<br />
%{_mandir}/*/man1/amulegui.1.gz<br />
%exclude %{_datadir}/%{name}/webserver<br />
<br />
%files nogui<br />
%{_bindir}/alcc<br />
%{_bindir}/amulecmd<br />
%{_bindir}/amuled<br />
%{_bindir}/amuleweb<br />
%{_bindir}/cas<br />
%{_bindir}/ed2k<br />
%{_datadir}/%{name}/webserver<br />
%{_datadir}/cas<br />
%{_mandir}/man1/alcc.1.gz<br />
%{_mandir}/*/man1/alcc.1.gz<br />
%{_mandir}/man1/amulecmd.1.gz<br />
%{_mandir}/*/man1/amulecmd.1.gz<br />
%{_mandir}/man1/amuled.1.gz<br />
%{_mandir}/*/man1/amuled.1.gz<br />
%{_mandir}/man1/amuleweb.1.gz<br />
%{_mandir}/*/man1/amuleweb.1.gz<br />
%{_mandir}/man1/cas.1.gz<br />
%{_mandir}/*/man1/cas.1.gz<br />
%{_mandir}/man1/ed2k.1.gz<br />
%{_mandir}/*/man1/ed2k.1.gz<br />
<br />
<br />
%files -n xchat-%{name}<br />
%defattr(-,root,root)<br />
%{_bindir}/autostart-xas<br />
%{_libdir}/xchat/plugins/xas.pl<br />
%{_mandir}/man1/xas.1.gz<br />
%{_mandir}/*/man1/xas.1.gz<br />
<br />
<br />
%changelog<br />
* Wed Apr 05 2009 iz0bbz <iz0bbz at libero dot it> <br />
- Updated to aMule 2.2.4<br />
- Fixed dependency between amule and amule-nogui<br />
* Wed Dec 28 2008 iz0bbz <iz0bbz at libero dot it><br />
- Alignment to rpmfusion spec file<br />
- gui/nogui split<br />
<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-05-26T11:05:26Z<p>Iz0bbz: /* Contents */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8-9-10 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of May 26, 2009 you'll find aMule v2.2.4 for Fedora 10, v2.23 for Fedora 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== The usual way: configure/compile/install ===<br />
<br />
==== Configuring your [[aMule]] build ====<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
==== Compiling your [[aMule]] build ====<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
==== Installing your [[aMule]] build ====<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
=== Creating your own RPM packages ===<br />
<br />
Work in progress<br />
<br />
==== The spec file ====<br />
Work in progress<br />
==== Running rpmbuild ====<br />
Work in progress<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-05-26T10:30:10Z<p>Iz0bbz: /* Contents */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8-9-10 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of May 26, 2009 you'll find aMule v2.2.4 for Fedora 10, v2.23 for Fedora 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-05-26T10:29:36Z<p>Iz0bbz: /* Installing via [http://fedoraproject.org/wiki/Tools/yum yum] */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<br />
<font color=red>'''NOTE:</font> as of May 26, 2009 you'll find aMule v2.2.4 for Fedora 10, v2.23 for Fedora 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-17T17:55:40Z<p>Iz0bbz: /* Format (version 2) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 0) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 0 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'' (16 bytes): The contact's [[ID|ClientID]] <br />
*''IP'' (4 bytes): The contact's [[IP address|IP]]<br />
*''UDP Port'' (2 bytes): The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact<br />
*''TCP Port'' (2 bytes): The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact<br />
*''Version'' (1 byte): Kademlia protocol version. '0' means a Kad v1 node, any value > 0 means a Kad v2 node and determines what kind of packets can be sent to a node, what features it supports, etc.<br />
*''KadUDPKey'' (8 bytes): In Kad v2, Sender's 32-bit key (node version >5), bound to the receiver (local) IP . It is used in encrypted communication to verify node validity. <br />
*''Verified'': (1 byte) Any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v0 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 0<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4))<br />
<nowiki>if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 1) : (count,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 0):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx Ver IP address udp tcp kadUDPKey verified'<br />
<br />
for i in xrange(count):<br />
if (version == 0):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHBQB", nodefile.read(34))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
VV = 'Y'<br />
if (verified == 0): VV='N'<br />
print '%4d %3d %-15s %5d %5d %16x %s' % (i, type, ipaddr, udpport, tcpport, kadUDPkey,VV)<br />
<br />
else :<br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-17T17:40:07Z<p>Iz0bbz: /* Format (version 2) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 0) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 0 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'' (16 bytes): The contact's [[ID|ClientID]] <br />
*''IP'' (4 bytes): The contact's [[IP address|IP]]<br />
*''UDP Port'' (2 bytes): The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact<br />
*''TCP Port'' (2 bytes): The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact<br />
*''Version'' (1 byte): Kademlia protocol version. '0' means a Kad v1 node, any value > 0 means a Kad v2 node and determines what kind of packets can be sent to a node, what features it supports, etc.<br />
*''KadUDPKey'' (8 bytes): Sender's 32-bit key used in encrypted communication to verify node validity.<br />
*''Verified'': (1 byte) Any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v0 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 0<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4))<br />
<nowiki>if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 1) : (count,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 0):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx Ver IP address udp tcp kadUDPKey verified'<br />
<br />
for i in xrange(count):<br />
if (version == 0):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHBQB", nodefile.read(34))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
VV = 'Y'<br />
if (verified == 0): VV='N'<br />
print '%4d %3d %-15s %5d %5d %16x %s' % (i, type, ipaddr, udpport, tcpport, kadUDPkey,VV)<br />
<br />
else :<br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-17T11:18:23Z<p>Iz0bbz: /* Format (version 2) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 0) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 0 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''contactVersion'': This indicates the type of the contact<br />
*''KadUDPKey'': 8 bytes<br />
*''Verified'': 1 byte, any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v0 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 0<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4))<br />
<nowiki>if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 1) : (count,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 0):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx Ver IP address udp tcp kadUDPKey verified'<br />
<br />
for i in xrange(count):<br />
if (version == 0):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHBQB", nodefile.read(34))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
VV = 'Y'<br />
if (verified == 0): VV='N'<br />
print '%4d %3d %-15s %5d %5d %16x %s' % (i, type, ipaddr, udpport, tcpport, kadUDPkey,VV)<br />
<br />
else :<br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-17T11:17:05Z<p>Iz0bbz: /* Example of nodes.dat version 1 file */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 0) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 0 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''contactVersion'': This indicates the [[type]] of the contact<br />
*''KadUDPKey'': 8 bytes<br />
*''Verified'': 1 byte, any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v0 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 0<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4))<br />
<nowiki>if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 1) : (count,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 0):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx Ver IP address udp tcp kadUDPKey verified'<br />
<br />
for i in xrange(count):<br />
if (version == 0):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHBQB", nodefile.read(34))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
VV = 'Y'<br />
if (verified == 0): VV='N'<br />
print '%4d %3d %-15s %5d %5d %16x %s' % (i, type, ipaddr, udpport, tcpport, kadUDPkey,VV)<br />
<br />
else :<br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-17T11:16:57Z<p>Iz0bbz: /* Format (version 1) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 0) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''contactVersion'': This indicates the [[type]] of the contact<br />
*''KadUDPKey'': 8 bytes<br />
*''Verified'': 1 byte, any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v0 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 0<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4))<br />
<nowiki>if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 1) : (count,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 0):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx Ver IP address udp tcp kadUDPKey verified'<br />
<br />
for i in xrange(count):<br />
if (version == 0):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHBQB", nodefile.read(34))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
VV = 'Y'<br />
if (verified == 0): VV='N'<br />
print '%4d %3d %-15s %5d %5d %16x %s' % (i, type, ipaddr, udpport, tcpport, kadUDPkey,VV)<br />
<br />
else :<br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-17T11:16:37Z<p>Iz0bbz: /* Script for dumping nodes.dat */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''contactVersion'': This indicates the [[type]] of the contact<br />
*''KadUDPKey'': 8 bytes<br />
*''Verified'': 1 byte, any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v0 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 0<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4))<br />
<nowiki>if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 1) : (count,) = struct.unpack("<I", nodefile.read(4))</nowiki><br />
<nowiki>if (version >= 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 0):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx Ver IP address udp tcp kadUDPKey verified'<br />
<br />
for i in xrange(count):<br />
if (version == 0):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHBQB", nodefile.read(34))<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
VV = 'Y'<br />
if (verified == 0): VV='N'<br />
print '%4d %3d %-15s %5d %5d %16x %s' % (i, type, ipaddr, udpport, tcpport, kadUDPkey,VV)<br />
<br />
else :<br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:36:01Z<p>Iz0bbz: /* Format (version 2) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
Here again, all fields are stored without any separator character. This is done like this because all the fields have a specific size.<br />
<br />
The file begins with 4 bytes storing the null value (hex 0x00000000)<br />
Then follows the fields:<br />
<br />
*''Version number'': value 2 stored in little endian (0x02000000 , 4 bytes) <br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
After specifying the number of contacts that will be listed, the file lists them.<br />
Each contact takes 34 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''contactVersion'': This indicates the [[type]] of the contact<br />
*''KadUDPKey'': 8 bytes<br />
*''Verified'': 1 byte, any value different from 0 states the contact has been verified.<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:26:35Z<p>Iz0bbz: /* Format (version 1) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
This format was used for aMule up to 2.1.3 , and it is no more used<br />
<br />
All fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:25:20Z<p>Iz0bbz: /* Format (version 2) */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
''The following information is valid only for aMule up to 2.1.3<br />
<br />
As you can see, all the fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
This format is used in aMule version 2.2.0 and later.<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:23:53Z<p>Iz0bbz: /* Extra */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
''The following information is valid only for aMule up to 2.1.3<br />
<br />
As you can see, all the fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Format (version 2) ==<br />
<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:02:08Z<p>Iz0bbz: /* Example */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
''The following information is valid only for aMule up to 2.1.3<br />
<br />
As you can see, all the fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
=== Example of nodes.dat version 1 file ===<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:01:10Z<p>Iz0bbz: /* Format */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format (version 1) ==<br />
''The following information is valid only for aMule up to 2.1.3<br />
<br />
As you can see, all the fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Example ==<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T18:00:35Z<p>Iz0bbz: /* Description */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about known [[Kademlia]] [[client]]s (also known as Kad [[node]]s).<br />
<br />
It is used to [[bootstrap]] the Kad network when aMule starts.<br />
<br />
== Format ==<br />
''The following information is valid only for aMule up to 2.1.3. 2.2.0 uses a different format.''<br />
<br />
As you can see, all the fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Example ==<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/Nodes.dat_fileNodes.dat file2009-03-14T17:58:27Z<p>Iz0bbz: /* Script for dumping nodes.dat */</p>
<hr />
<div><center><br />
'''English''' | [[Nodes.dat_file-de|Deutsch]]<br />
</center><br />
<br />
== File ==<br />
'''Name:''' ''nodes.dat''<br />
<br />
'''Location:''' ''~/.aMule/''<br />
<br />
== Description ==<br />
This file stores details about other known [[Kademlia]] [[client]]s (also known as [[node]]s).<br />
<br />
It is usually used to achieve a successful [[bootstrap]] faster.<br />
<br />
A nodes.dat file can be found at http://download.tuxfamily.org/technosalad/utils/nodes.dat to get you connected in the Kad network.<br />
<br />
== Format ==<br />
''The following information is valid only for aMule up to 2.1.3. 2.2.0 uses a different format.''<br />
<br />
As you can see, all the fields are stored without any separator character. This is done like this because all the fields have a specific size:<br />
*''Number of contacts'': Number of contacts that will be listed (4 bytes)<br />
<br />
After specifying the number of contacts that will be listed, the file lists them. Each contact takes 25 bytes, splitted into the following fields:<br />
*''ClientID'': The contact's [[ID|ClientID]] (16 bytes)<br />
*''IP'': The contact's [[IP address|IP]] (4 bytes)<br />
*''UDP Port'': The [http://www.ietf.org/rfc/rfc768.txt UDP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''TCP Port'': The [http://www.ietf.org/rfc/rfc793.txt TCP] [[port]] to [[connect]] to when trying to reach the contact (2 bytes)<br />
*''Type'': This indicates the [[type]] of the contact, which is how much you can be confident on that contact (a scale from ''0'' to ''4'', being ''0'' the best and ''4'' the worst). (1 byte)<br />
<br />
Once this data is put together, it is stored in little-endian.<br />
<br />
== Example ==<br />
The following is a hex dump of an hypothetic ''nodes.dat'' file:<br />
<br />
''0200000012257425DBA4EDDBD097150757404486E55E04DE40123612021F64632587A31EC2FC8566C4A9BAB184E6E9B7D44012361202''<br />
<br />
In the above example, the following data can be seen:<br />
<br />
*Number of contacts: ''2'' (In hex: ''02000000'', remember it's in [[little endian]])<br />
*Contact #1:<br />
**ClientID: ''12257425DBA4EDDBD097150757404486''<br />
**IP: ''222.4.94.229'' (In hex: ''E55E04DE'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
*Contact #2:<br />
**ClientID: ''1F64632587A31EC2FC8566C4A9BAB184''<br />
**IP: ''212.183.233.230'' (In hex: ''E6E9B7D4'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc768.txt UDP] Port: ''1240'' (In hex: ''4012'', remember it's in [[little endian]])<br />
**[http://www.ietf.org/rfc/rfc793.txt TCP] Port: ''1236'' (In hex: ''3612'', remember it's in [[little endian]])<br />
**Type: ''2'' (In hex: ''02'')<br />
<br />
== Extra ==<br />
Since the ''number of contacts'' field is 4 bytes long, the maximum number of [[node]]s you could store in this file is 4294967296 (~4300M), which should be far enough. Anyway, since this number is so big, [[aMule]], [[eMule]] and all clients have hard limitted the amount of contacts that can be stored ([[aMule]]'s hard limit is ''5000'').<br />
<br />
Since ''Type 4'' contacts are those which are marked for deletion, there should never be any ''Type 4'' contact in the ''nodes.dat'' file. If there was, it would just be ignored when reading the file.<br />
<br />
== Script for dumping nodes.dat ==<br />
Here's a python script which can be used for dumping contents of the nodes.dat v1 and v2 files:<br />
<br />
#!/usr/bin/env python<br />
# this code belongs to public domain<br />
<br />
import struct<br />
version = 1<br />
count = 0<br />
<br />
nodefile = open('nodes.dat', 'r')<br />
(count,) = struct.unpack("<I", nodefile.read(4)) <br />
if (count == 0) : (version,) = struct.unpack("<I", nodefile.read(4)) <br />
if (version == 2) : (count,) = struct.unpack("<I", nodefile.read(4)) <br />
<nowiki>if (version > 0 & version < 3) :</nowiki><br />
print 'Nodes.dat file version = %d' %(version)<br />
print 'Node count = %d' %(count)<br />
print ' '<br />
if (version == 1):<br />
print ' idx type IP address udp tcp'<br />
else :<br />
print ' idx type IP address udp tcp'<br />
<br />
for i in xrange(count):<br />
if (version == 1):<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type) = \<br />
struct.unpack("<16s4BHHB", nodefile.read(25))<br />
else :<br />
(clientid, ip1, ip2, ip3, ip4, udpport, tcpport, type, kadUDPkey, verified) = \<br />
struct.unpack("<16s4BHHB8sB", nodefile.read(34))<br />
<br />
ipaddr = '%d.%d.%d.%d' % (ip1, ip2, ip3, ip4)<br />
print '%4d %4d %-15s %5d %5d' % (i, type, ipaddr, udpport, tcpport)<br />
<br />
else : <br />
print 'Cannot handle nodes.dat version %d !' (version)<br />
<br />
nodefile.close()</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-02-14T18:55:11Z<p>Iz0bbz: /* Setting up a compilation environment */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of January 2009, you'll find aMule v2.2.2 for Fedora 10 & 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build redhat-rpm-config</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2009-02-02T10:28:47Z<p>Iz0bbz: /* Installing via [http://fedoraproject.org/wiki/Tools/yum yum] */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of January 2009, you'll find aMule v2.2.2 for Fedora 10 & 9, and the 'old' aMule 2.1.3 version for Fedora 8.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-12-15T16:52:57Z<p>Iz0bbz: /* Installing user-contributed RPM packages */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of December 2008, you'll find aMule v2.2.x for Fedora 10, and the 'old' aMule 2.1.3 version for Fedora 8 & 9.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum --nogpgcheck localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-12-09T14:24:04Z<p>Iz0bbz: /* Downloading & compiling crypto++ */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of December 2008, you'll find aMule v2.2.x for Fedora 10, and the 'old' aMule 2.1.3 version for Fedora 8 & 9.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process.<br />
<br />
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.<br />
<br />
On Fedora 8 and below, or if you want to compile crypto++ libraries yourself for whatever reasons, here follows the steps required.<br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at December 2008).<br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-12-09T14:20:31Z<p>Iz0bbz: /* Setting up a compilation environment */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of December 2008, you'll find aMule v2.2.x for Fedora 10, and the 'old' aMule 2.1.3 version for Fedora 8 & 9.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
<br />
Starting since Fedora 9, you can find crypto++ libraries too, and then you can add a :<br />
<code>yum install 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><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-12-09T14:02:23Z<p>Iz0bbz: /* Installing user-contributed RPM packages */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of December 2008, you'll find aMule v2.2.x for Fedora 10, and the 'old' aMule 2.1.3 version for Fedora 8 & 9.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum localinstall <your-amule-RPM-package></code><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
Note: many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-12-09T13:59:41Z<p>Iz0bbz: /* Installing user-contributed RPM packages */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of December 2008, you'll find aMule v2.2.x for Fedora 10, and the 'old' aMule 2.1.3 version for Fedora 8 & 9.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
Having a working internet connection, download the amule packages, become 'root' user and do a :<br><br />
<br />
<code>yum localinstall <your-amule-RPM-package><br><br />
<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.<br />
<br />
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><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
Note: many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-12-09T13:54:31Z<p>Iz0bbz: /* Installing via [http://fedoraproject.org/wiki/Tools/yum yum] */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
aMule is not included by default in official fedora repositories.<br />
<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpmfusion.org Rpmfusion] free packages repository includes the amule package.<br><br />
<font color=red>'''NOTE:</font> as of December 2008, you'll find aMule v2.2.x for Fedora 10, and the 'old' aMule 2.1.3 version for Fedora 8 & 9.'''<br><br />
<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><br />
<br />
<code>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm</code><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP zlib libpng gd</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
Note: many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-10-29T18:32:26Z<p>Iz0bbz: /* Downloading & compiling crypto++ */</p>
<hr />
<div><h1>aMule in Fedora</h1> <br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.x<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP zlib libpng gd</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br><br />
Note: many other packages are installed by yum together with the ones above, due to dependencies. That's regular.<br><br><br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
<br />
Hint:<br><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><br />
<code>CXXFLAGS = -DNDEBUG -g -O2</code><br><br />
to<br><br />
<code>CXXFLAGS = -DNDEBUG -g -O0 -DCRYPTOPP_DISABLE_X86ASM</code><br><br />
and then recompile / test your crypto++ build again as written above.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.<br />
<br />
=Creating RPMs for RHEL 5 (CentOS 5)=<br />
==Prerequisites==<br />
# Working rpmforge repository.<br />
# Source packages for wxGTK and compat-wxGTK26 gotten from FC9 repositories.<br />
# Installed libcrypto++ (and headers).<br />
# Installed and updated version of flex (2.5.35 for example)<br />
# amule-2.2.1 SPEC file.<br />
# amule-2.2.1 sources.<br />
# Working rpmbuild tools (and compilers and all the packages needed and listed in this page).<br />
<br />
==Steps==<br />
===Configure rpmforge repository===<br />
If you hasn't it, see the how to here: https://rpmrepo.org/RPMforge/Using and install it.<br />
I don't use "atrpms" repository, rpmforge packages appears to be more stable than atrpms ones.<br />
<br />
===Install wxGTK 2.8.x===<br />
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.<br />
<br />
If you has any wxGTK 2.6 dependences, you'll need compat-wxGTK26 package too.<br />
<br />
===Install libcrypto++===<br />
You can install libcrypto from scratch (no problem) as explained below for FC or you can package it (a bit work).<br />
<br />
To package it for CentOS 5, use this SPEC file:<br />
Name: libcrypto++<br />
Version: 5.5.2<br />
Release: 1_ArcosCom<br />
<br />
Summary: Crypto++: a C++ Class Library of Cryptographic Primitives<br />
License: BSD-like<br />
Group: System/Libraries<br />
Url: http://www.cryptopp.com<br />
Packager: Andrey Semenov <mitrofan@altlinux.ru><br />
<br />
Source: crypto-%version.tar.bz2<br />
<br />
# Automatically added by buildreq on Sat May 15 2004<br />
BuildRequires: gcc-c++ libstdc++-devel<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)<br />
<br />
%description<br />
Crypto++: a C++ Class Library of Cryptographic Primitives<br />
<br />
%package -n %name-devel<br />
Summary: Development files for libcrypto<br />
Group: Development/C<br />
PreReq: %name = %version-%release<br />
License: Compilation Copyright (c) 1995-2003 by Wei Dai. All rights reserved.<br />
<br />
%description -n %name-devel<br />
This package contains development files required for packaging<br />
libcrypto-based software.<br />
<br />
%prep<br />
%setup -q -n crypto-%version<br />
<br />
%build<br />
make -f GNUmakefile<br />
<br />
%install<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__cp *.h ${RPM_BUILD_ROOT}%_includedir/cryptopp<br />
%__mkdir_p ${RPM_BUILD_ROOT}%_libdir<br />
%__cp libcryptopp.a ${RPM_BUILD_ROOT}%_libdir<br />
<br />
%post -n %name -p /sbin/ldconfig<br />
<br />
%postun -n %name -p /sbin/ldconfig<br />
<br />
%files -n %name<br />
%doc Readme.txt License.txt<br />
%_libdir/*.a<br />
<br />
%files -n %name-devel<br />
%_includedir/cryptopp<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 5.5.2-1_ArcosCom<br />
- Updated to 5.5.2<br />
- Rebuild for CentOS 5.2<br />
<br />
* Tue Aug 03 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.2.1-alt1<br />
- fix realese<br />
<br />
* Tue May 11 2004 Andrey Semenov <mitrofan@altlinux.ru> 5.1-alt1<br />
- First version of RPM package<br />
<br />
You'll need a tar.bz2, not a zip file as you download from http://www.cryptopp.com/#download, to make it do:<br />
# wget http://www.cryptopp.com/cryptopp552.zip<br />
# mkdir crypto-5.5.2<br />
# cd crypto-5.5.2<br />
# unzip ../cryptopp552.zip<br />
# cd ..<br />
# tar -cf crypto-5.5.2.tar crypto-5.5.2/<br />
# bzip2 crypto-5.5.2.tar<br />
<br />
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:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/libcrypto++.spec<br />
<br />
And install it (and the devel one) as root:<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++.i386.rpm<br />
# sudo rpm -ihv ~/rpmbuild/RPMS/i386/libcrypto++-devel.i386.rpm<br />
<br />
===Upgrade flex===<br />
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.<br />
<br />
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.<br />
<br />
Go to you ~/rpmbuild/SOURCES and download a recent flex version:<br />
# wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download<br />
<br />
Download your flex 2.5.4a source package too, to get an initial SPEC file and the patches:<br />
# cd ~/rpmbuild/SRPMS<br />
# wget http://mirror.centos.org/centos/5/os/SRPMS/flex-2.5.4a-41.fc6.src.rpm<br />
# rpm -ihv flex-2.5.4a-41.fc6.src.rpm<br />
<br />
Now you will have an initial SPEC file in ~/rpmbuild/SPECS and you can edit it to change into this one:<br />
Summary: A tool for creating scanners (text pattern recognizers).<br />
Name: flex<br />
Version: 2.5.35<br />
Release: 1_ArcosCom%{?dist}<br />
License: BSD<br />
Group: Development/Tools<br />
URL: http://www.gnu.org/software/flex/<br />
BuildRoot: %{_tmppath}/%{name}-root<br />
Source: %{name}-%{version}.tar.bz2<br />
Patch0: flex-2.5.4a-skel.patch<br />
Patch1: flex-2.5.4-glibc22.patch<br />
Patch2: flex-2.5.4a-gcc3.patch<br />
Patch3: flex-2.5.4a-gcc31.patch<br />
Patch4: flex-2.5.4a2.patch<br />
Patch5: flex-pic.patch<br />
Patch6: flex-2.5.4a2-std.patch<br />
Patch7: flex-2.5.4a2-warn.patch<br />
Patch8: flex-2.5.4a2-shapwarn.patch<br />
Patch9: flex-2.5.4a2-iniscan.patch<br />
Patch10: flex-2.5.4a-Makefile.in.patch<br />
#Patch11: flex-2.5.4a-posix.patch<br />
BuildRequires: autoconf, byacc<br />
<br />
%description<br />
The flex program generates scanners. Scanners are programs which can<br />
recognize lexical patterns in text. Flex takes pairs of regular<br />
expressions and C code as input and generates a C source file as<br />
output. The output file is compiled and linked with a library to<br />
produce an executable. The executable searches through its input for<br />
occurrences of the regular expressions. When a match is found, it<br />
executes the corresponding C code. Flex was designed to work with<br />
both Yacc and Bison, and is used by many programs as part of their<br />
build process.<br />
<br />
You should install flex if you are going to use your system for<br />
application development.<br />
<br />
%prep<br />
%setup -q -n %{name}-%{version}<br />
%patch0 -p1<br />
#%patch1 -p1 -b .glibc22<br />
#%patch2 -p1 -b .glib3<br />
#%patch3 -p1 -b .gcc31<br />
#%patch4 -p1 -b .yynoinput<br />
#%patch5 -p1 -b .pic<br />
#%patch6 -p1 -b .std<br />
#%patch7 -p1 -b .warn<br />
#%patch8 -p1 -b .shapwarn<br />
#%patch9 -p1 -b .iniscan<br />
#%patch10 -p1<br />
#%patch11 -p1<br />
<br />
%build<br />
autoconf<br />
%configure<br />
make<br />
<br />
%install<br />
rm -rf $RPM_BUILD_ROOT<br />
<br />
%makeinstall mandir=$RPM_BUILD_ROOT/%{_mandir}/man1<br />
<br />
( cd ${RPM_BUILD_ROOT}<br />
ln -sf flex .%{_bindir}/lex<br />
ln -s flex.1 .%{_mandir}/man1/lex.1<br />
ln -s flex.1 .%{_mandir}/man1/flex++.1<br />
ln -s libfl.a .%{_libdir}/libl.a<br />
)<br />
<br />
%check<br />
echo ============TESTING===============<br />
#make bigcheck<br />
echo ============END TESTING===========<br />
<br />
%clean<br />
rm -rf ${RPM_BUILD_ROOT}<br />
<br />
%files<br />
%defattr(-,root,root)<br />
%doc COPYING NEWS README<br />
%{_bindir}/*<br />
%{_mandir}/man1/*<br />
%{_libdir}/*.a<br />
%{_includedir}/FlexLexer.h<br />
%{_datadir}/info/dir<br />
%{_datadir}/info/flex.info-1.gz<br />
%{_datadir}/info/flex.info-2.gz<br />
%{_datadir}/info/flex.info.gz<br />
%{_datadir}/locale/ca/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/da/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/de/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/es/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/fr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ga/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ko/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/nl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pl/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/pt_BR/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ro/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/ru/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/sv/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/tr/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/vi/LC_MESSAGES/flex.mo<br />
%{_datadir}/locale/zh_CN/LC_MESSAGES/flex.mo<br />
<br />
%changelog<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.5.35-1_ArcosCom<br />
- Updated to 2.5.35<br />
<br />
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41<br />
- Reverting posix patch. Imposing posix because of warning is too<br />
much of a restriction.<br />
<br />
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40<br />
- using dist tag<br />
<br />
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39<br />
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE<br />
to compile without warnings (#195687)<br />
- dropping 183098 test, since the original bug was already resolved<br />
<br />
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1<br />
- rebuild<br />
<br />
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38<br />
- Caught the real cause of #183098. It failed because the parser<br />
built with `flex -f' *sometimes* made it into the final package, and<br />
-f assumes seven-bit tables. Solution has two steps. Move `make<br />
bigcheck' to `%%check' part, where it belongs anyway, so that flexes<br />
built during `make bigcheck' don't overwrite original build. And<br />
change makefile so that `make bigcheck' will *always* execute *all*<br />
check commands.<br />
<br />
* Wed Mar 8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4<br />
- adding test for #183098 into build process<br />
<br />
* Fri Mar 2 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3<br />
- rebuilt, no changes inside. In hunt for #183098<br />
<br />
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2<br />
- bump again for double-long bug on ppc(64)<br />
<br />
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1<br />
- rebuilt for new gcc4.1 snapshot and glibc changes<br />
<br />
* Wed Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37<br />
- adding `make bigcheck' into build process. Refreshing initscan.c to<br />
make this possible.<br />
<br />
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36<br />
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes<br />
and better way to silent warnings under gcc.<br />
<br />
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35<br />
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)<br />
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)<br />
- Adding URL of flex home page to spec (#142675)<br />
<br />
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com><br />
- rebuild with 'flex-pic.patch' to enable -pie links<br />
on x86_64 (patch from Jesse Keating) .<br />
<br />
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com><br />
- rebuilt<br />
<br />
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34<br />
- rebuilt with GCC 4<br />
- add %%check script<br />
<br />
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33<br />
- #116407 BR byacc<br />
<br />
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com><br />
- rebuilt<br />
<br />
* Wed Jan 22 2003 Tim Powers <timp@redhat.com><br />
- rebuilt<br />
<br />
* Tue Jan 7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28<br />
- don't include -debuginfo files in package.<br />
<br />
* Mon Nov 4 2002 Than Ngo <than@redhat.com> 2.5.4a-27<br />
- YY_NO_INPUT patch from Jean Marie<br />
<br />
* Fri Jun 21 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25<br />
- don't forcibly strip binaries<br />
<br />
* Thu May 23 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Apr 2 2002 Than Ngo <than@redhat.com> 2.5.4a-23<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22<br />
- rebuild in new enviroment<br />
<br />
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21<br />
- More ISO C++ 98 fixes (#59670)<br />
<br />
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20<br />
- Fix ISO C++ 98 compliance (#59670)<br />
<br />
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19<br />
- fixed #58643<br />
<br />
* Wed Jan 09 2002 Tim Powers <timp@redhat.com><br />
- automated rebuild<br />
<br />
* Tue Nov 6 2001 Than Ngo <than@redhat.com> 2.5.4a-17<br />
- fixed for working with gcc 3 (bug #55778)<br />
<br />
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16<br />
- fix wrong License (bug #54574)<br />
<br />
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com><br />
- Bump release + rebuild.<br />
<br />
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com><br />
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)<br />
This broke, among other things, the kdelibs 2.0 build<br />
- Fix source URL<br />
<br />
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com><br />
- FHS packaging (64bit systems need to use libdir).<br />
<br />
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com><br />
- automatic rebuild<br />
<br />
* Tue Jun 6 2000 Bill Nottingham <notting@redhat.com><br />
- rebuild, FHS stuff.<br />
<br />
* Thu Feb 3 2000 Bill Nottingham <notting@redhat.com><br />
- handle compressed man pages<br />
<br />
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com><br />
- add a libl.a link to libfl.a<br />
<br />
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com><br />
- avoid uninitialized variable warning (Erez Zadok).<br />
<br />
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> <br />
- auto rebuild in the new build environment (release 6)<br />
<br />
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com><br />
- build for 6.0 tree<br />
<br />
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com><br />
- build root<br />
<br />
* Mon Apr 27 1998 Prospector System <bugs@redhat.com><br />
- translations modified for de, fr, tr<br />
<br />
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com><br />
- updated from 2.5.4 to 2.5.4a<br />
<br />
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com><br />
- built against glibc<br />
<br />
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com><br />
- Updated to v. 2.5.4<br />
<br />
The changes against the oficial SPEC were:<br />
#) Added comments for the don't needed patches.<br />
#) Comment the test step.<br />
#) Upgrade the version and release.<br />
#) Don't remember more.<br />
<br />
Build your flex package:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/flex.spec<br />
<br />
Update/install your flex binary package:<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for update)<br />
# rpm -ihv --force ~/rpmbuild/RPMS/i386/flex-2.5.35.i386.rpm (for install)<br />
<br />
Warning: some files are overwriten installing/updating flex, that is the "--force" parameter presence.<br />
# rpm -Uhv --force ~/rpmbuild/RPMS/i386/flex-2.5.35-1_ArcosCom.i386.rpm <br />
Preparing... ########################################### [100%]<br />
1:flex warning: /usr/share/info/dir saved as /usr/share/info/dir.rpmsave<br />
########################################### [100%]<br />
<br />
===Upgrade/Install aMule-2.2.1===<br />
# Download aMule-2.2.1.tar.bz2 into your ~/rpmbuild/SOURCES directory.<br />
# Use this SPEC file (create into your ~/rpmbuild/SPECS directory):<br />
Summary: aMule - another eMule p2p client<br />
Name: amule<br />
Version: 2.2.1<br />
Release: 1_ArcosCom<br />
License: GPL<br />
Group: Applications/Internet<br />
Packager: The aMule Team (http://forum.amule.org/)<br />
Vendor: The aMule Project<br />
URL: http://www.amule.org/<br />
Source: aMule-%{version}.tar.bz2<br />
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root<br />
#BuildRoot: /usr/src/redhat/BUILDROOT/%{name}-%{version}-%{release}-root<br />
BuildRequires: wxGTK-devel >= 2.8.0<br />
BuildRequires: gettext-devel, bison, GeoIP-devel<br />
BuildRequires: libcrypto++-devel >= 5.1.0<br />
BuildRequires: flex >= 2.5.33<br />
Requires: libcrypto++ >= 5.1.0<br />
<br />
%description<br />
aMule is a peer to peer file sharing client, based on the well known eMule.<br />
Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it<br />
the first multi-platform edonkey network client.<br />
<br />
%prep<br />
%setup -q -n aMule-2.2.1<br />
<br />
%build<br />
%configure \<br />
--prefix=/usr \<br />
--with-denoise-level=4 \<br />
--enable-optimize \<br />
--disable-debug \<br />
--enable-cas \<br />
--enable-wxcas \<br />
--enable-alc \<br />
--enable-alcc \<br />
--enable-amulecmd \<br />
--enable-amule-daemon \<br />
--enable-amule-gui \<br />
--enable-geoip \<br />
--enable-webserver \<br />
--enable-verbose \<br />
--disable-ccache<br />
<br />
%{__make}<br />
<br />
%install<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT _docs<br />
%{__make} install DESTDIR=$RPM_BUILD_ROOT<br />
<br />
%clean<br />
[ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf "$RPM_BUILD_ROOT"<br />
<br />
%files <br />
%defattr(-,root,root)<br />
%doc %{_datadir}/doc/*<br />
%{_bindir}/*<br />
%{_libdir}/*<br />
%{_datadir}/*<br />
%{_datadir}/applications/*<br />
%{_datadir}/amule/*<br />
%{_datadir}/locale/*<br />
%{_datadir}/pixmaps/*<br />
%{_mandir}/*<br />
<br />
%changelog<br />
<br />
* Sat Jul 19 2008 Samuel Díaz García <samueldg@arcoscom.com> 2.2.1-1_ArcosCom<br />
- Rebuild for CentOS 5.2.<br />
<br />
* Tue Jun 13 2008 iz0bbz 1.1.2-1<br />
- Initial version<br />
<br />
Thanks to iz0bbz for the initial version of this SPEC.<br />
# Build your binary and source packages:<br />
# rpmbuild -ba ~/rpmbuild/SPECS/amule-2.2.1_ArcosCom.spec<br />
# Install (or update) as root:<br />
# rpm -ihv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for install)<br />
# rpm -Uhv /rpmbuild/RPMS/i386/amule-2.2.1_ArcosCom.i386.spec (for update)<br />
<br />
#Enjoy!!<br />
<br />
==Notes==<br />
# You can download the packages from FC9 repository (or livna ones) and use them instead build the binaries from sources.<br />
# rpmforge is for RHEL 5 as livna is for FC8/9.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-07-07T08:17:11Z<p>Iz0bbz: /* Setting up a compilation environment */</p>
<hr />
<div><br />
<br />
<h1>aMule in Fedora</h1> <br />
rev 0.1 by [[User:bootstrap|bootstrap]] <br><br />
rev 0.9 by iz0bbz, June 2008<br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.1<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP zlib libpng gd</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<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</code> <br><br />
<br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-06-30T17:55:35Z<p>Iz0bbz: /* Contents */</p>
<hr />
<div><br />
<br />
<h1>aMule in Fedora</h1> <br />
rev 0.1 by [[User:bootstrap|bootstrap]] <br><br />
rev 0.9 by iz0bbz, June 2008<br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.1<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP zlib libpng gd</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<br />
<code>yum install gcc gcc-c++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel zlib-devel libpng-devel gd-devel</code> <br><br />
<br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-06-27T10:43:46Z<p>Iz0bbz: /* Setting up a compilation environment */</p>
<hr />
<div><br />
<br />
<h1>aMule in Fedora</h1> <br />
rev 0.1 by [[User:bootstrap|bootstrap]] <br><br />
rev 0.9 by iz0bbz, June 2008 - <font color=red>WORK in PROGRESS</font><br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.1<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP zlib libpng gd</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<br />
<code>yum install gcc gcc-c++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel zlib-devel libpng-devel gd-devel</code> <br><br />
<br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-06-27T10:43:08Z<p>Iz0bbz: /* Installing user-contributed RPM packages */</p>
<hr />
<div><br />
<br />
<h1>aMule in Fedora</h1> <br />
rev 0.1 by [[User:bootstrap|bootstrap]] <br><br />
rev 0.9 by iz0bbz, June 2008 - <font color=red>WORK in PROGRESS</font><br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.1<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP zlib libpng gd</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<br />
<code>yum install gcc gcc-c++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel</code> <br><br />
<br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-06-27T08:40:29Z<p>Iz0bbz: /* Setting up a compilation environment */</p>
<hr />
<div><br />
<br />
<h1>aMule in Fedora</h1> <br />
rev 0.1 by [[User:bootstrap|bootstrap]] <br><br />
rev 0.9 by iz0bbz, June 2008 - <font color=red>WORK in PROGRESS</font><br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.1<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<br />
<code>yum install gcc gcc-c++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel</code> <br><br />
<br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.</div>Iz0bbzhttp://wiki.amule.org/wiki/HowTo_Compile_In_RedHat-FedoraHowTo Compile In RedHat-Fedora2008-06-27T08:36:15Z<p>Iz0bbz: /* Configuring your aMule build */</p>
<hr />
<div><br />
<br />
<h1>aMule in Fedora</h1> <br />
rev 0.1 by [[User:bootstrap|bootstrap]] <br><br />
rev 0.9 by iz0bbz, June 2008 - <font color=red>WORK in PROGRESS</font><br />
<br />
== Contents ==<br />
<br />
This page explains how to get a working [[aMule]] installation on [http://www.fedoraproject.org Fedora] distributions.<br><br />
<br />
It covers installing by pre-compiled [http://www.rpm.org RPM] packages as well as building from sources.<br><br />
<br />
It applies to Fedora 8 and 9 distributions, and aMule v2.2.1<br />
<br />
== Installing pre-compiled packages ==<br />
<br />
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><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><br />
<br />
<br />
=== Installing via [http://fedoraproject.org/wiki/Tools/yum yum] ===<br />
<br />
Amule is not included by default in official fedora repositories.<br />
But it can be installed and automatically updated adding additional, external repositories to your Fedora system.<br><br />
<br />
[http://rpm.livna.org Livna] or [http://freshrpms.net freshrpms] are known to include the amule package in their repository.<br><br />
<font color=red>'''IMPORTANT NOTE: currently (June 2008) the 'old' amule 2.1.x versions only are available.'''<br></font><br />
<br />
You must first configure your Fedora system to use the external repositories. This is usually done manually installing a rpm, there are instructions available at repositories home page. For example, for [http://rpm.livna.org livna] you have to download:<br><br />
<br />
:http://rpm.livna.org/livna-release-9.rpm (for Fedora 9) <br><br />
:or <br><br />
:http://rpm.livna.org/livna-release-8.rpm (for Fedora 8) <br><br />
<br />
and then install it typing <code>"rpm -i livna-release-x.rpm"</code> as root.<br><br />
<br />
Then, you can install amule simply with:<br><br />
<br />
<code>yum install amule</code><br><br />
<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><br />
<br />
That's it ! Now you can just run 'amule' !<br><br />
<br />
=== Installing user-contributed RPM packages ===<br />
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><br />
<br />
You need to install (if not already done)some libraries in order for amule to run.<br />
Having a working internet connection, become 'root' user and do a :<br><br />
<br />
<code>yum install wxGTK gettext GeoIP</code><br><br />
<br />
and then you can install the RPM package via a:<br><br />
<br />
<code>rpm -i <your-amule-RPM-package></code><br><br />
<br />
If there are other libraries still missing, rpm will warn you about the dependencies needed and stops the installation process. In that case you need to find out and install the missing libraries and repeat the command.<br><br />
<br />
If everything goes fine, drop your root privileges and run amule ... buttons are now present on your Gnome Desktop menus; alternatively, just run "<code>amule &</code>" in a shell.<br><br />
<br />
== Compiling & installing amule from sources ==<br />
<br />
The "do-it-yourself" section ... <br />
<br />
=== Setting up a compilation environment ===<br />
<br />
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><br />
<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><br />
<br />
<code>yum update</code> <br><br />
<br />
Then, in order to compile amule sources, you need to install on your Fedora system much more packages than a regular user.<br><br />
<br />
You need the C / C++ compiler, wxWidgets development libraries, crypto++ libraries and a few spare others.<br><br />
<br />
Here again, yum helps us:<br><br />
<br />
<code>yum install gcc gcc-g++ make bison flex binutils-devel gettext-devel GeoIP-devel wxGTK-devel</code> <br><br />
<br />
If you want to build your own amule rpm package, you need also:<br><br />
<br />
<code>yum install rpm-build</code/><br><br />
<br />
=== Downloading & compiling crypto++ ===<br />
<br />
[http://www.cryptopp.com crypto++] is a cryptographic library needed by amule compilation process. You won't find it on standard repositories, so you need to compile and install it yourself.<br><br />
<br />
Download latest crypto++ sources from http://www.cryptopp.com (version 5.5.2 at June 2008)<br><br />
<br />
Unzip crypto++ sources in a directory, open a shell and change directory on it.<br><br />
Then get root privileges and type:<br><br><br />
<code>make</code><br><br />
<code>make install</code><br><br />
<code>ldconfig</code><br><br><br />
The make process will produce two files, libcryptopp.a (this is the static library used by amule) and cryptest.exe. <br><br />
In order to validate your crypto++ build , you '''must''' run "<code>cryptest.exe v</code>" and check if all tests are passed.<br />
<br />
=== Configuring your [[aMule]] build ===<br />
<br />
Unzip aMule source file in the current directory with:<br><br />
<br />
<code>tar -xvjf amule-''x.y.z''.tar.bz2</code><br />
<br />
Change into the [[aMule]] sources directory created by the untar operation and type :<br><br />
<br />
<code>./configure --prefix=/usr --enable-optimize --disable-ccache --disable-debug --enable-geoip --enable-webserver</code> <br><br />
<br />
or, if you want to compile almost everything (including the amule daemon and all companion tools), you can prefer a <br />
<br />
<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><br />
<br />
(You may want to check the [[configure|configure article]] to understand switches meaning and eventually try different configurations.)<br><br />
<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><br />
<br />
=== Compiling your [[aMule]] build ===<br />
<br />
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><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><br />
If it's still not working, ask someone at the amule forum for help.<br />
<br />
If your build completed without error you're nearly done.<br />
<br />
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><br />
<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.<br />
<br />
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.<br />
<br />
== Suggestions ==<br />
<br />
This section is quite small (at the time of this writing) and contains some tips regarding [[aMule]] usage.<br />
<br />
: * 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.<br />
<br />
: * 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.<br />
<br />
== Additional fun ==<br />
<br />
<font color=red>This section needs to be updated</font><br><br />
<br />
This section covers additional ways to have fun with or around [[aMule]].<br />
<br />
[http://www.uk.research.att.com/vnc VNC] Server. Did you ever think about using [[aMule]] on your server? If you don't like webservers and want to have more access to your system but a limited web GUI, this info is for you.<br />
<br />
Using [[aMule]] in [http://www.uk.research.att.com/vnc VNC] is quite easy in [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora], because you don't need more than a simple [http://www.rpm.com RPM] install <!-- "install" should be a link to part 5 --> of vnc-server and a minor modification to a startup script.<br />
<br />
Just install vnc-server ([http://www.rpm.org RPM] comes with your installation CDs) and drop your root privileges<!-- "root privileges" should be a link to part 3 -->.<br />
This howto assumes that your default user is named ''bob''.<br />
As 'bob' do: ''vncserver -depth 16 :1''. If you never used [http://www.uk.research.att.com/vnc VNC] as 'bob' before, the [http://www.uk.research.att.com/vnc VNC] server should ask you for a password. This password is used to connect to your [http://www.uk.research.att.com/vnc VNC] session. It is ''not'' the password your user 'bob' has and it should not be set to the same password. Furthermore your [http://www.uk.research.att.com/vnc VNC] password can be only 8 letters/digits long, so you really should not set your users pw here.<br />
The next step would be to test if your server is running as expected. Use you desktop or any other remote system to connect to your [http://www.uk.research.att.com/vnc VNC] session. To make sure you get the right port, use the following syntax: ''pizza:1'' or ''192.168.100.1'' assuming your server is named pizza and your [http://www.dns.net/dnsrd DNS] is running, or your server is running on the [http://www.faqs.org/rfcs/rfc791.html IP] 192.168.100.1 - if not, change the values to your needs.<br />
Once your connection is up, you should be watching a very simple and nearly ugly desktop by now (i'm pretty sure the [http://www.plig.org/xwinman/vtwm.html twm] folks will kill me if they read this... sorry guys). This is because the default setting is to start only a little set of applications and a small window manager inside [http://www.uk.research.att.com/vnc VNC]. Go back to your shell and stop [http://www.uk.research.att.com/vnc VNC] using ''vncserver -kill :1'' as 'bob'. Now your [http://www.uk.research.att.com/vnc VNC] server should immediatly go offline. As next step edit ''/home/bob/.vnc/xstartup'' - uncomment the two lines below ''"Uncomment the following two lines for a normal desktop"'' and comment the rest. If you now start your [http://www.uk.research.att.com/vnc VNC] server again, you will have a fully functional [http://www.redhat.com RedHat]/[http://fedora.redhat.com Fedora] desktop. Now open a shell or use your window manager to start [[aMule]] and enjoy. One last hint: [http://www.uk.research.att.com/vnc VNC] uses encryption and timeouts to protect your password, but it's not perfectly secure. To get an even more secure system, I'd recommend using a screensaver on your newly created desktop. If you're using [http://www.kde.org KDE] you should have a nice button on your taskbar already. That should protect your system, even if your [http://www.uk.research.att.com/vnc VNC] password has been compromised.<br />
<br />
To get the VNC server to launch when the machine boots, you can add the following to the end of <code>/etc/rc.d/rc.local</code><br />
<br />
<code>su username -c vncserver</code><br />
<br />
(replace username with the name of the user who'll be running all this.)<br />
<br />
== How to use [http://www.rpm.org RPM] ==<br />
<br />
There are several how to's on [http://www.rpm.org RPM] available so I won't try to write a new one. Here are some short hints to help you out in case you're completely new to your system and just want to follow the [[aMule]] installation from part 2.<br />
<br />
Install: ''rpm -i rpmname'' (use the complete filename of your [http://www.rpm.org RPM], like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
Remove: ''rpm -e rpmname'' (don't use the complete filename here, just the package name. Like ''openssl'', but not ''openssl-0.9.7a-35'')<br />
<br />
Update: ''rpm -U rpmname'' (use the complete filename of your rpm, like: ''openssl-0.9.7a-35.i386.rpm'')<br />
<br />
If you need any further info on [http://www.rpm.org RPM], please consult the rpm howto or use ''[http://www.rpm.org/max-rpm/rpm.8.html man rpm]''.</div>Iz0bbz