Add some mirrors
[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 MAKEDEPPROG="$(TARGET_CC)" \
45 depend
46 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
47 CC="$(TARGET_CC)" \
48 CCOPTS="$(TARGET_CFLAGS) -fomit-frame-pointer" \
49 AR="$(TARGET_CROSS)ar r" \
50 RANLIB="$(TARGET_CROSS)ranlib" \
51 all build-shared
52 # Work around openssl build bug to link libssl.so with libcrypto.so.
53 -rm $(PKG_BUILD_DIR)/libssl.so.*.*.*
54 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
55 CC=$(TARGET_CC) \
56 CCOPTS="$(TARGET_CFLAGS) -fomit-frame-pointer" \
57 do_linux-shared
58 $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
59 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
60 install
61 touch $@
62
63 $(IPKG_LIBOPENSSL):
64 install -d -m0755 $(IDIR_LIBOPENSSL)/usr/lib
65 cp -fp $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.so.* $(IDIR_LIBOPENSSL)/usr/lib/
66 chmod 0644 $(IDIR_LIBOPENSSL)/usr/lib/*
67 $(RSTRIP) $(IDIR_LIBOPENSSL)
68 $(IPKG_BUILD) $(IDIR_LIBOPENSSL) $(PACKAGE_DIR)
69
70 $(IPKG_OPENSSL_UTIL):
71 install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl
72 cp -fp $(PKG_INSTALL_DIR)/etc/ssl/openssl.cnf $(IDIR_OPENSSL_UTIL)/etc/ssl/
73 install -d -m0755 $(IDIR_OPENSSL_UTIL)/etc/ssl/certs
74 install -d -m0700 $(IDIR_OPENSSL_UTIL)/etc/ssl/private
75 install -d -m0755 $(IDIR_OPENSSL_UTIL)/usr/bin
76 cp -fp $(PKG_INSTALL_DIR)/usr/bin/openssl $(IDIR_OPENSSL_UTIL)/usr/bin/
77 $(RSTRIP) $(IDIR_OPENSSL_UTIL)
78 $(IPKG_BUILD) $(IDIR_OPENSSL_UTIL) $(PACKAGE_DIR)
79
80 $(STAGING_DIR)/usr/lib/libssl.so: $(PKG_BUILD_DIR)/.built
81 mkdir -p $(STAGING_DIR)/usr/include
82 cp -fpR $(PKG_INSTALL_DIR)/usr/include/openssl $(STAGING_DIR)/usr/include/
83 mkdir -p $(STAGING_DIR)/usr/lib/
84 cp -fp $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} $(STAGING_DIR)/usr/lib/
85 touch $@
86
87 install-dev: $(STAGING_DIR)/usr/lib/libssl.so
88
89 uninstall-dev:
90 rm -rf \
91 $(STAGING_DIR)/usr/include/openssl \
92 $(STAGING_DIR)/usr/lib/lib{crypto,ssl}.{a,so*} \
93
94 compile: install-dev
95 clean: uninstall-dev
This page took 0.053153 seconds and 5 git commands to generate.