############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = polarssl version = 1.2.5 release = 2 groups = System/Libraries url = http://polarssl.org/ license = GPLv2+ summary = Light-weight cryptographic and SSL/TLS library. description PolarSSL is a light-weight open source cryptographic and SSL/TLS library written in C. PolarSSL makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) applications with as little hassle as possible. end sources = %{thisapp}-gpl.tgz source_dl = http://polarssl.org/code/releases/ build requires perl end if "%{DISTRO_ARCH}" == "armv7hl" prepare_cmds sed -e "s/define POLARSSL_HAVE_ASM/undef POLARSSL_HAVE_ASM/" \ -i include/polarssl/config.h end end build # Compile library make SHARED=1 -C library %{PARALLELISMFLAGS} ln -svf libpolarssl.so library/libpolarssl.so.0 # Compile programs make -C programs %{PARALLELISMFLAGS} end test pushd programs make test/selftest LD_LIBRARY_PATH="../library" ./test/selftest popd # Don't run the regular test suite because it cannot # be built on ARM. #LD_LIBRARY_PATH="../library" make check end install # Install headers mkdir -pv %{BUILDROOT}%{includedir}/polarssl install -v -m 644 include/polarssl/*.h \ %{BUILDROOT}%{includedir}/polarssl # Install library mkdir -pv %{BUILDROOT}%{libdir} install -v -m 755 library/libpolarssl.so \ %{BUILDROOT}%{libdir}/libpolarssl.so.0 ln -svf libpolarssl.so.0 %{BUILDROOT}%{libdir}/libpolarssl.so # Install programs mkdir -pv %{BUILDROOT}%{bindir} for p in programs/*/*; do if [ -x "${p}" -a ! -d "${p}" ]; then f="polarssl_$(basename ${p})" install -m 755 ${p} %{BUILDROOT}%{bindir}/${f} || exit 1 fi done end end packages package %{name} package %{name}-utils summary = PolarSSL utilities. description = %{summary} files %{bindir} end end package %{name}-devel template DEVEL end package %{name}-debuginfo template DEBUGINFO end end