Complété merge x86_64 -> trunk, reste à tester
[hvlinux.git] / stage2 / cis-openssl
index 838653d..6299cee 100755 (executable)
@@ -1,23 +1,42 @@
 #!/bin/sh
-# First argument of this script is the package name
+set -o errexit
+
+# First argument of this script is the package name.
+# Remaining arguments are additional configure options.
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
 source ../functions
 source ../packages-list
 
+PACKAGE=${1}
+shift
+CONFIGURE_OPTS=${*}
+
 # Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${PACKAGE}
 
-cd ${LFS_TMP}/${1} &&
-./config \
+cd ${LFS_TMP}/${PACKAGE}
+decompress_package ${OPENSSL_ROOT_CERTS} ./ 1> /dev/null
+MAKEDEPPROG=gcc CC=gcc ./config \
+    --prefix=/usr \
     --openssldir=/etc/ssl \
-    --prefix=/usr shared &&
-# Install the man pages in /usr/share/man instead of the default
-# which is /etc/ssl/man
-make -j ${MAKEJOBS} MANDIR=/usr/share/man &&
-make -j ${MAKEJOBS} MANDIR=/usr/share/man install &&
-cp -v -r certs /etc/ssl
-
-# Return last error
+    shared \
+    zlib-dynamic
+MAKEDEPPROG=gcc CC=gcc make
+
+# Install man pages in /usr/share/man instead of /etc/ssl/man
+make MANDIR=/usr/share/man install
+install -v -d -m755 /usr/share/doc/${PACKAGE}
+cp -v -r doc/{HOWTO,README,*.{txt,html,gif}} \
+    /usr/share/doc/${PACKAGE}
+
+cp -rv certs /etc/ssl
+
+# Create a single file that contains all of the installed certificates:
+for pem in /etc/ssl/certs/*.pem; do
+   cat $pem
+   echo ""
+done > /etc/ssl/ca-bundle.crt
+
 exit $?