-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimx-lib-dirbuild.spec
More file actions
executable file
·73 lines (59 loc) · 1.52 KB
/
imx-lib-dirbuild.spec
File metadata and controls
executable file
·73 lines (59 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
%define pfx /opt/freescale/rootfs/%{_target_cpu}
Summary : platform specific unit tests for mxc platform
Name : imx-lib-dirbuild
Version : 1
Release : 1
License : GPL/Other
Vendor : Freescale
Packager : Rob Herring
Group : Test
BuildRoot : %{_tmppath}/%{name}
Prefix : %{pfx}
%Description
%{summary}
%Prep
%Build
if [ -z "$PKG_KERNEL_KBUILD_PRECONFIG" ]
then
KERNELDIR="$PWD/../linux"
KBUILD_OUTPUT="$PWD/../linux"
else
KERNELDIR="$PKG_KERNEL_PATH_PRECONFIG"
KBUILD_OUTPUT="$(eval echo ${PKG_KERNEL_KBUILD_PRECONFIG})"
fi
if [ -z "$IMX_LIB_DIR" ]
then
echo IMX_LIB_DIR must be set
exit 1
fi
cd $IMX_LIB_DIR
PLATFORM_UPPER="$(echo $PLATFORM | awk '{print toupper($0)}')"
# Build libraries
INCLUDE="-I$DEV_IMAGE/usr/src/linux/include \
-I$KERNELDIR/drivers/mxc/security/rng/include \
-I$KERNELDIR/drivers/mxc/security/sahara2/include"
make -j1 PLATFORM=$PLATFORM_UPPER INCLUDE="$INCLUDE" all
%Install
if [ -z "$PKG_KERNEL_KBUILD_PRECONFIG" ]
then
KERNELDIR="$PWD/../linux"
KBUILD_OUTPUT="$PWD/../linux"
else
KERNELDIR="$PKG_KERNEL_PATH_PRECONFIG"
KBUILD_OUTPUT="$(eval echo ${PKG_KERNEL_KBUILD_PRECONFIG})"
fi
rm -rf $RPM_BUILD_ROOT
#mkdir -p $RPM_BUILD_ROOT/%{pfx}/unit_tests
if [ -z "$IMX_LIB_DIR" ]
then
echo IMX_LIB_DIR must be set
exit 1
fi
cd $IMX_LIB_DIR
# install libraries and headers
make DEST_DIR=$RPM_BUILD_ROOT/%{pfx} install
%Clean
rm -rf $RPM_BUILD_ROOT
%Files
%defattr(755,root,root)
%{pfx}/*