Permalink
Browse files

Merge branch 'master' of github.com:sm/sm-tools

  • Loading branch information...
2 parents 0dccfde + 83474d5 commit 48849bd71500840373d997972261e337185790b3 @wayneeseguin wayneeseguin committed Dec 26, 2011
Showing with 42 additions and 2 deletions.
  1. +3 −1 curl/config/defaults
  2. +1 −0 curl/config/md5
  3. +1 −1 curl/map
  4. +37 −0 curl/shell/functions
View
4 curl/config/defaults
@@ -1,3 +1,5 @@
-version=7.21.4
+version=7.23.1
archive_format=tar.bz2
base_url=http://curl.haxx.se/download
+configure_flags=--with-ssl
+package_dependencies=openssl
View
1 curl/config/md5
@@ -1 +1,2 @@
+curl-7.23.1.tar.bz2=0296d3196b4bf82c896a869b38dbc5f2
curl-7.21.4.tar.bz2=e2dd20c88a7d01c745af9d788545ab2a
View
2 curl/map
@@ -1,2 +1,2 @@
-
+generate/certs=curl_generate_cert()
setup=setup
View
37 curl/shell/functions
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+curl_preconfigure()
+{
+ package configure flags "--with-ca-bundle=${install_path}/lib/ca-bundle.crt"
+}
+
+curl_postinstall()
+{
+ curl_generate_cert silent
+}
+
+curl_generate_cert()
+{
+ if [[ -z "${source_path}" ]]
+ then __sm.package.init
+ fi
+
+ if [[ -d ${source_path}/${package_dir}/lib ]]
+ then
+ (
+ builtin cd "${source_path}/${package_dir}/lib"
+ pwd
+ ls -l | less
+ if ./mk-ca-bundle.pl
+ then
+ install ca-bundle.crt ${install_path}/lib/ca-bundle.crt
+ [[ "$1" == "silent" ]] || __sm.log.log "Certificates updated." >&2
+ else
+ [[ "$1" == "silent" ]] || __sm.log.error "Can not update certificates." >&2
+ fi
+ ) >/dev/null
+ else
+ __sm.log.error "Please install curl first."
+ return 1
+ fi
+}

0 comments on commit 48849bd

Please sign in to comment.