3 # This script configures, builds and packs the binary package for
4 # the Cygwin net distribution version of OpenSSL
7 # Uncomment when debugging
10 CONFIG_OPTIONS
="--prefix=/usr shared zlib no-idea no-rc5"
11 INSTALL_PREFIX
=/tmp
/install
/INSTALL
19 rm -rf ${INSTALL_PREFIX}/etc
20 rm -rf ${INSTALL_PREFIX}/usr
23 function get_openssl_version
()
25 eval `grep '^VERSION=' Makefile`
26 if [ -z "${VERSION}" ]
28 echo "Error: Couldn't retrieve OpenSSL version from Makefile."
29 echo " Check value of variable VERSION in Makefile."
32 eval `grep '^SHLIB_VERSION_NUMBER=' Makefile`
33 if [ -z "${SHLIB_VERSION_NUMBER}" ]
35 echo "Error: Couldn't retrieve OpenSSL shared lib version from Makefile."
36 echo " Check value of variable SHLIB_VERSION_NUMBER in Makefile."
41 function base_install
()
43 mkdir
-p ${INSTALL_PREFIX}
45 make install INSTALL_PREFIX
="${INSTALL_PREFIX}"
48 function doc_install
()
50 DOC_DIR
=${INSTALL_PREFIX}/usr
/share
/doc
/openssl
53 cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README
${DOC_DIR}
58 function certs_install
()
60 CERTS_DIR
=${INSTALL_PREFIX}/usr
/ssl
/certs
63 cp -rp certs
/* ${CERTS_DIR}
66 function create_cygwin_readme
()
68 README_DIR
=${INSTALL_PREFIX}/usr
/share
/doc
/Cygwin
69 README_FILE
=${README_DIR}/openssl-
${VERSION}.README
71 mkdir
-p ${README_DIR}
72 cat > ${README_FILE} <<- EOF
73 The Cygwin version has been built using the following configure:
75 ./config ${CONFIG_OPTIONS}
77 The IDEA and RC5 algorithms are disabled due to patent and/or
82 function create_profile_files
()
84 PROFILE_DIR
=${INSTALL_PREFIX}/etc
/profile.d
87 cat > ${PROFILE_DIR}/openssl.sh
<<- "EOF"
88 export MANPATH="${MANPATH}:/usr/ssl/man"
90 cat > ${PROFILE_DIR}/openssl.csh <<- "EOF"
92 setenv MANPATH "${MANPATH}:/usr/ssl/man"
94 setenv MANPATH ":/usr/ssl/man"
99 if [ -z "${SUBVERSION}" ]
101 echo "Usage: $0 subversion"
107 echo "You must start this script in the OpenSSL toplevel source dir."
111 ./config ${CONFIG_OPTIONS}
115 make depend || exit 1
130 chmod u+w usr/lib/engines/*.so
131 strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so
132 chmod u-w usr/lib/engines/*.so
135 tar cjf libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \
138 find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \
139 usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc usr/ssl/openssl.cnf \
141 -empty -o \! -type d |
142 tar cjfT openssl-${VERSION}-${SUBVERSION}.
tar.bz2
-
143 # Development package
144 find usr
/include usr
/lib
/*.a usr
/lib
/pkgconfig usr
/ssl
/man
/man3 \
145 -empty -o \
! -type d |
146 tar cjfT openssl-devel-
${VERSION}-${SUBVERSION}.
tar.bz2
-
148 ls -l openssl-
${VERSION}-${SUBVERSION}.
tar.bz2
149 ls -l openssl-devel-
${VERSION}-${SUBVERSION}.
tar.bz2
150 ls -l libopenssl
${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.
tar.bz2