Skip to content

Instantly share code, notes, and snippets.

@dginther
Created September 19, 2014 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dginther/d820cba132259997f379 to your computer and use it in GitHub Desktop.
Save dginther/d820cba132259997f379 to your computer and use it in GitHub Desktop.
{% set libsodium = pillar.get('libsodium', {}) -%}
{% set version = libsodium.get('version', '0.7.0') -%}
{% set source = libsodium.get('source_root', '/usr/local/src') -%}
{% set libsodium_package = source + '/libsodium-' + version + '.tar.gz' -%}
get_libsodium:
pkg.installed:
- names:
- libcurl4-openssl-dev
- build-essential
file.managed:
- name: {{ libsodium_package }}
- source: http://download.dnscrypt.org/libsodium/releases/libsodium-{{ version }}.tar.gz
cmd.wait:
- cwd: {{ source }}
- name: tar -zxvf {{ libsodium_package }}
- require:
- pkg: get_libsodium
- watch:
- file: get_libsodium
libsodium:
cmd.wait:
- cwd: {{ source + 'libsodium-' + version }}
- name: ./configure && make && make install
- watch:
- cmd: get_libsodium
- require:
- cmd: get_libsodium
@dginther
Copy link
Author

      ID: get_libsodium
Function: file.managed
    Name: /usr/local/src/libsodium-0.7.0.tar.gz
  Result: False
 Comment: Unable to determine upstream hash of source file http://download.dnscrypt.org/libsodium/releases/libsodium-0.7.0.tar.gz
 Changes: 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment