fix nginx build
[packages.git] / libs / nacl / Makefile
1 #
2 # Copyright (C) 2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nacl
11 PKG_VERSION:=20110221
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://hyperelliptic.org/nacl
16 PKG_MD5SUM:=7efb5715561c3d10dafd3fa97b4f2d20
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/nacl
21   SECTION:=libs
22   CATEGORY:=Libraries
23   TITLE:=NaCl Networking and Cryptography library
24   URL:=http://nacl.cace-project.eu/
25 endef
26
27 define Build/Compile
28         cp do-openwrt $(PKG_BUILD_DIR)
29         ( \
30                 cd $(PKG_BUILD_DIR); \
31                 chmod +x do-openwrt; \
32                         CC="$(TARGET_CC)" \
33                         CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
34                         AR="$(TARGET_CROSS)ar" \
35                         RANLIB="$(TARGET_CROSS)ranlib" \
36                         ./do-openwrt \
37         )
38 endef
39
40 define Build/InstallDev
41         $(INSTALL_DIR) $(1)/usr/include/nacl
42         $(CP) $(PKG_BUILD_DIR)/build/include/*.h $(1)/usr/include/nacl/
43         $(INSTALL_DIR) $(1)/usr/lib
44         $(CP) $(PKG_BUILD_DIR)/build/lib/libnacl.a $(1)/usr/lib/
45 endef
46
47 $(eval $(call BuildPackage,nacl))