aMule Forum

English => Distro-Specific Packages => Packages for older versions => Topic started by: fombu on February 21, 2008, 08:37:34 PM

Title: cryptopp rpm packages for Fedora 8
Post by: fombu on February 21, 2008, 08:37:34 PM
I've just made rpm packages of cryptopp, cryptopp-devel and cryptopp-progs, in order to compile aMule-CVS (The essential are cryptopp and cryptopp-devel)

You can download it from:
http://www.fombuena.jazztel.es/cryptopp-5.5.2-1.f8.i686.rpm (http://www.fombuena.jazztel.es/cryptopp-5.5.2-1.f8.i686.rpm)
http://www.fombuena.jazztel.es/cryptopp-devel-5.5.2-1.f8.i686.rpm (http://www.fombuena.jazztel.es/cryptopp-devel-5.5.2-1.f8.i686.rpm)
http://www.fombuena.jazztel.es/cryptopp-progs-5.5.2-1.f8.i686.rpm (http://www.fombuena.jazztel.es/cryptopp-progs-5.5.2-1.f8.i686.rpm)
http://www.fombuena.jazztel.es/cryptopp-5.5.2-1.f8.src.rpm (http://www.fombuena.jazztel.es/cryptopp-5.5.2-1.f8.src.rpm)

I hope you will find it useful!

[EDITED 20080310: added new links and x86_64 packages. The i686 packages have no difference but the .src packages has a new patch to compile in x86_64 arch]

http://www.mediafire.com/?dcsjxy1tyel (http://www.mediafire.com/?dcsjxy1tyel) --> cryptopp-5.5.2-2.f8.src.rpm
http://www.mediafire.com/?xyuyddrppta (http://www.mediafire.com/?xyuyddrppta) --> cryptopp-5.5.2-2.f8.i686.rpm
http://www.mediafire.com/?i2wh0mzwvxo (http://www.mediafire.com/?i2wh0mzwvxo) --> cryptopp-devel-5.5.2-2.f8.i686.rpm
http://www.mediafire.com/?t2cn0tjpx2d (http://www.mediafire.com/?t2cn0tjpx2d) --> cryptopp-progs-5.5.2-2.f8.i686.rpm
http://www.mediafire.com/?1cnaflctt7j (http://www.mediafire.com/?1cnaflctt7j) --> cryptopp-5.5.2-2.f8.x86_64.rpm
http://www.mediafire.com/?p0eutrjwf4z (http://www.mediafire.com/?p0eutrjwf4z) --> cryptopp-devel-5.5.2-2.f8.x86_64.rpm
http://www.mediafire.com/?myj3dh3btyv (http://www.mediafire.com/?myj3dh3btyv) --> cryptopp-progs-5.5.2-2.f8.x86_64.rpm
Title: Re: cryptopp rpm packages for Fedora 8
Post by: phoenix on February 22, 2008, 04:59:21 AM
The links do not work for me. Could you please post the spec file?

Cheers!
Title: Re: cryptopp rpm packages for Fedora 8
Post by: lfroen on February 22, 2008, 11:42:10 AM
I suggest you to submit it to Fedora repository. Until then, my advise - link aMule statically to crypto.
Title: Re: cryptopp rpm packages for Fedora 8
Post by: fombu on February 22, 2008, 01:20:25 PM
phoenix, I don't know what's going wrong because I can download the files. Maybe it's a problem of my ISP DNSs, because I had problems accessing to my personal space.
Here you have the .spec and a .patch:

Code: [Select]
%define real_version 552

Summary: Free C++ class library of cryptographic schemes
Name: cryptopp
Version: 5.5.2
Release: 1%{?dist}
License: Public Domain
Group: System Environment/Libraries
URL: http://www.cryptopp.com/
Source: http://prdownloads.sourceforge.net/cryptopp/%{name}%{real_version}.zip
Patch0: %{name}-makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Buildrequires: unzip, dos2unix, gcc-c++

