Summary: A wrapper library for PKCS#11 Name: pakchois Version: 0.4 Release: 1 License: LGPLv2+ Group: System Environment/Libraries URL: http://www.manyfish.co.uk/pakchois/ Source0: http://www.manyfish.co.uk/pakchois/pakchois-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %define _libdir64 %{_prefix}/lib64 %description pakchois is just another PKCS#11 wrapper library. pakchois aims to provide a thin wrapper over the PKCS#11 interface; offering a modern object-oriented C interface which does not hide any of the underlying interface, and avoids dependencies on any cryptography toolkit. %package devel Summary: Development library and C header files for the pakchois library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel The development library for the pakchois PKCS#11 wrapper library. %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build # The module path used here will pick up opensc, coolkey, and # gnome-keyring, if they are also installed. (the path is not # checked at build time, so those packages do not need to be BRed) %define pkcs11_path %{_libdir}/pkcs11:%{_libdir}/gnome-keyring:%{_libdir} cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static \ --enable-module-path=%{pkcs11_path} make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --enable-module-path=%{pkcs11_path} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so* ( cd ${RPM_BUILD_ROOT} for dir in include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/NEWS 32bit/README %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %{_includedir}/%{name} %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/include/%{name} /usr/lib/*.la /usr/lib64/*.la %changelog * Wed Apr 13 2011 Michael Perzl - 0.4-1 - first version for AIX V5.1 and higher