2 # Copyright (C) 2009-2020 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=otp_src_
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:= http
://www.erlang.org
/download
/
16 PKG_HASH
:=42dcf3c721f4de59fe74ae7b65950c2174c46dc8d1dd4e27c0594d86f606a635
18 PKG_LICENSE
:=Apache-2.0
19 PKG_LICENSE_FILES
:=LICENSE.txt
20 PKG_MAINTAINER
:=Arnaud Sautaux
<arnaud.sautaux@infoteam.ch
>
21 PKG_CPE_ID
:=cpe
:/a
:erlang
:erlang
23 PKG_BUILD_DEPENDS
:=erlang
/host openssl
27 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/otp_src_
$(PKG_VERSION
)
28 PKG_BUILD_DIR
:=$(BUILD_DIR
)/otp_src_
$(PKG_VERSION
)
30 include $(INCLUDE_DIR
)/host-build.mk
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/erlang
/Default
37 TITLE
:=Erlang
/OTP programming language
38 URL
:=http
://www.erlang.org
/
41 define Package
/erlang
/Default
/description
42 Erlang
/OTP is a general-purpose programming language and runtime
43 environment. Erlang has built-in support for concurrency
, distribution
48 $(call Package
/erlang
/Default
)
49 DEPENDS
+= +libncurses
+librt
+zlib
50 PROVIDES
:= erlang-erts
=10.0.1 erlang-kernel
=6.0 erlang-sasl
=3.2 erlang-stdlib
=3.5
53 define Package
/erlang
/description
54 $(call Package
/erlang
/Default
/description
)
56 This package contains the runtime implementation and a minimal set of
57 modules
(erts
, kernel
, sasl
& stdlib
).
61 define Package
/erlang-asn1
62 $(call Package
/erlang
/Default
)
63 TITLE
:=Abstract Syntax Notation One
(ASN
.1) support
65 DEPENDS
+= +erlang
+erlang-syntax-tools
68 define Package
/erlang-asn1
/description
69 $(call Package
/erlang
/Default
/description
)
71 This Erlang
/OTP package provides Abstract Syntax Notation One
(ASN
.1)
76 define Package
/erlang-compiler
77 $(call Package
/erlang
/Default
)
78 TITLE
:=Byte code compiler
80 DEPENDS
+= +erlang
+erlang-hipe
83 define Package
/erlang-compiler
/description
84 $(call Package
/erlang
/Default
/description
)
86 This Erlang
/OTP package provides a byte code compiler for Erlang which
87 produces highly compact code.
91 define Package
/erlang-crypto
92 $(call Package
/erlang
/Default
)
93 TITLE
:=Cryptography support
95 DEPENDS
+= +erlang
+libopenssl
98 define Package
/erlang-crypto
/description
99 $(call Package
/erlang
/Default
/description
)
101 This Erlang
/OTP package provides functions for computation of message
102 digests
, and encryption and decryption functions.
106 define Package
/erlang-hipe
107 $(call Package
/erlang
/Default
)
108 TITLE
:=High Performance Erlang
113 define Package
/erlang-hipe
/description
114 $(call Package
/erlang
/Default
/description
)
116 This Erlang
/OTP package provides HiPE
(High Performance Erlang
)
121 define Package
/erlang-inets
122 $(call Package
/erlang
/Default
)
123 TITLE
:=Internet clients and servers
128 define Package
/erlang-inets
/description
129 $(call Package
/erlang
/Default
/description
)
131 This Erlang
/OTP package provides a container for Internet clients and
132 servers. Currently a FTP client
, a HTTP client and server
, and a tftp
133 client and server have been incorporated in Inets.
137 define Package
/erlang-mnesia
138 $(call Package
/erlang
/Default
)
139 TITLE
:=Distributed database
144 define Package
/erlang-mnesia
/description
145 $(call Package
/erlang
/Default
/description
)
147 This Erlang
/OTP package provides a distributed DataBase Management
148 System
(DBMS
), appropriate for telecommunications applications and
149 other Erlang applications which require continuous operation and
150 exhibit soft real-time properties.
154 define Package
/erlang-runtime-tools
155 $(call Package
/erlang
/Default
)
156 TITLE
:=Low-profile debugging
/tracing tools
161 define Package
/erlang-runtime-tools
/description
162 $(call Package
/erlang
/Default
/description
)
164 This Erlang
/OTP package provides low footprint tracing
/debugging tools
165 suitable for inclusion in a production system.
169 define Package
/erlang-snmp
170 $(call Package
/erlang
/Default
)
171 TITLE
:=Simple Network Management Protocol
(SNMP
) support
173 DEPENDS
+= +erlang
+erlang-asn1
176 define Package
/erlang-snmp
/description
177 $(call Package
/erlang
/Default
/description
)
179 This Erlang
/OTP package provides Simple Network Management Protocol
180 (SNMP
) support including a MIB compiler and tools for creating SNMP
185 define Package
/erlang-public-key
186 $(call Package
/erlang
/Default
)
187 TITLE
:=Public Key support
189 DEPENDS
+= +erlang
+erlang-crypto
+erlang-asn1
192 define Package
/erlang-public-key
/description
193 $(call Package
/erlang
/Default
/description
)
195 This Erlang
/OTP package provides functions to handle public-key infrastructure.
199 define Package
/erlang-ssh
200 $(call Package
/erlang
/Default
)
201 TITLE
:=Secure Shell
(SSH
) support
203 DEPENDS
+= +erlang
+erlang-crypto
206 define Package
/erlang-ssh
/description
207 $(call Package
/erlang
/Default
/description
)
209 This Erlang
/OTP package provides an implementation of the Secure Shell
210 protocol
, with SSH
& SFTP support.
214 define Package
/erlang-ssl
215 $(call Package
/erlang
/Default
)
216 TITLE
:=Secure Sockets Layer
(SSL
) support
218 DEPENDS
+= +erlang
+erlang-crypto
221 define Package
/erlang-ssl
/description
222 $(call Package
/erlang
/Default
/description
)
224 This Erlang
/OTP package provides support for secure communication over
229 define Package
/erlang-syntax-tools
230 $(call Package
/erlang
/Default
)
231 TITLE
:=Abstract Erlang syntax trees handling support
236 define Package
/erlang-syntax-tools
/description
237 $(call Package
/erlang
/Default
/description
)
239 This Erlang
/OTP package provides support for handling abstract Erlang
244 define Package
/erlang-tools
245 $(call Package
/erlang
/Default
)
246 TITLE
:=Erlang tools support
251 define Package
/erlang-tools
/description
252 $(call Package
/erlang
/Default
/description
)
254 This Erlang
/OTP package provides support for misc tools.
258 define Package
/erlang-reltool
259 $(call Package
/erlang
/Default
)
260 TITLE
:=Erlang reltool support
265 define Package
/erlang-reltool
/description
266 $(call Package
/erlang
/Default
/description
)
268 This Erlang
/OTP package provides support for release management.
272 define Package
/erlang-erl-interface
273 $(call Package
/erlang
/Default
)
274 TITLE
:=Erlang erl_interface support
279 define Package
/erlang-erl-interface
/description
280 $(call Package
/erlang
/Default
/description
)
282 This Erlang
/OTP package provides support for erlang interoperability with other languages.
285 define Package
/erlang-os_mon
286 $(call Package
/erlang
/Default
)
287 TITLE
:=Erlang OS Monitoring Application
292 define Package
/erlang-os_mon
/description
293 $(call Package
/erlang
/Default
/description
)
295 This Erlang
/OTP package provides the following services
:
296 cpu_sup CPU load and utilization supervision
297 disksup Disk supervision
298 memsup Memory supervision
301 define Package
/erlang-xmerl
302 $(call Package
/erlang
/Default
)
303 TITLE
:=Erlang XML
export
308 define Package
/erlang-xmerl
/description
309 $(call Package
/erlang
/Default
/description
)
311 This Erlang
/OTP package provides functions for exporting XML data to an external format
316 HOST_CONFIGURE_ARGS
+= \
319 --disable-smp-support \
326 --disable-smp-support \
328 --enable-dynamic-ssl-lib
331 SHLIB_LD
="$(TARGET_CC)" \
332 TARGET_ARCH
="$(TARGET_ARCH)" \
333 ac_cv_func_mmap_fixed_mapped
=yes \
334 ac_cv_path_WX_CONFIG_PATH
=no \
335 erl_xcomp_getaddrinfo
=no \
336 erl_xcomp_sysroot
="$(STAGING_DIR)"
338 EXTRA_CFLAGS
+=-D_GNU_SOURCE
342 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
344 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
345 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
349 define Package
/erlang
/install
350 $(INSTALL_DIR
) $(1)/usr
/bin
351 for f in epmd erl erlc escript run_erl
; do \
352 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$$$$f $(1)/usr
/bin
/ ; \
354 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/bin
355 for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl
; do \
356 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/bin
/$$$$f $(1)/usr
/lib
/erlang
/bin
/ ; \
358 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/lib
359 for m in erts kernel sasl stdlib
; do \
360 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$m-* $(1)/usr
/lib
/erlang
/lib
/ ; \
361 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/examples
; \
362 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/src
; \
364 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
365 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/erts-
* $(1)/usr
/lib
/erlang
/
366 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/{doc
,include,lib
,man
,src
}
367 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/bin
/*.src
368 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/releases
369 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/releases
/* $(1)/usr
/lib
/erlang
/releases
/
370 $(SED
) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
371 $(1)/usr
/lib
/erlang
/releases
/RELEASES.src
372 mv
-f
$(1)/usr
/lib
/erlang
/releases
/RELEASES.src \
373 $(1)/usr
/lib
/erlang
/releases
/RELEASES
374 for f in bin
/erl bin
/start erts-
*/bin
/erl erts-
*/bin
/start
; do \
375 $(SED
) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
376 $(1)/usr
/lib
/erlang
/$$$$f ; \
380 define Build
/InstallDev
381 $(INSTALL_DIR
) $(1)/usr
/lib
382 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/obj
/*/*.a
$(1)/usr
/lib
/
383 $(INSTALL_DIR
) $(1)/usr
/include
384 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/include/*.h
$(1)/usr
/include/
389 define Package
/erlang-
$(1)/install
390 $(INSTALL_DIR
) $$(1)/usr
/lib
/erlang
/lib
392 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$$$$$m-* $$(1)/usr
/lib
/erlang
/lib
/ ; \
393 rm -rf
$$(1)/usr
/lib
/erlang
/lib
/$$$$$$$$m-*/{examples
,priv
/obj
,src
} ; \
397 $$(eval
$$(call BuildPackage
,erlang-
$(1)))
402 $(eval
$(call HostBuild
))
403 $(eval
$(call BuildPackage
,erlang
))
404 $(eval
$(call BuildModule
,asn1
,asn1
))
405 $(eval
$(call BuildModule
,compiler
,compiler
))
406 $(eval
$(call BuildModule
,crypto
,crypto
))
407 $(eval
$(call BuildModule
,hipe
,hipe
))
408 $(eval
$(call BuildModule
,inets
,inets
))
409 $(eval
$(call BuildModule
,mnesia
,mnesia
))
410 $(eval
$(call BuildModule
,runtime-tools
,runtime_tools
))
411 $(eval
$(call BuildModule
,snmp
,snmp
))
412 $(eval
$(call BuildModule
,public-key
,public_key
))
413 $(eval
$(call BuildModule
,ssh
,ssh
))
414 $(eval
$(call BuildModule
,ssl
,ssl
))
415 $(eval
$(call BuildModule
,syntax-tools
,syntax_tools
))
416 $(eval
$(call BuildModule
,tools
,tools
))
417 $(eval
$(call BuildModule
,reltool
,reltool
))
418 $(eval
$(call BuildModule
,erl-interface
,erl_interface
))
419 $(eval
$(call BuildModule
,os_mon
,os_mon
))
420 $(eval
$(call BuildModule
,xmerl
,xmerl
))