diff options
author | Eric Hameleers <alien@slackware.com> | 2009-09-06 14:43:54 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2009-09-06 14:43:54 +0000 |
commit | 48754133cb93d88d343ceb122912dbe6d8c92979 (patch) | |
tree | a17b706f2e297e85498dbf77854c331be6bdf34a /truecrypt/build/truecrypt.SlackBuild | |
parent | c48724a36d09c07c91483e5e3128263bf16f1af0 (diff) | |
download | asb-48754133cb93d88d343ceb122912dbe6d8c92979.tar.gz asb-48754133cb93d88d343ceb122912dbe6d8c92979.tar.xz |
Attempt to download and use external RSA headers
Diffstat (limited to '')
-rwxr-xr-x | truecrypt/build/truecrypt.SlackBuild | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/truecrypt/build/truecrypt.SlackBuild b/truecrypt/build/truecrypt.SlackBuild index afc4f7d0..759d1239 100755 --- a/truecrypt/build/truecrypt.SlackBuild +++ b/truecrypt/build/truecrypt.SlackBuild @@ -87,6 +87,36 @@ SRCURL[0]="" SOURCE[1]="$SRCDIR/wxWidgets-${WX}.tar.gz" SRCURL[1]="http://dl.sourceforge.net/wxwindows/wxWidgets-${WX}.tar.gz" +SOURCE[2]="$SRCDIR/pks-11-v2-20.tar.bz2" +SRCURL[2]="" + +# Use the src_checkout() function if no downloadable tarball exists. +# This function checks out sources from SVN/CVS and creates a tarball of them. +src_checkout() { + # Param #1 : index in the SOURCE[] array. + # Param #2 : full path to where SOURCE[$1] tarball should be created. + # Determine the tarball extension: + PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.gz|tar.bz2|tgz).*/\1/') + if [ "$PEXT" == "${2}" ]; then # we did not find a allowed extension + echo "Archive can only have extension '.tar.gz' '.tar.bz2' or '.tgz'" + exit 1 + else + [ "$PEXT" = "tar.bz2" ] && TARCOMP="j" || TARCOMP="z" + fi + case ${1} in + 2) # pks-11 + mkdir pks-11-v2-20 \ + && cd pks-11-v2-20 \ + && wget ftp://mirror.switch.ch/mirror/pkcs/pkcs-11/v2-20/*.h \ + && chown -R root:root . \ + && cd .. \ + && tar -${TARCOMP}cf ${2} pks-11-v2-20 + rm -rf pks-11-v2-20 + ;; + *) # Do nothing + ;; + esac +} ## ## --- with a little luck, you won't have to edit below this point --- ## ## @@ -123,18 +153,22 @@ rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build # Source file availability: for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do if ! [ -f ${SOURCE[$i]} ]; then + echo "Source '$(basename ${SOURCE[$i]})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})" if ! [ "x${SRCURL[$i]}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})" - echo "Source '$(basename ${SOURCE[$i]})' not available yet..." echo "Will download file to $(dirname $SOURCE[$i])" - wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true - if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then + if ! $(wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}"); then echo "Downloading '$(basename ${SOURCE[$i]})' failed.. aborting the build." mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL exit 1 fi else + # Try if we have a SVN/CVS download routine for ${SOURCE[$i]} + echo "Will checkout sources to $(dirname $SOURCE[$i])" + src_checkout $i "${SOURCE[$i]}" 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE[$i]}).log + fi + if [ ! -f "${SOURCE[$i]}" -o ! -s "${SOURCE[$i]}" ]; then echo "File '$(basename ${SOURCE[$i]})' not available.. aborting the build." exit 1 fi @@ -172,8 +206,8 @@ chmod -R u+w,go+r-w,a-s . echo Building ... export LDFLAGS="$SLKLDFLAGS" -export CXXFLAGS="$SLKCFLAGS" -export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS -I../pks-11-v2-20" +export CFLAGS="$SLKCFLAGS -I../pks-11-v2-20" # First build a static wxGTK, then build truecrypt: make WX_ROOT=$(cd ../wxWidgets-$WX; pwd) VERBOSE=1 wxbuild 2>&1 | tee $OUTPUT/make-${PRGNAM}.log |