%description
Crypto++ Library is a free C++ class library of cryptographic schemes.
Currently the library consists of the following, some of which are other
people's code, repackaged into classes.

One purpose of Crypto++ is to act as a repository of public domain
(not copyrighted) source code. Although the library is copyrighted as a
compilation, the individual files in it (except for a few exceptions listed
in the license) are in the public domain.


%package devel
Summary: Files for development of applications which will use Crypto++
Group: Development/Libraries
Requires: %{name} = %{version}

%description devel
Crypto++ Library is a free C++ class library of cryptographic schemes.
Currently the library consists of the following, some of which are other
people's code, repackaged into classes.

This package contains the header files and static libraries for Crypto++.


%package progs
Summary: Programs for manipulating Crypto++ routines
Group: Development/Tools
Requires: %{name} = %{version}

%description progs
Crypto++ Library is a free C++ class library of cryptographic schemes.
Currently the library consists of the following, some of which are other
people's code, repackaged into classes.

This package contains programs for manipulating Crypto++ routines.


%prep
%setup -c -n %{name}-%{version}
# All files have ^M end of lines, fix that for the makefile patch to apply
find . -type f -exec dos2unix {} \;
%patch0 -p1


%build
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf %{buildroot}
%makeinstall


%clean
%{__rm} -rf %{buildroot}


%post
/sbin/ldconfig

%postun
/sbin/ldconfig


