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
:=https
://github.com
/erlang
/otp
/releases
/download
/OTP-
$(PKG_VERSION
)
16 PKG_HASH
:=2c4e61b24fb1c131d9f30cfe2415320899180debdb71fb59195c72bd9a4ab625
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
:=https
://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
+libstdcpp
49 PROVIDES
:= erlang-erts
=14.2.3 erlang-kernel
=9.2.2 erlang-sasl
=4.2.1 erlang-stdlib
=5.2.1
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
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-inets
106 $(call Package
/erlang
/Default
)
107 TITLE
:=Internet clients and servers
112 define Package
/erlang-inets
/description
113 $(call Package
/erlang
/Default
/description
)
115 This Erlang
/OTP package provides a container for Internet clients and
116 servers. Currently a FTP client
, a HTTP client and server
, and a tftp
117 client and server have been incorporated in Inets.
121 define Package
/erlang-mnesia
122 $(call Package
/erlang
/Default
)
123 TITLE
:=Distributed database
128 define Package
/erlang-mnesia
/description
129 $(call Package
/erlang
/Default
/description
)
131 This Erlang
/OTP package provides a distributed DataBase Management
132 System
(DBMS
), appropriate for telecommunications applications and
133 other Erlang applications which require continuous operation and
134 exhibit soft real-time properties.
138 define Package
/erlang-runtime-tools
139 $(call Package
/erlang
/Default
)
140 TITLE
:=Low-profile debugging
/tracing tools
145 define Package
/erlang-runtime-tools
/description
146 $(call Package
/erlang
/Default
/description
)
148 This Erlang
/OTP package provides low footprint tracing
/debugging tools
149 suitable for inclusion in a production system.
153 define Package
/erlang-snmp
154 $(call Package
/erlang
/Default
)
155 TITLE
:=Simple Network Management Protocol
(SNMP
) support
157 DEPENDS
+= +erlang
+erlang-asn1
160 define Package
/erlang-snmp
/description
161 $(call Package
/erlang
/Default
/description
)
163 This Erlang
/OTP package provides Simple Network Management Protocol
164 (SNMP
) support including a MIB compiler and tools for creating SNMP
169 define Package
/erlang-public-key
170 $(call Package
/erlang
/Default
)
171 TITLE
:=Public Key support
173 DEPENDS
+= +erlang
+erlang-crypto
+erlang-asn1
176 define Package
/erlang-public-key
/description
177 $(call Package
/erlang
/Default
/description
)
179 This Erlang
/OTP package provides functions to handle public-key infrastructure.
183 define Package
/erlang-ssh
184 $(call Package
/erlang
/Default
)
185 TITLE
:=Secure Shell
(SSH
) support
187 DEPENDS
+= +erlang
+erlang-crypto
190 define Package
/erlang-ssh
/description
191 $(call Package
/erlang
/Default
/description
)
193 This Erlang
/OTP package provides an implementation of the Secure Shell
194 protocol
, with SSH
& SFTP support.
198 define Package
/erlang-ssl
199 $(call Package
/erlang
/Default
)
200 TITLE
:=Secure Sockets Layer
(SSL
) support
202 DEPENDS
+= +erlang
+erlang-crypto
205 define Package
/erlang-ssl
/description
206 $(call Package
/erlang
/Default
/description
)
208 This Erlang
/OTP package provides support for secure communication over
213 define Package
/erlang-syntax-tools
214 $(call Package
/erlang
/Default
)
215 TITLE
:=Abstract Erlang syntax trees handling support
220 define Package
/erlang-syntax-tools
/description
221 $(call Package
/erlang
/Default
/description
)
223 This Erlang
/OTP package provides support for handling abstract Erlang
228 define Package
/erlang-tools
229 $(call Package
/erlang
/Default
)
230 TITLE
:=Erlang tools support
235 define Package
/erlang-tools
/description
236 $(call Package
/erlang
/Default
/description
)
238 This Erlang
/OTP package provides support for misc tools.
242 define Package
/erlang-reltool
243 $(call Package
/erlang
/Default
)
244 TITLE
:=Erlang reltool support
249 define Package
/erlang-reltool
/description
250 $(call Package
/erlang
/Default
/description
)
252 This Erlang
/OTP package provides support for release management.
256 define Package
/erlang-erl-interface
257 $(call Package
/erlang
/Default
)
258 TITLE
:=Erlang erl_interface support
263 define Package
/erlang-erl-interface
/description
264 $(call Package
/erlang
/Default
/description
)
266 This Erlang
/OTP package provides support for erlang interoperability with other languages.
269 define Package
/erlang-os_mon
270 $(call Package
/erlang
/Default
)
271 TITLE
:=Erlang OS Monitoring Application
276 define Package
/erlang-os_mon
/description
277 $(call Package
/erlang
/Default
/description
)
279 This Erlang
/OTP package provides the following services
:
280 cpu_sup CPU load and utilization supervision
281 disksup Disk supervision
282 memsup Memory supervision
285 define Package
/erlang-xmerl
286 $(call Package
/erlang
/Default
)
287 TITLE
:=Erlang XML
export
292 define Package
/erlang-xmerl
/description
293 $(call Package
/erlang
/Default
/description
)
295 This Erlang
/OTP package provides functions for exporting XML data to an external format
300 HOST_CONFIGURE_ARGS
+= \
301 --with-ssl
="$(STAGING_DIR_HOST)" \
308 --enable-dynamic-ssl-lib
311 SHLIB_LD
="$(TARGET_CC)" \
312 TARGET_ARCH
="$(TARGET_ARCH)" \
313 ac_cv_func_mmap_fixed_mapped
=yes \
314 ac_cv_path_WX_CONFIG_PATH
=no \
315 erl_xcomp_getaddrinfo
=no \
316 erl_xcomp_sysroot
="$(STAGING_DIR)"
318 EXTRA_CFLAGS
+=-D_GNU_SOURCE
322 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
324 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
325 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
329 define Package
/erlang
/install
330 $(INSTALL_DIR
) $(1)/usr
/bin
331 for f in epmd erl erlc escript run_erl
; do \
332 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$$$$f $(1)/usr
/bin
/ ; \
334 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/bin
335 for f in epmd erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot no_dot_erlang.boot to_erl
; do \
336 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/bin
/$$$$f $(1)/usr
/lib
/erlang
/bin
/ ; \
338 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/lib
339 for m in erts kernel sasl stdlib
; do \
340 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$m-* $(1)/usr
/lib
/erlang
/lib
/ ; \
341 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/examples
; \
342 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/src
; \
344 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
345 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/erts-
* $(1)/usr
/lib
/erlang
/
346 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/{doc
,include,lib
,man
,src
}
347 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/bin
/*.src
348 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/releases
349 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/releases
/* $(1)/usr
/lib
/erlang
/releases
/
350 $(SED
) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
351 $(1)/usr
/lib
/erlang
/releases
/RELEASES.src
352 mv
-f
$(1)/usr
/lib
/erlang
/releases
/RELEASES.src \
353 $(1)/usr
/lib
/erlang
/releases
/RELEASES
354 for f in bin
/erl bin
/start erts-
*/bin
/erl erts-
*/bin
/start
; do \
355 $(SED
) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
356 $(1)/usr
/lib
/erlang
/$$$$f ; \
360 define Build
/InstallDev
361 $(INSTALL_DIR
) $(1)/usr
/lib
362 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/obj
/*/*.a
$(1)/usr
/lib
/
363 $(INSTALL_DIR
) $(1)/usr
/include
364 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/include/*.h
$(1)/usr
/include/
369 define Package
/erlang-
$(1)/install
370 $(INSTALL_DIR
) $$(1)/usr
/lib
/erlang
/lib
372 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$$$$$m-* $$(1)/usr
/lib
/erlang
/lib
/ ; \
373 rm -rf
$$(1)/usr
/lib
/erlang
/lib
/$$$$$$$$m-*/{examples
,priv
/obj
,src
} ; \
377 $$(eval
$$(call BuildPackage
,erlang-
$(1)))
382 $(eval
$(call HostBuild
))
383 $(eval
$(call BuildPackage
,erlang
))
384 $(eval
$(call BuildModule
,asn1
,asn1
))
385 $(eval
$(call BuildModule
,compiler
,compiler
))
386 $(eval
$(call BuildModule
,crypto
,crypto
))
387 $(eval
$(call BuildModule
,inets
,inets
))
388 $(eval
$(call BuildModule
,mnesia
,mnesia
))
389 $(eval
$(call BuildModule
,runtime-tools
,runtime_tools
))
390 $(eval
$(call BuildModule
,snmp
,snmp
))
391 $(eval
$(call BuildModule
,public-key
,public_key
))
392 $(eval
$(call BuildModule
,ssh
,ssh
))
393 $(eval
$(call BuildModule
,ssl
,ssl
))
394 $(eval
$(call BuildModule
,syntax-tools
,syntax_tools
))
395 $(eval
$(call BuildModule
,tools
,tools
))
396 $(eval
$(call BuildModule
,reltool
,reltool
))
397 $(eval
$(call BuildModule
,erl-interface
,erl_interface
))
398 $(eval
$(call BuildModule
,os_mon
,os_mon
))
399 $(eval
$(call BuildModule
,xmerl
,xmerl
))