# OpenSSL, http://www.openssl.org

name=openssl
version=0.9.6g
source=($name-$version.tar.gz)

build() {
    cd $name-$version
    ./config --prefix=/usr --openssldir=/etc/ssl
    make
    make INSTALL_PREFIX=$PKG install
    make do_linux-shared
    cp -a lib*.so* $PKG/usr/lib
    strip $PKG/usr/lib/*.so $PKG/usr/bin/*
    ( cd $PKG/usr/lib ; ln -sf libcrypto.so.0.9.6 libcrypto.so )
    ( cd $PKG/usr/lib ; ln -sf libssl.so.0.9.6 libssl.so )
    mv $PKG/etc/ssl/man $PKG/usr
    ( cd $PKG/usr/man/man1 ; mv passwd.1 ssl_passwd.1 )
    ( cd $PKG/usr/man/man3 ; mv rand.3 ssl_rand.3 )
    gzip -9 $PKG/usr/man/man?/*
}
