]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - polarssl/polarssl.nm
grep: Update to 2.17.
[people/ms/ipfire-3.x.git] / polarssl / polarssl.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = polarssl
7 version = 1.2.5
8 release = 2
9
10 groups = System/Libraries
11 url = http://polarssl.org/
12 license = GPLv2+
13 summary = Light-weight cryptographic and SSL/TLS library.
14
15 description
16 PolarSSL is a light-weight open source cryptographic and SSL/TLS
17 library written in C. PolarSSL makes it easy for developers to include
18 cryptographic and SSL/TLS capabilities in their (embedded)
19 applications with as little hassle as possible.
20
21 end
22
23 sources = %{thisapp}-gpl.tgz
24 source_dl = http://polarssl.org/code/releases/
25
26 build
27 requires
28 perl
29 end
30
31 if "%{DISTRO_ARCH}" == "armv7hl"
32 prepare_cmds
33 sed -e "s/define POLARSSL_HAVE_ASM/undef POLARSSL_HAVE_ASM/" \
34 -i include/polarssl/config.h
35 end
36 end
37
38 build
39 # Compile library
40 make SHARED=1 -C library %{PARALLELISMFLAGS}
41 ln -svf libpolarssl.so library/libpolarssl.so.0
42
43 # Compile programs
44 make -C programs %{PARALLELISMFLAGS}
45 end
46
47 test
48 pushd programs
49 make test/selftest
50 LD_LIBRARY_PATH="../library" ./test/selftest
51 popd
52
53 # Don't run the regular test suite because it cannot
54 # be built on ARM.
55 #LD_LIBRARY_PATH="../library" make check
56 end
57
58 install
59 # Install headers
60 mkdir -pv %{BUILDROOT}%{includedir}/polarssl
61 install -v -m 644 include/polarssl/*.h \
62 %{BUILDROOT}%{includedir}/polarssl
63
64 # Install library
65 mkdir -pv %{BUILDROOT}%{libdir}
66 install -v -m 755 library/libpolarssl.so \
67 %{BUILDROOT}%{libdir}/libpolarssl.so.0
68 ln -svf libpolarssl.so.0 %{BUILDROOT}%{libdir}/libpolarssl.so
69
70 # Install programs
71 mkdir -pv %{BUILDROOT}%{bindir}
72 for p in programs/*/*; do
73 if [ -x "${p}" -a ! -d "${p}" ]; then
74 f="polarssl_$(basename ${p})"
75 install -m 755 ${p} %{BUILDROOT}%{bindir}/${f} || exit 1
76 fi
77 done
78 end
79 end
80
81 packages
82 package %{name}
83
84 package %{name}-utils
85 summary = PolarSSL utilities.
86 description = %{summary}
87
88 files
89 %{bindir}
90 end
91 end
92
93 package %{name}-devel
94 template DEVEL
95 end
96
97 package %{name}-debuginfo
98 template DEBUGINFO
99 end
100 end