-#
-# Copyright (C) 2006-2011 OpenWrt.org
+#
+# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=polarssl
-PKG_VERSION:=0.14.3
+PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
PKG_SOURCE_URL:=http://polarssl.org/code/releases
-PKG_MD5SUM:=f1b2fe9087ab64d7ea40a276a3628583
+PKG_MD5SUM:=9e0ef5090070ae95363f201851ca62f2
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
define Package/polarssl/Default
SUBMENU:=SSL
PKG_INSTALL:=1
-define Build/Configure
-endef
-
-TARGET_CFLAGS += $(FPIC)
-MAKE_FLAGS += OFLAGS="$(TARGET_CFLAGS)"
+CMAKE_OPTIONS += \
+ -DCMAKE_BUILD_TYPE:String="Release" \
+ -DUSE_SHARED_POLARSSL_LIBRARY:Bool=ON \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/include/polarssl $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/lib/libpolarssl.{a,so} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
endef
define Package/libpolarssl/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/libpolarssl.so $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
endef
define Package/polarssl-progs/install
$(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/polarssl_* $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libpolarssl))
--- /dev/null
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -26,25 +26,3 @@ function(add_test_suite suite_name)
+ endfunction(add_test_suite)
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-value")
+-
+-add_test_suite(aes)
+-add_test_suite(arc4)
+-add_test_suite(base64)
+-add_test_suite(camellia)
+-add_test_suite(cipher cipher.aes)
+-add_test_suite(cipher cipher.camellia)
+-add_test_suite(cipher cipher.des)
+-add_test_suite(debug)
+-add_test_suite(des)
+-add_test_suite(dhm)
+-add_test_suite(error)
+-add_test_suite(hmac_shax)
+-add_test_suite(md)
+-add_test_suite(mdx)
+-add_test_suite(mpi)
+-add_test_suite(pkcs1_v21)
+-add_test_suite(shax)
+-add_test_suite(rsa)
+-add_test_suite(version)
+-add_test_suite(xtea)
+-add_test_suite(x509parse)
+++ /dev/null
---- a/Makefile
-+++ b/Makefile
-@@ -7,7 +7,7 @@ PREFIX=polarssl_
- all:
- cd library && $(MAKE) all && cd ..
- cd programs && $(MAKE) all && cd ..
-- cd tests && $(MAKE) all && cd ..
-+ #cd tests && $(MAKE) all && cd ..
-
- install:
- mkdir -p $(DESTDIR)/include/polarssl
-@@ -28,7 +28,7 @@ install:
- clean:
- cd library && $(MAKE) clean && cd ..
- cd programs && $(MAKE) clean && cd ..
-- cd tests && $(MAKE) clean && cd ..
-+ #cd tests && $(MAKE) clean && cd ..
-
- check:
- ( cd tests && $(MAKE) check )