%files
%defattr(-, root, root, 0755)
%doc License.txt Readme.txt
%{_libdir}/*.a


%files devel
%defattr(-, root, root, 0755)
%{_includedir}/cryptopp/


%files progs
%defattr(-, root, root, 0755)
%{_bindir}/*

%changelog
* Thu Feb 21 2008 Manuel Fombuena <manuel.fombuenazapico [AT] gmail [DOT] com> 5.5.2
- Update to 5.5.2.
- Removed gcc4 and autotols patches.
- Removed optflags replacement.

* Fri Oct 28 2005 Matthias Saou <http://freshrpms.net/> 5.2.1-3
- Include gcc4 patch, and convert all files to UNIX line breaks.

* Tue Nov 16 2004 Matthias Saou <http://freshrpms.net/> 5.2.1-2
- Use optflags, but replace -O? with -O1, since it breaks otherwise.

* Mon Nov 15 2004 Matthias Saou <http://freshrpms.net/> 5.2.1-1
- Update to 5.2.1, with newer patch from Mandrake Cooker.

* Wed May 26 2004 Matthias Saou <http://freshrpms.net/> 5.1-1
- Fedora Core package based on the Mandrake one.

* Mon Mar 01 2004 Lenny Cartier <lenny@mandrakesoft.com> 5.1-1mdk
- from Pierre-Michel Theveny <pmth@free.fr> :
- Fixed problem with broken library (do not use -O2 !)
- Added patch for GNU autotools and libtool support
- Added package progs

* Wed Feb 19 2004 Pierre-Michel Theveny <pmth@free.fr> 5.1-1mdk
- Ported to Mandrake 9.2
- Added shared library

* Tue Feb 18 2004 Ariano Bertacca <ariano@hirnriss.net> 5.1-1
- released libcryptopp-5.1-1
And the cryptopp-makefile.patch, to change PREFIX to prefix in makefile, necessary to work with %makeinstall macro:

Code: [Select]
--- cryptopp/GNUmakefile.o 2008-02-21 18:16:45.000000000 +0100
+++ cryptopp/GNUmakefile 2008-02-21 18:18:17.000000000 +0100
@@ -12,8 +12,8 @@
 ISMINGW = $(shell uname | $(EGREP) -c "MINGW32")
 
 # Default prefix for make install
-ifeq ($(PREFIX),)
-PREFIX = /usr
+ifeq ($(prefix),)
+prefix = /usr
 endif
 
 ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
@@ -108,10 +108,10 @@
  $(RM) cryptest.exe libcryptopp.a $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
 
 install:
- $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
- $(CP) *.h $(PREFIX)/include/cryptopp
- $(CP) *.a $(PREFIX)/lib
- $(CP) *.exe $(PREFIX)/bin
+ $(MKDIR) -p $(prefix)/include/cryptopp $(prefix)/lib $(prefix)/bin
+ $(CP) *.h $(prefix)/include/cryptopp
+ $(CP) *.a $(prefix)/lib
+ $(CP) *.exe $(prefix)/bin
 
 libcryptopp.a: $(LIBOBJS)
  $(AR) $(ARFLAGS) $@ $(LIBOBJS)
Title: Re: cryptopp rpm packages for Fedora 8
Post by: fombu on February 22, 2008, 01:48:31 PM
lfroen, I will investigate how to send the rpm to Fedora repository.
I'm not a developer and I really don't know so much about code, libraries, etc, so maybe my knowledge is not enough to maintain a package of the Fedora Project.
As far as I know, to be approved a package needs at least 3 things: the original code has to be good enough, the packager has to be able to make quality rpms and he has to make regular maintenance of the package.
I'm afraid I'm not good candidate, but I'll try it.
Finally, what do you mean when you say "link aMule statically to crypto"? I did the package because aMule started to complain about missing cryptlib.h a month ago. Is there any way to fix it without installing cryptopp?

Regards.
Title: Re: cryptopp rpm packages for Fedora 8
Post by: wuischke on February 22, 2008, 03:10:44 PM
Try an ldd `which amule` and see if there's any crpyto library inside. Usually it will be linked statically, at least it is when I compile.
Title: Re: cryptopp rpm packages for Fedora 8
Post by: fombu on February 22, 2008, 03:17:29 PM
Ok, I'll try to explain the situation better (my poor English doesn't let me "speak" as I'd like)

I used to make a rpm from aMule CVS.
A month ago, developers of aMule made a significant change: no longer cryptopp libraries needed by aMule are going to be... included? (I don't know what's the correct term).
So, when I tried to make aMule rpm or compile it (which are more or lees the same), configure script stopped the process because of missing cryptlib.h.
Google quickly pointed me in the right direction and I found out cryptopp.com, where I could download cryptopp552.zip.
I tried to find a package with cryptlib.h for Fedora, but the more up to date package I could find was cryptopp-5.2.1 for Fedora 4 made by Freshrpms.
It wasn't the first time I had to deal with a similar situation, because I like to install only rpms if it's possible, so I took the .spec file of that package and adapted it to cryptopp-5.5.2.
When I made cryptopp-5.5.2-1.f8 and cryptopp-devel-5.5.2-1.f8 and installed them in my computer, I was able to compile (make rpm package of) aMule CVS again.
That's all! I don't know what statically linked means or if I did anything wrong in the rpm package. I only wrote the original post for those who want to compile aMule CVS in Fedora 8 without compiling cryptopp. Maybe they are less than two people ;-), but it doesn't matter because the work is done, why don't share it?
I'm sorry for any misunderstood and I hope this time I've made it clear.

Regards.
Title: Re: cryptopp rpm packages for Fedora 8
Post by: GonoszTopi on February 22, 2008, 04:31:37 PM
FYI: Crypto++ 'make' will by default build only a static library. To build a shared library one must execute 'make dll'. However, to use the resulting library on any platform but MSW is quite a good job.
Title: Re: cryptopp rpm packages for Fedora 8
Post by: campnou on February 23, 2008, 07:07:06 AM
 I can't download it. Does any one can mail me the SRC package?
Title: Re: cryptopp rpm packages for Fedora 8
Post by: Festor on February 23, 2008, 09:19:14 AM
Mediafire mirror

http://www.mediafire.com/?dak1k4c1sgw
Title: Re: cryptopp rpm packages for Fedora 8
Post by: fombu on March 10, 2008, 06:01:13 PM
I added new links in my first post because it seems that the original ones aren't working properly.
I also included a new .src and x86_64 packages, because the first one doesn't work in x86_64 arch (different path for libs)