update axtls to 1.1.4, rename awhttpd to axhttpd, (un)install dev files
[openwrt/svn-archive/archive.git] / libs / axtls / Makefile
index 591af37..778a38b 100644 (file)
@@ -9,32 +9,31 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=axtls
-PKG_VERSION:=1.01
+PKG_VERSION:=1.1.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_MD5SUM:=baf34d35459c6cb15e2c3a683b3233c2
 PKG_CAT:=zcat
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/axTLS
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libaxtls
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Embedded client/server TLSv1 SSL library
-  DEPENDS:=libgdbm
-  DESCRIPTION:=Embedded client/server TLSv1 SSL library.
   URL:=http://sourceforge.net/projects/axtls
 endef
 
-define Package/awhttpd
+define Package/axhttpd
   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/
 endef
 
@@ -46,18 +45,36 @@ endef
 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
+       mkdir -p $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/axTLS $(STAGING_DIR)/usr/include/
+       mkdir -p $(STAGING_DIR)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.{a,so*} $(STAGING_DIR)/usr/lib/
+endef
+
+define Build/UninstallDev
+       rm -rf \
+               $(STAGING_DIR)/usr/include/axTLS \
+               $(STAGING_DIR)/usr/lib/libaxtls.{a,so*}
 endef
 
 define Package/libaxtls/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libaxtls.so $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.so.* $(1)/usr/lib/
 endef
 
-define Package/awhttpd/install
+define Package/axhttpd/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/awhttpd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/axhttpd $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,libaxtls))
-$(eval $(call BuildPackage,awhttpd))
+$(eval $(call BuildPackage,axhttpd))