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 no-idea no-rc5 no-mdc2"
11
INSTALL_PREFIX=/tmp/install
18
rm -rf ${INSTALL_PREFIX}/etc
19
rm -rf ${INSTALL_PREFIX}/usr
22
function get_openssl_version()
24
eval `grep '^VERSION=' Makefile.ssl`
25
if [ -z "${VERSION}" ]
27
echo "Error: Couldn't retrieve OpenSSL version from Makefile.ssl."
28
echo " Check value of variable VERSION in Makefile.ssl."
33
function base_install()
35
mkdir -p ${INSTALL_PREFIX}
37
make install INSTALL_PREFIX="${INSTALL_PREFIX}"
40
function doc_install()
42
DOC_DIR=${INSTALL_PREFIX}/usr/doc/openssl
45
cp CHANGES CHANGES.SSLeay INSTALL LICENSE NEWS README ${DOC_DIR}
50
function create_cygwin_readme()
52
README_DIR=${INSTALL_PREFIX}/usr/doc/Cygwin
53
README_FILE=${README_DIR}/openssl-${VERSION}.README
55
mkdir -p ${README_DIR}
56
cat > ${README_FILE} <<- EOF
57
The Cygwin version has been built using the following configure:
59
./config ${CONFIG_OPTIONS}
61
The IDEA, RC5 and MDC2 algorithms are disabled due to patent and/or
66
function create_profile_files()
68
PROFILE_DIR=${INSTALL_PREFIX}/etc/profile.d
71
cat > ${PROFILE_DIR}/openssl.sh <<- "EOF"
72
export MANPATH="${MANPATH}:/usr/ssl/man"
74
cat > ${PROFILE_DIR}/openssl.csh <<- "EOF"
76
setenv MANPATH "${MANPATH}:/usr/ssl/man"
78
setenv MANPATH ":/usr/ssl/man"
83
if [ -z "${SUBVERSION}" ]
85
echo "Usage: $0 subversion"
91
echo "You must start this script in the OpenSSL toplevel source dir."
95
./config ${CONFIG_OPTIONS}
112
strip usr/bin/*.exe usr/bin/*.dll
115
find etc usr/bin usr/doc usr/ssl/certs usr/ssl/man/man[157] usr/ssl/misc \
116
usr/ssl/openssl.cnf usr/ssl/private -empty -o \! -type d |
117
tar cjfT openssl-${VERSION}-${SUBVERSION}.tar.bz2 -
118
# Development package
119
find usr/include usr/lib usr/ssl/man/man3 -empty -o \! -type d |
120
tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 -
122
ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2
123
ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2