#!/bin/bash ## src2pkg script for: openssl ## Auto-generated by src2pkg-2.0 ## src2pkg - Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='openssl-0.9.8k.tar.bz2' NAME='openssl' # Use ALT_NAME to override guessed value VERSION='0.9.8k' # Use ALT_VERSION to override guessed value # ARCH='' # BUILD='1' # PRE_FIX='usr' # Any extra options go here: # Patent expiration dates: # IDEA: 5,214,703 2010-05-25, not included. # RC5: 5,724,428 2015-03-03, not included. EXTRA_CONFIGS="--prefix=/$PRE_FIX --openssldir=/etc/ssl no-idea no-rc5 no-sse2 no-engine shared" CONFIG_COMMAND='./config' # ignore errors caused by an empty Makefile in crypto/engine #MAKE_COMMAND='make -i depend all' # even better -disable 'engine' in EXTRA_CONFIGS MAKE_COMMAND='make depend all' PATCHLIST='openssl-patches/openssl.soname.diff openssl-patches/openssl.no-extssl.diff' case $ARCH in i486) PATCHLIST="$PATCHLIST openssl-patches/openssl.opts-i486.diff" ;; i586) PATCHLIST="$PATCHLIST openssl-patches/openssl.opts-i586.diff" ;; esac # this package is a good candidate for splitting docs,devel and solibs ! [[ $SPLIT_PACKAGE ]] && SPLIT_PACKAGE=solibs INSTALL_FAIL=JAIL # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. # build() { CODE } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # # manual fixup routines taken from AlienBob's openssl.SlackBuild ( cd $PKG_DIR/usr; mv lib lib${LIBDIRSUFFIX} &> /dev/null ) # fixup etc dir mv $PKG_DIR/etc/ssl/openssl.cnf $PKG_DIR/etc/ssl/openssl.cnf.new # Add a cron script to warn root if a certificate is going to expire soon: mkdir -p $PKG_DIR/etc/cron.daily zcat $PATCHES_DIR/$NAME-patches/certwatch.gz > $PKG_DIR/etc/cron.daily/certwatch.new chmod 755 $PKG_DIR/etc/cron.daily/certwatch.new ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} ; ldconfig -l * 2> /dev/null ) ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} ; ln -sf libcrypto.so.0 libcrypto.so ) ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} ; ln -sf libssl.so.0 libssl.so ) mv $PKG_DIR/etc/ssl/man $PKG_DIR/usr ( cd $PKG_DIR/usr/man/man1 ; mv passwd.1 ssl_passwd.1 ) ( cd $PKG_DIR/usr/man/man3 ; mv rand.3 ssl_rand.3 ) ( cd $PKG_DIR/usr/man/man3 ; mv err.3 ssl_err.3 ) ( cd $PKG_DIR ; sed -i -e "s#lib\$#lib${LIBDIRSUFFIX}#" usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc ) fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst case $SPLIT_PACKAGE in *-solibs-*) ( cd $PKG_BUILDS_DIR/$SOLIBS_PKG_NAME # manually install a doinst.sh for this package mkdir -p install cat $PATCHES_DIR/$NAME-patches/doinst.sh-openssl-solibs > install/doinst.sh ) ;; esac make_package post_process ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # DOCLIST='' PATCHLIST='' INSTALL_TYPE='' # CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE='' # When editing src2pkg scripts to add custom code, use these variables # to refer to the current directory, the sources or the package tree: # $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree) # Other commonly-used directories include: $DOC_DIR (document directory) # $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory)