#!/bin/bash
# Copyright (c) 2000-2018 Synology Inc. All rights reserved.

make DESTDIR=$TmpInstDir install_sw install_ssldirs

rm -f $TmpInstDir/usr/bin/c_rehash
rm -rf $TmpInstDir/usr/include
rm -rf $TmpInstDir/usr/lib/{engines-1.1,pkgconfig,*.*a}
rm -rf $TmpInstDir/etc/ssl

if [ "x$NOSTRIP" != "xNOSTRIP" ]; then
	$STRIP $TmpInstDir/usr/bin/openssl
	$STRIP $TmpInstDir/usr/lib/*.so*
fi

install -Dm644 synology/openssl.cnf $TmpInstDir/etc/ssl/openssl.cnf
