2 # Copyright (C) 2009-2015 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
:=c7d247c0cad2d2e718eaca2e2dff051136a1347a92097abf19ebf65ea2870131
18 PKG_LICENSE
:=Apache-2.0
19 PKG_LICENSE_FILES
:=LICENSE.txt
20 PKG_MAINTAINER
:=Arnaud Sautaux
<arnaud.sautaux@infoteam.ch
>
22 PKG_BUILD_DEPENDS
:=erlang
/host openssl
25 HOST_BUILD_DIR
:=$(BUILD_DIR_HOST
)/otp_src_
$(PKG_VERSION
)
26 PKG_BUILD_DIR
:=$(BUILD_DIR
)/otp_src_
$(PKG_VERSION
)
28 include $(INCLUDE_DIR
)/host-build.mk
29 include $(INCLUDE_DIR
)/package.mk
31 define Package
/erlang
/Default
35 TITLE
:=Erlang
/OTP programming language
36 URL
:=http
://www.erlang.org
/
39 define Package
/erlang
/Default
/description
40 Erlang
/OTP is a general-purpose programming language and runtime
41 environment. Erlang has built-in support for concurrency
, distribution
46 $(call Package
/erlang
/Default
)
47 DEPENDS
+= +libncurses
+librt
+zlib
48 PROVIDES
:= erlang-erts
=10.0.1 erlang-kernel
=6.0 erlang-sasl
=3.2 erlang-stdlib
=3.5
51 define Package
/erlang
/description
52 $(call Package
/erlang
/Default
/description
)
54 This package contains the runtime implementation and a minimal set of
55 modules
(erts
, kernel
, sasl
& stdlib
).
59 define Package
/erlang-asn1
60 $(call Package
/erlang
/Default
)
61 TITLE
:=Abstract Syntax Notation One
(ASN
.1) support
63 DEPENDS
+= +erlang
+erlang-syntax-tools
66 define Package
/erlang-asn1
/description
67 $(call Package
/erlang
/Default
/description
)
69 This Erlang
/OTP package provides Abstract Syntax Notation One
(ASN
.1)
74 define Package
/erlang-compiler
75 $(call Package
/erlang
/Default
)
76 TITLE
:=Byte code compiler
78 DEPENDS
+= +erlang
+erlang-hipe
81 define Package
/erlang-compiler
/description
82 $(call Package
/erlang
/Default
/description
)
84 This Erlang
/OTP package provides a byte code compiler for Erlang which
85 produces highly compact code.
89 define Package
/erlang-crypto
90 $(call Package
/erlang
/Default
)
91 TITLE
:=Cryptography support
93 DEPENDS
+= +erlang
+libopenssl
96 define Package
/erlang-crypto
/description
97 $(call Package
/erlang
/Default
/description
)
99 This Erlang
/OTP package provides functions for computation of message
100 digests
, and encryption and decryption functions.
104 define Package
/erlang-hipe
105 $(call Package
/erlang
/Default
)
106 TITLE
:=High Performance Erlang
111 define Package
/erlang-hipe
/description
112 $(call Package
/erlang
/Default
/description
)
114 This Erlang
/OTP package provides HiPE
(High Performance Erlang
)
119 define Package
/erlang-inets
120 $(call Package
/erlang
/Default
)
121 TITLE
:=Internet clients and servers
126 define Package
/erlang-inets
/description
127 $(call Package
/erlang
/Default
/description
)
129 This Erlang
/OTP package provides a container for Internet clients and
130 servers. Currently a FTP client
, a HTTP client and server
, and a tftp
131 client and server have been incorporated in Inets.
135 define Package
/erlang-mnesia
136 $(call Package
/erlang
/Default
)
137 TITLE
:=Distributed database
142 define Package
/erlang-mnesia
/description
143 $(call Package
/erlang
/Default
/description
)
145 This Erlang
/OTP package provides a distributed DataBase Management
146 System
(DBMS
), appropriate for telecommunications applications and
147 other Erlang applications which require continuous operation and
148 exhibit soft real-time properties.
152 define Package
/erlang-runtime-tools
153 $(call Package
/erlang
/Default
)
154 TITLE
:=Low-profile debugging
/tracing tools
159 define Package
/erlang-runtime-tools
/description
160 $(call Package
/erlang
/Default
/description
)
162 This Erlang
/OTP package provides low footprint tracing
/debugging tools
163 suitable for inclusion in a production system.
167 define Package
/erlang-snmp
168 $(call Package
/erlang
/Default
)
169 TITLE
:=Simple Network Management Protocol
(SNMP
) support
171 DEPENDS
+= +erlang
+erlang-asn1
174 define Package
/erlang-snmp
/description
175 $(call Package
/erlang
/Default
/description
)
177 This Erlang
/OTP package provides Simple Network Management Protocol
178 (SNMP
) support including a MIB compiler and tools for creating SNMP
183 define Package
/erlang-public-key
184 $(call Package
/erlang
/Default
)
185 TITLE
:=Public Key support
187 DEPENDS
+= +erlang
+erlang-crypto
+erlang-asn1
190 define Package
/erlang-public-key
/description
191 $(call Package
/erlang
/Default
/description
)
193 This Erlang
/OTP package provides functions to handle public-key infrastructure.
197 define Package
/erlang-ssh
198 $(call Package
/erlang
/Default
)
199 TITLE
:=Secure Shell
(SSH
) support
201 DEPENDS
+= +erlang
+erlang-crypto
204 define Package
/erlang-ssh
/description
205 $(call Package
/erlang
/Default
/description
)
207 This Erlang
/OTP package provides an implementation of the Secure Shell
208 protocol
, with SSH
& SFTP support.
212 define Package
/erlang-ssl
213 $(call Package
/erlang
/Default
)
214 TITLE
:=Secure Sockets Layer
(SSL
) support
216 DEPENDS
+= +erlang
+erlang-crypto
219 define Package
/erlang-ssl
/description
220 $(call Package
/erlang
/Default
/description
)
222 This Erlang
/OTP package provides support for secure communication over
227 define Package
/erlang-syntax-tools
228 $(call Package
/erlang
/Default
)
229 TITLE
:=Abstract Erlang syntax trees handling support
234 define Package
/erlang-syntax-tools
/description
235 $(call Package
/erlang
/Default
/description
)
237 This Erlang
/OTP package provides support for handling abstract Erlang
242 define Package
/erlang-tools
243 $(call Package
/erlang
/Default
)
244 TITLE
:=Erlang tools support
249 define Package
/erlang-tools
/description
250 $(call Package
/erlang
/Default
/description
)
252 This Erlang
/OTP package provides support for misc tools.
256 define Package
/erlang-reltool
257 $(call Package
/erlang
/Default
)
258 TITLE
:=Erlang reltool support
263 define Package
/erlang-reltool
/description
264 $(call Package
/erlang
/Default
/description
)
266 This Erlang
/OTP package provides support for release management.
270 define Package
/erlang-erl-interface
271 $(call Package
/erlang
/Default
)
272 TITLE
:=Erlang erl_interface support
277 define Package
/erlang-erl-interface
/description
278 $(call Package
/erlang
/Default
/description
)
280 This Erlang
/OTP package provides support for erlang interoperability with other languages.
283 define Package
/erlang-os_mon
284 $(call Package
/erlang
/Default
)
285 TITLE
:=Erlang OS Monitoring Application
290 define Package
/erlang-os_mon
/description
291 $(call Package
/erlang
/Default
/description
)
293 This Erlang
/OTP package provides the following services
:
294 cpu_sup CPU load and utilization supervision
295 disksup Disk supervision
296 memsup Memory supervision
299 define Package
/erlang-xmerl
300 $(call Package
/erlang
/Default
)
301 TITLE
:=Erlang XML
export
306 define Package
/erlang-xmerl
/description
307 $(call Package
/erlang
/Default
/description
)
309 This Erlang
/OTP package provides functions for exporting XML data to an external format
314 HOST_CONFIGURE_ARGS
+= \
316 --disable-smp-support \
319 HOST_CFLAGS
+= -D_GNU_SOURCE
322 $(MAKE
) -C
$(HOST_BUILD_DIR
) all
326 $(MAKE
) -C
$(HOST_BUILD_DIR
) install
334 --disable-smp-support \
336 --enable-dynamic-ssl-lib
339 SHLIB_LD
="$(TARGET_CC)" \
340 TARGET_ARCH
="$(TARGET_ARCH)" \
341 ac_cv_func_mmap_fixed_mapped
=yes \
342 ac_cv_path_WX_CONFIG_PATH
=no \
343 erl_xcomp_getaddrinfo
=no \
344 erl_xcomp_sysroot
="$(STAGING_DIR)"
346 EXTRA_CFLAGS
+=-D_GNU_SOURCE
350 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
352 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
353 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
357 define Package
/erlang
/install
358 $(INSTALL_DIR
) $(1)/usr
/bin
359 for f in epmd erl erlc escript run_erl
; do \
360 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$$$$f $(1)/usr
/bin
/ ; \
362 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/bin
363 for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl
; do \
364 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/bin
/$$$$f $(1)/usr
/lib
/erlang
/bin
/ ; \
366 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/lib
367 for m in erts kernel sasl stdlib
; do \
368 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$m-* $(1)/usr
/lib
/erlang
/lib
/ ; \
369 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/examples
; \
370 rm -rf
$(1)/usr
/lib
/erlang
/lib
/$$$$m-*/src
; \
372 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
373 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/erts-
* $(1)/usr
/lib
/erlang
/
374 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/{doc
,include,lib
,man
,src
}
375 rm -rf
$(1)/usr
/lib
/erlang
/erts-
*/bin
/*.src
376 $(INSTALL_DIR
) $(1)/usr
/lib
/erlang
/releases
377 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/releases
/* $(1)/usr
/lib
/erlang
/releases
/
378 $(SED
) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
379 $(1)/usr
/lib
/erlang
/releases
/RELEASES.src
380 mv
-f
$(1)/usr
/lib
/erlang
/releases
/RELEASES.src \
381 $(1)/usr
/lib
/erlang
/releases
/RELEASES
382 for f in bin
/erl bin
/start erts-
*/bin
/erl erts-
*/bin
/start
; do \
383 $(SED
) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
384 $(1)/usr
/lib
/erlang
/$$$$f ; \
388 define Build
/InstallDev
389 $(INSTALL_DIR
) $(1)/usr
/lib
390 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/obj
/*/*.a
$(1)/usr
/lib
/
391 $(INSTALL_DIR
) $(1)/usr
/include
392 $(CP
) $(PKG_BUILD_DIR
)/lib
/erl_interface
/include/*.h
$(1)/usr
/include/
397 define Package
/erlang-
$(1)/install
398 $(INSTALL_DIR
) $$(1)/usr
/lib
/erlang
/lib
400 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/erlang
/lib
/$$$$$$$$m-* $$(1)/usr
/lib
/erlang
/lib
/ ; \
401 rm -rf
$$(1)/usr
/lib
/erlang
/lib
/$$$$$$$$m-*/{examples
,priv
/obj
,src
} ; \
405 $$(eval
$$(call BuildPackage
,erlang-
$(1)))
410 $(eval
$(call HostBuild
))
411 $(eval
$(call BuildPackage
,erlang
))
412 $(eval
$(call BuildModule
,asn1
,asn1
))
413 $(eval
$(call BuildModule
,compiler
,compiler
))
414 $(eval
$(call BuildModule
,crypto
,crypto
))
415 $(eval
$(call BuildModule
,hipe
,hipe
))
416 $(eval
$(call BuildModule
,inets
,inets
))
417 $(eval
$(call BuildModule
,mnesia
,mnesia
))
418 $(eval
$(call BuildModule
,runtime-tools
,runtime_tools
))
419 $(eval
$(call BuildModule
,snmp
,snmp
))
420 $(eval
$(call BuildModule
,public-key
,public_key
))
421 $(eval
$(call BuildModule
,ssh
,ssh
))
422 $(eval
$(call BuildModule
,ssl
,ssl
))
423 $(eval
$(call BuildModule
,syntax-tools
,syntax_tools
))
424 $(eval
$(call BuildModule
,tools
,tools
))
425 $(eval
$(call BuildModule
,reltool
,reltool
))
426 $(eval
$(call BuildModule
,erl-interface
,erl_interface
))
427 $(eval
$(call BuildModule
,os_mon
,os_mon
))
428 $(eval
$(call BuildModule
,xmerl
,xmerl
))