add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / libs / axtls / Makefile
1
2 # Copyright (C) 2006-2010 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:=axtls
11 PKG_VERSION:=1.2.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=axTLS-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/axtls
16 PKG_MD5SUM:=4b7a6dafbe45357f63813410dae676fd
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libaxtls
21   SUBMENU:=SSL
22   SECTION:=libs
23   CATEGORY:=Libraries
24   SUBMENU:=SSL
25   TITLE:=Embedded client/server TLSv1 SSL library
26   URL:=http://sourceforge.net/projects/axtls
27 endef
28
29 define Package/axhttpd
30   SUBMENU:=Web Servers/Proxies
31   SECTION:=net
32   CATEGORY:=Network
33   TITLE:=A small embedded web server using the axTLS library
34   URL:=http://www.axtls.co.nr/
35   DEPENDS:=+libaxtls
36 endef
37
38 define Package/axtlswrap
39   SUBMENU:=SSL
40   SECTION:=net
41   CATEGORY:=Network
42   SUBMENU:=Web Servers/Proxies
43   TITLE:=A simple TLS/SSL wrapper using the axTLS library
44   URL:=http://sourceforge.net/projects/axtls
45   DEPENDS:=+libaxtls
46 endef
47
48 define Build/Configure
49         $(CP) ./files/config $(PKG_BUILD_DIR)/config/.config
50         $(MAKE) -C $(PKG_BUILD_DIR) oldconfig
51 endef
52
53 TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components 1 $(TAR_OPTIONS)
54
55 TARGET_CFLAGS += $(FPIC)
56
57 define Build/Compile
58         $(MAKE) -C $(PKG_BUILD_DIR) \
59                 CC="$(TARGET_CC)" \
60                 STRIP="/bin/true" \
61                 OPT_CFLAGS="$(TARGET_CFLAGS)" OPT_LDFLAGS="" \
62                 all
63         $(MAKE) -C $(PKG_BUILD_DIR) \
64                 PREFIX="$(PKG_INSTALL_DIR)/usr" \
65                 install
66 endef
67
68 define Build/InstallDev
69         $(INSTALL_DIR) $(1)/usr/include
70         $(CP) $(PKG_INSTALL_DIR)/usr/include/axTLS $(1)/usr/include/
71
72         $(INSTALL_DIR) $(1)/usr/lib
73         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.{a,so*} $(1)/usr/lib/
74 endef
75
76 define Package/libaxtls/install
77         $(INSTALL_DIR) $(1)/usr/lib
78         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaxtls.so.* $(1)/usr/lib/
79 endef
80
81 define Package/axhttpd/install
82         $(INSTALL_DIR) $(1)/usr/sbin
83         $(CP) $(PKG_INSTALL_DIR)/usr/bin/axhttpd $(1)/usr/sbin/
84 endef
85
86 define Package/axtlswrap/install
87         $(INSTALL_DIR) $(1)/usr/sbin
88         $(INSTALL_BIN) $(PKG_BUILD_DIR)/_stage/axtlswrap $(1)/usr/sbin/
89 endef
90
91 $(eval $(call BuildPackage,libaxtls))
92 $(eval $(call BuildPackage,axhttpd))
93 $(eval $(call BuildPackage,axtlswrap))