[net] Telephony: Yate: Added conffiles. Fixes overwriting of configuration on reinst...
[openwrt/svn-archive/archive.git] / libs / axtls / Makefile
index f88238deff54843d9c198e062badc2e5b00bd67d..d719a9b366827d5b4e22dae73a267e3f60d9c0fe 100644 (file)
@@ -1,40 +1,48 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=axtls
-PKG_VERSION:=1.01
+PKG_VERSION:=1.2.4
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/axTLS
 PKG_SOURCE:=axTLS-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/axtls http://www.leroc.com.au/axTLS/
-PKG_MD5SUM:=ff71cb64234cad020f92bffa534ab2b8
-PKG_CAT:=zcat
+PKG_SOURCE_URL:=@SF/axtls
+PKG_MD5SUM:=4b7a6dafbe45357f63813410dae676fd
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libaxtls
+  SUBMENU:=SSL
   SECTION:=libs
   CATEGORY:=Libraries
+  SUBMENU:=SSL
   TITLE:=Embedded client/server TLSv1 SSL library
-  DESCRIPTION:=Embedded client/server TLSv1 SSL library.
   URL:=http://sourceforge.net/projects/axtls
 endef
 
-define Package/awhttpd
+define Package/axhttpd
+  SUBMENU:=Web Servers/Proxies
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libaxtls
-  TITLE:=Anti-Web webserver
-  DESCRIPTION:=Anti-Web webserver.
+  TITLE:=A small embedded web server using the axTLS library
   URL:=http://www.axtls.co.nr/
+  DEPENDS:=+libaxtls
+endef
+
+define Package/axtlswrap
+  SUBMENU:=SSL
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  TITLE:=A simple TLS/SSL wrapper using the axTLS library
+  URL:=http://sourceforge.net/projects/axtls
+  DEPENDS:=+libaxtls
 endef
 
 define Build/Configure
@@ -42,21 +50,44 @@ define Build/Configure
        $(MAKE) -C $(PKG_BUILD_DIR) oldconfig
 endef
 
+TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS)
+
+TARGET_CFLAGS += $(FPIC)
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
-               OPT_CFLAGS="$(TARGET_CFLAGS)" OPT_LDFLAGS=""
+               STRIP="/bin/true" \
+               OPT_CFLAGS="$(TARGET_CFLAGS)" OPT_LDFLAGS="" \
+               all
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               PREFIX="$(PKG_INSTALL_DIR)/usr" \
+               install
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/axTLS $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.{a,so*} $(1)/usr/lib/
 endef
 
 define Package/libaxtls/install
-       install -d -m0755 $(1)/usr/lib
-       install -m0755 $(PKG_BUILD_DIR)/libaxtls.so $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.so.* $(1)/usr/lib/
+endef
+
+define Package/axhttpd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/axhttpd $(1)/usr/sbin/
 endef
 
-define Package/awhttpd/install
-       install -d -m0755 $(1)/usr/sbin
-       install -m0755 $(PKG_BUILD_DIR)/awhttpd $(1)/usr/sbin/
+define Package/axtlswrap/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/_stage/axtlswrap $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,libaxtls))
-$(eval $(call BuildPackage,awhttpd))
+$(eval $(call BuildPackage,axhttpd))
+$(eval $(call BuildPackage,axtlswrap))