InstallDev should be using (1) and not (STAGING_DIR)
[openwrt/svn-archive/archive.git] / libs / xyssl / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=xyssl
12 PKG_VERSION:=0.7
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
16 PKG_SOURCE_URL:=http://xyssl.org/code/download/
17 PKG_MD5SUM:=f6422c393a4ca72577331f373c6c4248
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/xyssl/Default
22 TITLE:=Embedded SSL
23 URL:=http://xyssl.org/
24 endef
25
26 define Package/libxyssl/Default/description
27 The aim of the XySSL project is to provide a quality, open-source
28 cryptographic library written in C and targeted at embedded systems.
29 endef
30
31 define Package/libxyssl
32 $(call Package/xyssl/Default)
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE+= (library)
36 endef
37
38 define Package/xyssl-progs
39 $(call Package/xyssl/Default)
40 SECTION:=utils
41 CATEGORY:=Utilities
42 DEPENDS:=+libxyssl
43 TITLE+= (programs)
44 endef
45
46 define Build/Configure
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 $(TARGET_CONFIGURE_OPTS) \
52 OFLAGS="$(TARGET_CFLAGS)" \
53 all
54 $(MAKE) -C $(PKG_BUILD_DIR) \
55 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
56 install
57 endef
58
59 define Build/InstallDev
60 mkdir -p $(1)/usr/include
61 $(CP) $(PKG_INSTALL_DIR)/usr/include/xyssl $(1)/usr/include/
62 mkdir -p $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxyssl.{a,so} $(1)/usr/lib/
64 endef
65
66 define Build/UninstallDev
67 rm -rf $(STAGING_DIR)/usr/include/xyssl \
68 $(STAGING_DIR)/usr/lib/libxyssl.{a,so}
69 endef
70
71 define Package/libxyssl/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libxyssl.so $(1)/usr/lib/
74 endef
75
76 define Package/xyssl-progs/install
77 $(INSTALL_DIR) $(1)/usr/bin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xyssl_* $(1)/usr/bin/
79 endef
80
81 $(eval $(call BuildPackage,libxyssl))
82 $(eval $(call BuildPackage,xyssl-progs))