%define sorev 1 Name: nettle Version: 1.15 Release: 2 Summary: A low-level cryptographic library Group: Development/Libraries License: LGPLv2+ URL: http://www.lysator.liu.se/~nisse/nettle/ Source0: http://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar.gz Source1: http://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar.gz.asc BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gmp-devel >= 4.3.2-1, m4 Requires: /sbin/install-info, info, gmp >= 4.3.2-1 %description Nettle is a cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space. The library is available as 32-bit and 64-bit. %package devel Summary: Development headers for a low-level cryptographic library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Nettle is a cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space. This package contains kernel headers. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q %build # hardcode the shared library search patch export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --disable-shared --enable-static make lib%{name}.a CreateExportList lib%{name}.exp lib%{name}.a ${CC} -qmkshrobj lib%{name}.a -o lib%{name}.so.%{sorev} -bE:lib%{name}.exp -L/opt/freeware/lib -lgmp rm -f lib%{name}.exp lib%{name}.a /usr/bin/ar -rv lib%{name}.a lib%{name}.so.%{sorev} make %{?_smp_mflags} mkdir -p 64 mv lib%{name}.so.%{sorev} 64/ make clean # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --disable-shared --enable-static make lib%{name}.a CreateExportList lib%{name}.exp lib%{name}.a ${CC} -qmkshrobj lib%{name}.a -o lib%{name}.so.%{sorev} -bE:lib%{name}.exp -L/opt/freeware/lib -lgmp rm -f lib%{name}.exp lib%{name}.a /usr/bin/ar -rv lib%{name}.a lib%{name}.so.%{sorev} make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q lib%{name}.a 64/lib%{name}.so.%{sorev} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*.info || : ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog COPYING NEWS README TODO %{_bindir}/* %{_libdir}/lib%{name}.* %{_infodir}/%{name}.info.gz /usr/bin/* /usr/lib/lib%{name}.* %files devel %defattr(-,root,system,-) %doc descore.README nettle.html nettle.pdf COPYING %{_includedir}/%{name} /usr/include/%{name} %changelog * Tue Mar 29 2011 Michael Perzl - 1.15-2 - fixed shared library search path in binaries * Fri Apr 17 2009 Michael Perzl - 1.15-1 - first version for AIX V5.1 and higher