Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 1 | ################################################################################ |
Gustavo Zacarias | 9a58204 | 2013-04-29 08:57:49 +0000 | [diff] [blame] | 2 | # |
| 3 | # crda |
| 4 | # |
Alexandre Belloni | 8dfd59d | 2013-06-05 23:53:30 +0000 | [diff] [blame] | 5 | ################################################################################ |
Gustavo Zacarias | 9a58204 | 2013-04-29 08:57:49 +0000 | [diff] [blame] | 6 | |
Gustavo Zacarias | ce6595a | 2014-06-24 14:33:10 -0300 | [diff] [blame] | 7 | CRDA_VERSION = 3.13 |
| 8 | CRDA_SOURCE = crda-$(CRDA_VERSION).tar.xz |
| 9 | CRDA_SITE = $(BR2_KERNEL_MIRROR)/software/network/crda |
Gustavo Zacarias | 9a58204 | 2013-04-29 08:57:49 +0000 | [diff] [blame] | 10 | CRDA_DEPENDENCIES = host-pkgconf host-python-m2crypto \ |
Samuel Martin | 23dfff3 | 2014-03-05 23:04:45 +0100 | [diff] [blame] | 11 | libnl libgcrypt host-python |
Gustavo Zacarias | 9a58204 | 2013-04-29 08:57:49 +0000 | [diff] [blame] | 12 | CRDA_LICENSE = ISC |
| 13 | CRDA_LICENSE_FILES = LICENSE |
| 14 | |
Samuel Martin | d54418f | 2013-12-01 20:13:38 +0100 | [diff] [blame] | 15 | # 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 Petazzoni | 665e13c | 2014-12-03 22:41:29 +0100 | [diff] [blame] | 21 | ifeq ($(BR2_STATIC_LIBS),y) |
Samuel Martin | d54418f | 2013-12-01 20:13:38 +0100 | [diff] [blame] | 22 | CRDA_NLLIBS += -lnl-3 -lm -lpthread |
| 23 | CRDA_LDLIBS += `$(STAGING_DIR)/usr/bin/libgcrypt-config --libs` |
| 24 | endif |
| 25 | |
Samuel Martin | 23dfff3 | 2014-03-05 23:04:45 +0100 | [diff] [blame] | 26 | # * 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 Zacarias | 9a58204 | 2013-04-29 08:57:49 +0000 | [diff] [blame] | 31 | define CRDA_BUILD_CMDS |
Samuel Martin | d54418f | 2013-12-01 20:13:38 +0100 | [diff] [blame] | 32 | $(TARGET_CONFIGURE_OPTS) \ |
| 33 | LDLIBS="$(CRDA_LDLIBS)" \ |
| 34 | NLLIBS="$(CRDA_NLLIBS)" \ |
Samuel Martin | 23dfff3 | 2014-03-05 23:04:45 +0100 | [diff] [blame] | 35 | PYTHON=$(HOST_DIR)/usr/bin/python2 \ |
Samuel Martin | d54418f | 2013-12-01 20:13:38 +0100 | [diff] [blame] | 36 | $(MAKE) all_noverify -C $(@D) |
Gustavo Zacarias | 9a58204 | 2013-04-29 08:57:49 +0000 | [diff] [blame] | 37 | endef |
| 38 | |
| 39 | define CRDA_INSTALL_TARGET_CMDS |
| 40 | $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D) DESTDIR=$(TARGET_DIR) |
| 41 | endef |
| 42 | |
| 43 | $(eval $(generic-package)) |