fix udhcp release patch
[openwrt.git] / openwrt / package / openssl / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openssl
6 PKG_VERSION:=0.9.7g
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=991615f73338a571b6a1be7d74906934
9
10 PKG_SOURCE_URL:=http://www.openssl.org/source/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc2 no-rc5
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,LIBOPENSSL,libopenssl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22 $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23
24 .NOTPARALLEL:
25
26 $(PKG_BUILD_DIR)/.configured:
27 $(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' $(PKG_BUILD_DIR)/Configure
28 (cd $(PKG_BUILD_DIR); \
29 PATH=$(TARGET_PATH) \
30 ./Configure linux-$(ARCH) \
31 --prefix=/usr \
32 --openssldir=/etc/ssl \
33 -I$(STAGING_DIR)/usr/include \
34 -L$(STAGING_DIR)/usr/lib -ldl \
35 $(OPENSSL_NO_CIPHERS) \
36 shared no-asm no-ec no-engine no-err no-fips no-hw no-krb5 no-threads zlib-dynamic \
37 )
38 touch $@
39
40 $(PKG_BUILD_DIR)/.built:
41 rm -rf $(PKG_INSTALL_DIR)
42 mkdir -p $(PKG_INSTALL_DIR)
43 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
44 CC="$(TARGET_CC)" \
45 AR="$(TARGET_CROSS)ar r" \
46 RANLIB="$(TARGET_CROSS)ranlib" \
47 all build-shared
48 # Work around openssl build bug to link libssl.so with libcrypto.so.
49 -rm $(PKG_BUILD_DIR)/libssl.so.*.*.*
50 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
51 CC=$(TARGET_CC) \
52 do_linux-shared
53 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
54 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
55 install
56 touch $@
57
58 $(IPKG_LIBOPENSSL):
59 install -d -m0755 $(IDIR_LIBOPENSSL)/usr/lib
60 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(IDIR_LIBOPENSSL)/usr/lib/
61 chmod 0644 $(IDIR_LIBOPENSSL)/usr/lib/*
62 $(RSTRIP) $(IDIR_LIBOPENSSL)
63 $(IPKG_BUILD) $(IDIR_LIBOPENSSL) $(PACKAGE_DIR)
64
65 $(IPKG_OPENSSL_UTIL):
66 install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl
67 cp -fpR $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(IDIR_OPENSSL_UTIL)/etc/ssl/
68 install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl/certs
69 install -d -m0700 $(IDIR_OPENSSL_UTIL)/etc/ssl/private
70 install -d -m0755 $(IDIR_OPENSSL_UTIL)/usr/bin
71 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/openssl $(IDIR_OPENSSL_UTIL)/usr/bin/
72 $(RSTRIP) $(IDIR_OPENSSL_UTIL)
73 $(IPKG_BUILD) $(IDIR_OPENSSL_UTIL) $(PACKAGE_DIR)
74
75 $(STAGING_DIR)/usr/lib/libssl.so: $(PKG_BUILD_DIR)/.built
76 mkdir -p $(STAGING_DIR)/usr/include
77 cp -fpR $(PKG_INSTALL_DIR)/usr/include/openssl $(STAGING_DIR)/usr/include/
78 mkdir -p $(STAGING_DIR)/usr/lib/
79 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(STAGING_DIR)/usr/lib/
80 touch $@
81
82 install-dev: $(STAGING_DIR)/usr/lib/libssl.so
83
84 uninstall-dev:
85 rm -rf \
86 $(STAGING_DIR)/usr/include/openssl \
87 $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} \
88
89 compile: install-dev
90 clean: uninstall-dev
This page took 0.058866 seconds and 5 git commands to generate.