blob: 3c06e075d2f94524e186e5f31766a784a4b23263 [file] [log] [blame]
Alexandre Belloni8dfd59d2013-06-05 23:53:30 +00001################################################################################
Gustavo Zacarias9a582042013-04-29 08:57:49 +00002#
3# crda
4#
Alexandre Belloni8dfd59d2013-06-05 23:53:30 +00005################################################################################
Gustavo Zacarias9a582042013-04-29 08:57:49 +00006
Gustavo Zacariasce6595a2014-06-24 14:33:10 -03007CRDA_VERSION = 3.13
8CRDA_SOURCE = crda-$(CRDA_VERSION).tar.xz
9CRDA_SITE = $(BR2_KERNEL_MIRROR)/software/network/crda
Gustavo Zacarias9a582042013-04-29 08:57:49 +000010CRDA_DEPENDENCIES = host-pkgconf host-python-m2crypto \
Samuel Martin23dfff32014-03-05 23:04:45 +010011 libnl libgcrypt host-python
Gustavo Zacarias9a582042013-04-29 08:57:49 +000012CRDA_LICENSE = ISC
13CRDA_LICENSE_FILES = LICENSE
14
Samuel Martind54418f2013-12-01 20:13:38 +010015# libnl-3 needs -lm (for rint) and -lpthread if linking statically.
16# And library order matters hence stick -lnl-3 first since it's appended
17# in the crda Makefiles as in NLLIBS+=-lnl-3 ... thus failing.
18#
19# libgcrypt needs -lgpg-error if linking statically, which is correctly
20# set by the libgcrypt-config script (and in the right order).
Thomas Petazzoni665e13c2014-12-03 22:41:29 +010021ifeq ($(BR2_STATIC_LIBS),y)
Samuel Martind54418f2013-12-01 20:13:38 +010022CRDA_NLLIBS += -lnl-3 -lm -lpthread
23CRDA_LDLIBS += `$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`
24endif
25
Samuel Martin23dfff32014-03-05 23:04:45 +010026# * key2pub.py currently is not python3 compliant (though python2/python3
27# compliance could rather easily be achieved.
28# * key2pub.py uses M2Crypto python module, which is only available for
29# python2, so we have to make sure this script is run using the python2
30# interpreter, hence the host-python dependency and the PYTHON variable.
Gustavo Zacarias9a582042013-04-29 08:57:49 +000031define CRDA_BUILD_CMDS
Samuel Martind54418f2013-12-01 20:13:38 +010032 $(TARGET_CONFIGURE_OPTS) \
33 LDLIBS="$(CRDA_LDLIBS)" \
34 NLLIBS="$(CRDA_NLLIBS)" \
Samuel Martin23dfff32014-03-05 23:04:45 +010035 PYTHON=$(HOST_DIR)/usr/bin/python2 \
Samuel Martind54418f2013-12-01 20:13:38 +010036 $(MAKE) all_noverify -C $(@D)
Gustavo Zacarias9a582042013-04-29 08:57:49 +000037endef
38
39define CRDA_INSTALL_TARGET_CMDS
40 $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D) DESTDIR=$(TARGET_DIR)
41endef
42
43$(eval $(generic-package))