From 0d68c91641fdfbd7a67b2c6a02521fe05e96e1ae Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Mon, 11 Aug 2003 13:25:42 +0000 Subject: [PATCH] "Upgrade" to the new build structure --- openssl/build.sh | 107 +++++++++++++++++++++++++++++++++++++++++++++++ openssl/makepkg2 | 48 --------------------- 2 files changed, 107 insertions(+), 48 deletions(-) create mode 100755 openssl/build.sh delete mode 100755 openssl/makepkg2 diff --git a/openssl/build.sh b/openssl/build.sh new file mode 100755 index 0000000..7e266e7 --- /dev/null +++ b/openssl/build.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# +# This is a generic build.sh script +# It can be used nearly unmodified with many packages +# +# The concept of "method" registering and the logic that implements it was shamelessly +# stolen from jhlj's Compile.sh script :) +# +# Check the following 4 variables before running the script +topdir=openssl +version=0.9.6j +pkgver=1 +source[0]=$topdir-$version.tar.gz +# If there are no patches, simply comment this +#patch[0]= + +# Source function library +. ${BUILDPKG_BASE}/scripts/buildpkg.functions + +# Fill in pkginfo values if necessary +# using pkgname,name,pkgcat,pkgvendor & pkgdesc +pkgname=SBossl +name="OpenSSL - Secure Socket Layer" +pkgcat="library" +pkgvendor="http://www.openssl.org" +pkgdesc="Toolkit implementing SSL v2/v3 and TLS v1" + +# Define script functions and register them +METHODS="" +reg() { + METHODS="$METHODS $1" +} + +reg prep +prep() +{ + generic_prep +} + +reg build +build() +{ + setdir source + ./config + $MAKE_PROG +} + +reg install +install() +{ + generic_install INSTALL_PREFIX +} + +reg pack +pack() +{ + generic_pack +} + +reg distclean +distclean() +{ + clean distclean +} + +################################################### +# No need to look below here +################################################### + +reg all +all() +{ + for METHOD in $METHODS + do + case $METHOD in + all*|*clean) ;; + *) $METHOD + ;; + esac + done + +} + +reg +usage() { + echo Usage $0 "{"$(echo $METHODS | tr " " "|")"}" + exit 1 +} + +OK=0 +for METHOD in $* +do + METHOD=" $METHOD *" + if [ "${METHODS%$METHOD}" == "$METHODS" ] ; then + usage + fi + OK=1 +done + +if [ $OK = 0 ] ; then + usage; +fi + +for METHOD in $* +do + ( $METHOD ) +done diff --git a/openssl/makepkg2 b/openssl/makepkg2 deleted file mode 100755 index e255f71..0000000 --- a/openssl/makepkg2 +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# Create a SSH package from a pre-built sourcedir -# - Filelist was updated for 3.1p1 release -# -PKGVER=0.9.7 -PKGMK=/usr/bin/pkgmk -PKGTRANS=/usr/bin/pkgtrans -STRIP=/usr/ccs/bin/strip -DESTBASE=/export/home/tgc/buildpkg/openssl/build -BUILDBASE=/export/home/tgc/buildpkg/openssl/src/openssl-$PKGVER -PKGBASE=/export/home/tgc/buildpkg/openssl -PROTOTYPE=/export/home/tgc/buildpkg/openssl/meta/prototype -PKGOUT=openssl-$PKGVER-sol8-sparcv9-localssl -PKGNAME=SBossl - -sed -e "s#%%pkg%%#$PKGNAME#g" \ - -e "s#%%version%%#$PKGVER#g" $PKGBASE/meta/pkginfo.in > $PKGBASE/meta/pkginfo - -echo "Assembling files for $PKGNAME package" -# Clean out any old files -rm -rf $DESTBASE - -# Goto $BUILDBASE and do a make INSTALL_PREFIX=$DESTBASE install -cd $BUILDBASE -make INSTALL_PREFIX=$DESTBASE install -cd .. - -# strip binaries -cd $DESTBASE -find . -type f -perm +x |xargs $STRIP - -echo "Building package" -# Create a package-instance ready for installation or transfer to a data-stream - -# Create prototype file... -cd $DESTBASE/usr/local -find . -print|pkgproto > $PKGBASE/meta/prototype.in -cat $PKGBASE/meta/prototype.in | awk 'BEGIN { print "i pkginfo=../meta/pkginfo"; } \ - { $5="root"; $6="bin"; print; }' > $PKGBASE/meta/prototype - -cd $DESTBASE/usr/local -$PKGMK -r $DESTBASE/usr/local -d $PKGBASE -o -f $PROTOTYPE - -echo "Translating package into data-stream format" -# Transfer the package to data-stream format -$PKGTRANS -o -s $PKGBASE $PKGBASE/dist/$PKGOUT $PKGNAME - -echo "Done. Package is in $PKGBASE/dist/$PKGOUT"