46e3eafa6244e2459efc81c06fd2215870568f9f
[platform/upstream/iotjs.git] / packaging / iotjs01.spec
1 Name: iotjs\r
2 Version: 1.0.0\r
3 Release: 0\r
4 Summary: IoT.js Runtime\r
5 Group: Network & Connectivity \r
6 License: Apache-2.0\r
7 URL: https://www.iotjs.net/\r
8 Source0:    %{name}-%{version}.tar.gz\r
9 Source1001: %{name}.manifest\r
10 \r
11 # Use the official macros that are defined in Project Config (build.tizen.org).\r
12 # https://build.tizen.org/project/prjconf?project=<project_name>\r
13 #  - tizen_version_major 4\r
14 #  - tizen_version_minor 0\r
15 # For backward compatibility. Not needed (always true) in unified environment.\r
16 #  - unified (undefined)\r
17   \r
18 %ifarch arm armv7l\r
19 #BuildRequires: python-accel-armv7l-cross-arm\r
20 #BuildRequires: arm-linux-gnueabi\r
21 #BuildRequires: arm-linux-gnueabi-gcc\r
22 %define __arm__ "arm"\r
23 %define __ARM__ "arm"\r
24 %endif\r
25 %ifarch x86\r
26 %define __X86__ "x86"\r
27 %endif\r
28 %ifarch i686\r
29 %define __I686__ "i686"\r
30 %endif\r
31 %ifarch x86_64\r
32 %define __x86_64 "x86_64"\r
33 %define __X86_64 "x86_64"\r
34 %endif\r
35 %define exe_install_dir %{buildroot}%{_bindir}\r
36 \r
37 %define sysroot_path "--sysroot=~/tizen-studio/platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core/"\r
38 \r
39 #%define ex_install_dir %{buildroot}%{_bindir}\r
40 \r
41 # Default values to be eventually overiden BEFORE or as gbs params:\r
42 # iotjs uses smallcase letter\r
43 %{!?target-arch: %define target-arch arm}\r
44 %{!?target_os: %define target_os tizen}\r
45 %{!?target_board: %define target_board artik10}\r
46 %{!?compile-flag: %define compile-flag %{sysroot_path}}\r
47 #BuildRequires: cross-arm-linux-gnueabi-binutils cross-arm-linux-gnueabi-kernel-headers cross-arm-linux-gnueabi-glibc-headers mpfr-devel gmp-devel mpc-devel\r
48 \r
49 BuildRequires:  python, libcurl-devel\r
50 BuildRequires:  openssl-devel\r
51 BuildRequires:  pkgconfig(glib-2.0)\r
52 BuildRequires:  pkgconfig(dlog)\r
53 #BuildRequires: gcc-arm-linux-gnueabi\r
54 #BuildRequires:  cross-arm-linux-gnueabi-binutils cross-arm-linux-gnueabi-kernel-headers cross-arm-linux-gnueabi-glibc-headers \r
55 #BuildRequires:  cross-arm-binutils\r
56 #BuildRequires:  cross-armv7l-gcc48-icecream-backend\r
57 \r
58 Requires(postun): /sbin/ldconfig\r
59 Requires(post): /sbin/ldconfig\r
60 \r
61 %description\r
62 An open source reference implementation of the Iotjs\r
63 Iotjs Runtime is included.\r
64 \r
65 %package service\r
66 Summary: Development files for %{name}\r
67 Group: Network & Connectivity/Service\r
68 Requires: %{name} = %{version}-%{release}\r
69 \r
70 %description service\r
71 The %{name}-service package contains service libraries files for\r
72 developing applications that use %{name}-service.\r
73 \r
74 #%package test\r
75 #Summary: Development files for %{name}\r
76 #Group: Network & Connectivity/Testing\r
77 #Requires: %{name} = %{version}-%{release}\r
78 \r
79 #%description test\r
80 #The %{name}-test package contains example files to show\r
81 #how the iotjs works using %{name}-test\r
82 \r
83 %package devel\r
84 Summary: Development files for %{name}\r
85 Group: Network & Connectivity/Development\r
86 Requires: %{name} = %{version}-%{release}\r
87 Requires: pkgconfig\r
88 \r
89 %description devel\r
90 The %{name}-devel package contains libraries and header files for\r
91 developing applications that use %{name}.\r
92 \r
93 %prep\r
94 %setup -q\r
95 chmod g-w %_sourcedir/*\r
96 cat LICENSE\r
97 \r
98 cp %{SOURCE1001} .\r
99 \r
100 %build\r
101 tools/build.py \\r
102   --target-arch=arm --target-os=tizen --target-board=artik10 --no-init-submodule \r
103 #eol\r
104 #--compile-flag="--sysroot=~/tizen-studio/platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core/"\r
105 \r
106 %install\r
107 cp ./build/arm-tizen/debug/iotjs/iotjs %{buildroot}%{_bindir}\r
108 rm -rf %{buildroot}\r
109 #eol\r
110 rm -rfv . %{buildroot}/out %{buildroot}/${HOME} ||:\r
111 \r
112 install -d %{buildroot}%{_includedir}/iotjs\r
113 \r
114 \r
115 %post -p /sbin/ldconfig\r
116 \r
117 %postun -p /sbin/ldconfig\r
118 \r
119 %files\r
120 %manifest %{name}.manifest\r
121 %defattr(-,root,root,-)\r
122 %license LICENSE\r
123 \r
124 %files service\r
125 %manifest %{name}.manifest\r
126 %defattr (-,root,root,-)\r
127 %license LICENSE\r
128 %{_bindir}/*\r
129 \r
130 %files devel\r
131 %manifest %{name}.manifest\r
132 %defattr (-,root,root,-)\r
133 %license LICENSE\r
134 %{_bindir}/*\r