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
26 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/otp_src_
$(PKG_VERSION
)
27 PKG_BUILD_DIR
:=$(BUILD_DIR
)/otp_src_
$(PKG_VERSION
)
29 include $(INCLUDE_DIR
)/host-build.mk
30 include $(INCLUDE_DIR
)/package.mk
32 define Package
/erlang
/Default
36 TITLE
:=Erlang
/OTP programming language
37 URL
:=http
://www.erlang.org
/
40 define Package
/erlang
/Default
/description
41 Erlang
/OTP is a general-purpose programming language and runtime
42 environment. Erlang has built-in support for concurrency
, distribution
47 $(call Package
/erlang
/Default
)
48 DEPENDS
+= +libncurses
+librt
+zlib
49 PROVIDES
:= erlang-erts
=10.0.1 erlang-kernel
=6.0 erlang-sasl
=3.2 erlang-stdlib
=3.5
52 define Package
/erlang
/description
53 $(call Package
/erlang
/Default
/description
)
55 This package contains the runtime implementation and a minimal set of
56 modules
(erts
, kernel
, sasl
& stdlib
).
60 define Package
/erlang-asn1
61 $(call Package
/erlang
/Default
)
62 TITLE
:=Abstract Syntax Notation One
(ASN
.1) support
64 DEPENDS
+= +erlang
+erlang-syntax-tools
67 define Package
/erlang-asn1
/description
68 $(call Package
/erlang
/Default
/description
)
70 This Erlang
/OTP package provides Abstract Syntax Notation One
(ASN
.1)
75 define Package
/erlang-compiler
76 $(call Package
/erlang
/Default
)
77 TITLE
:=Byte code compiler
79 DEPENDS
+= +erlang
+erlang-hipe
82 define Package
/erlang-compiler
/description
83 $(call Package
/erlang
/Default
/description
)
85 This Erlang
/OTP package provides a byte code compiler for Erlang which
86 produces highly compact code.
90 define Package
/erlang-crypto
91 $(call Package
/erlang
/Default
)
92 TITLE
:=Cryptography support
94 DEPENDS
+= +erlang
+libopenssl
97 define Package
/erlang-crypto
/description
98 $(call Package
/erlang
/Default
/description
)
100 This Erlang
/OTP package provides functions for computation of message
101 digests
, and encryption and decryption functions.
105 define Package
/erlang-hipe
106 $(call Package
/erlang
/Default
)
107 TITLE
:=High Performance Erlang
112 define Package
/erlang-hipe
/description
113 $(call Package
/erlang
/Default
/description
)
115 This Erlang
/OTP package provides HiPE
(High Performance Erlang
)
120 define Package
/erlang-inets
121 $(call Package
/erlang
/Default
)
122 TITLE
:=Internet clients and servers
127 define Package
/erlang-inets
/description
128 $(call Package
/erlang
/Default
/description
)
130 This Erlang
/OTP package provides a container for Internet clients and
131 servers. Currently a FTP client
, a HTTP client and server
, and a tftp
132 client and server have been incorporated in Inets.
136 define Package
/erlang-mnesia
137 $(call Package
/erlang
/Default
)
138 TITLE
:=Distributed database
143 define Package
/erlang-mnesia
/description
144 $(call Package
/erlang
/Default
/description
)
146 This Erlang
/OTP package provides a distributed DataBase Management
147 System
(DBMS
), appropriate for telecommunications applications and
148 other Erlang applications which require continuous operation and
149 exhibit soft real-time properties.
153 define Package
/erlang-runtime-tools
154 $(call Package
/erlang
/Default
)
155 TITLE
:=Low-profile debugging
/tracing tools
160 define Package
/erlang-runtime-tools
/description
161 $(call Package
/erlang
/Default
/description
)
163 This Erlang
/OTP package provides low footprint tracing
/debugging tools
164 suitable for inclusion in a production system.
168 define Package
/erlang-snmp
169 $(call Package
/erlang
/Default
)
170 TITLE
:=Simple Network Management Protocol
(SNMP
) support
172 DEPENDS
+= +erlang
+erlang-asn1
175 define Package
/erlang-snmp
/description
176 $(call Package
/erlang
/Default
/description
)
178 This Erlang
/OTP package provides Simple Network Management Protocol
179 (SNMP
) support including a MIB compiler and tools for creating SNMP
184 define Package
/erlang-public-key
185 $(call Package
/erlang
/Default
)
186 TITLE
:=Public Key support
188 DEPENDS
+= +erlang
+erlang-crypto
+erlang-asn1
191 define Package
/erlang-public-key
/description
192 $(call Package
/erlang
/Default
/description
)
194 This Erlang
/OTP package provides functions to handle public-key infrastructure.
198 define Package
/erlang-ssh
199 $(call Package
/erlang
/Default
)
200 TITLE
:=Secure Shell
(SSH
) support
202 DEPENDS
+= +erlang
+erlang-crypto
205 define Package
/erlang-ssh
/description
206 $(call Package
/erlang
/Default
/description
)
208 This Erlang
/OTP package provides an implementation of the Secure Shell
209 protocol
, with SSH
& SFTP support.
213 define Package
/erlang-ssl
214 $(call Package
/erlang
/Default
)
215 TITLE
:=Secure Sockets Layer
(SSL
) support
217 DEPENDS
+= +erlang
+erlang-crypto
220 define Package
/erlang-ssl
/description
221 $(call Package
/erlang
/Default
/description
)
223 This Erlang
/OTP package provides support for secure communication over
228 define Package
/erlang-syntax-tools
229 $(call Package
/erlang
/Default
)
230 TITLE
:=Abstract Erlang syntax trees handling support
235 define Package
/erlang-syntax-tools
/description
236 $(call Package
/erlang
/Default
/description
)
238 This Erlang
/OTP package provides support for handling abstract Erlang
243 define Package
/erlang-tools
244 $(call Package
/erlang
/Default
)
245 TITLE
:=Erlang tools support
250 define Package
/erlang-tools
/description
251 $(call Package
/erlang
/Default
/description
)
253 This Erlang
/OTP package provides support for misc tools.
257 define Package
/erlang-reltool
258 $(call Package
/erlang
/Default
)
259 TITLE
:=Erlang reltool support
264 define Package
/erlang-reltool
/description
265 $(call Package
/erlang
/Default
/description
)
267 This Erlang
/OTP package provides support for release management.
271 define Package
/erlang-erl-interface
272 $(call Package
/erlang
/Default
)
273 TITLE
:=Erlang erl_interface support
278 define Package
/erlang-erl-interface
/description
279 $(call Package
/erlang
/Default
/description
)
281 This Erlang
/OTP package provides support for erlang interoperability with other languages.
284 define Package
/erlang-os_mon
285 $(call Package
/erlang
/Default
)
286 TITLE
:=Erlang OS Monitoring Application
291 define Package
/erlang-os_mon
/description
292 $(call Package
/erlang
/Default
/description
)
294 This Erlang
/OTP package provides the following services
:
295 cpu_sup CPU load and utilization supervision
296 disksup Disk supervision
297 memsup Memory supervision
300 define Package
/erlang-xmerl
301 $(call Package
/erlang
/Default
)
302 TITLE
:=Erlang XML
export
307 define Package
/erlang-xmerl
/description
308 $(call Package
/erlang
/Default
/description
)
310 This Erlang
/OTP package provides functions for exporting XML data to an external format
315 HOST_CONFIGURE_ARGS
+= \
317 --disable-smp-support \
320 HOST_CFLAGS
+= -D_GNU_SOURCE
323 $(MAKE
) -C
$(HOST_BUILD_DIR
) all
327 $(MAKE
) -C
$(HOST_BUILD_DIR
) install
335 --disable-smp-support \
337 --enable-dynamic-ssl-lib
340 SHLIB_LD
="$(TARGET_CC)" \
341 TARGET_ARCH
="$(TARGET_ARCH)" \
342 ac_cv_func_mmap_fixed_mapped
=yes \
343 ac_cv_path_WX_CONFIG_PATH
=no \
344 erl_xcomp_getaddrinfo
=no \
345 erl_xcomp_sysroot
="$(STAGING_DIR)"
347 EXTRA_CFLAGS
+=-D_GNU_SOURCE
351 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
353 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
354 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
358 define Package
/erlang
/install
359 $(INSTALL_DIR
) $(1)/usr
/bin
360 for f in epmd erl erlc escript run_erl
; do \
361 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$$$$f $(1)/usr
/bin
/ ; \
363 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/bin
364 for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl
; do \
365 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/bin
/$$$$f $(1)/usr
/lib
/erlang
/bin
/ ; \
367 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/lib
368 for m in erts kernel sasl stdlib
; do \
369 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$m-* $(1)/usr
/lib
/erlang
/lib
/ ; \
370 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/examples
; \
371 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/src
; \
373 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
374 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/erts-
* $(1)/usr
/lib
/erlang
/
375 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/{doc
,include,lib
,man
,src
}
376 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/bin
/*.src
377 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/releases
378 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/releases
/* $(1)/usr
/lib
/erlang
/releases
/
379 $(SED
) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
380 $(1)/usr
/lib
/erlang
/releases
/RELEASES.src
381 mv
-f
$(1)/usr
/lib
/erlang
/releases
/RELEASES.src \
382 $(1)/usr
/lib
/erlang
/releases
/RELEASES
383 for f in bin
/erl bin
/start erts-
*/bin
/erl erts-
*/bin
/start
; do \
384 $(SED
) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
385 $(1)/usr
/lib
/erlang
/$$$$f ; \
389 define Build
/InstallDev
390 $(INSTALL_DIR
) $(1)/usr
/lib
391 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/obj
/*/*.a
$(1)/usr
/lib
/
392 $(INSTALL_DIR
) $(1)/usr
/include
393 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/include/*.h
$(1)/usr
/include/
398 define Package
/erlang-
$(1)/install
399 $(INSTALL_DIR
) $$(1)/usr
/lib
/erlang
/lib
401 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$$$$$m-* $$(1)/usr
/lib
/erlang
/lib
/ ; \
402 rm -rf
$$(1)/usr
/lib
/erlang
/lib
/$$$$$$$$m-*/{examples
,priv
/obj
,src
} ; \
406 $$(eval
$$(call BuildPackage
,erlang-
$(1)))
411 $(eval
$(call HostBuild
))
412 $(eval
$(call BuildPackage
,erlang
))
413 $(eval
$(call BuildModule
,asn1
,asn1
))
414 $(eval
$(call BuildModule
,compiler
,compiler
))
415 $(eval
$(call BuildModule
,crypto
,crypto
))
416 $(eval
$(call BuildModule
,hipe
,hipe
))
417 $(eval
$(call BuildModule
,inets
,inets
))
418 $(eval
$(call BuildModule
,mnesia
,mnesia
))
419 $(eval
$(call BuildModule
,runtime-tools
,runtime_tools
))
420 $(eval
$(call BuildModule
,snmp
,snmp
))
421 $(eval
$(call BuildModule
,public-key
,public_key
))
422 $(eval
$(call BuildModule
,ssh
,ssh
))
423 $(eval
$(call BuildModule
,ssl
,ssl
))
424 $(eval
$(call BuildModule
,syntax-tools
,syntax_tools
))
425 $(eval
$(call BuildModule
,tools
,tools
))
426 $(eval
$(call BuildModule
,reltool
,reltool
))
427 $(eval
$(call BuildModule
,erl-interface
,erl_interface
))
428 $(eval
$(call BuildModule
,os_mon
,os_mon
))
429 $(eval
$(call BuildModule
,xmerl
,xmerl
))