Switch to OPAM2 for trad installs; install Liquidsoap 1.3.6
This commit is contained in:
parent
40d7548bc9
commit
d84e188774
|
@ -905,24 +905,11 @@ class Liquidsoap extends AbstractBackend implements EventSubscriberInterface
|
|||
*/
|
||||
public static function getBinary()
|
||||
{
|
||||
$user_base = \dirname(APP_INCLUDE_ROOT);
|
||||
$new_path = $user_base . '/.opam/system/bin/liquidsoap';
|
||||
|
||||
$legacy_path = '/usr/bin/liquidsoap';
|
||||
|
||||
if (APP_INSIDE_DOCKER) {
|
||||
// Docker revisions 3 and later use the `radio` container.
|
||||
return (APP_DOCKER_REVISION >= 3)
|
||||
? '/usr/local/bin/liquidsoap'
|
||||
: $new_path;
|
||||
// Docker revisions 3 and later use the `radio` container.
|
||||
if (APP_INSIDE_DOCKER && APP_DOCKER_REVISION < 3) {
|
||||
return '/var/azuracast/.opam/system/bin/liquidsoap';
|
||||
}
|
||||
|
||||
if (file_exists($new_path)) {
|
||||
return $new_path;
|
||||
}
|
||||
if (file_exists($legacy_path)) {
|
||||
return $legacy_path;
|
||||
}
|
||||
return false;
|
||||
return '/usr/local/bin/liquidsoap';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ else
|
|||
fi
|
||||
|
||||
APP_ENV="${APP_ENV:-production}"
|
||||
UPDATE_REVISION="${UPDATE_REVISION:-34}"
|
||||
UPDATE_REVISION="${UPDATE_REVISION:-35}"
|
||||
|
||||
echo "Updating AzuraCast (Environment: $APP_ENV, Update revision: $UPDATE_REVISION)"
|
||||
|
||||
|
|
|
@ -34,33 +34,50 @@
|
|||
args:
|
||||
chdir: "{{ app_base }}/servers/icecast2"
|
||||
|
||||
- name: Install OPAM
|
||||
apt: pkg="opam" install_recommends=yes state=latest
|
||||
- name: Clear OPAM directory
|
||||
file:
|
||||
path: /var/azuracast/.opam
|
||||
state: absent
|
||||
|
||||
- name: Install LiquidSoap Dependencies
|
||||
- name: Install OPAM Binary
|
||||
get_url:
|
||||
url: https://github.com/ocaml/opam/releases/download/2.0.3/opam-2.0.3-x86_64-linux
|
||||
dest: "/usr/bin/opam"
|
||||
force: yes
|
||||
mode: 0755
|
||||
|
||||
- name: Install Liquidsoap Dependencies
|
||||
become_user: azuracast
|
||||
apt:
|
||||
name: "{{ packages }}"
|
||||
state: latest
|
||||
install_recommends: no
|
||||
vars:
|
||||
packages:
|
||||
- libpcre3-dev
|
||||
- libfaad-dev
|
||||
- libfdk-aac-dev
|
||||
- libflac-dev
|
||||
- libmad0-dev
|
||||
- libmp3lame-dev
|
||||
- libtag1-dev
|
||||
- libfaad-dev
|
||||
- libflac-dev
|
||||
- libogg-dev
|
||||
- libopus-dev
|
||||
- libpcre3-dev
|
||||
- libssl-dev
|
||||
- pkg-config
|
||||
- libtag1-dev
|
||||
- libvorbis-dev
|
||||
- m4
|
||||
- aspcud
|
||||
- camlp4
|
||||
- pkg-config
|
||||
|
||||
- name: Build LiquidSoap
|
||||
- name: Build and Install Liquidsoap
|
||||
become_user: azuracast
|
||||
shell: "opam init -a && opam update && opam install -y taglib.0.3.3 mad.0.4.5 faad.0.3.3 fdkaac.0.2.1 lame.0.3.3 vorbis.0.7.0 cry.0.6.0 flac.0.1.2 opus.0.1.2 duppy.0.8.0 ssl liquidsoap.1.3.3"
|
||||
shell: "opam init -a && opam install -y taglib.0.3.3 mad.0.4.5 faad.0.4.0 fdkaac.0.2.1 lame.0.3.3 vorbis.0.7.0 cry.0.6.0 flac.0.1.2 opus.0.1.2 duppy.0.8.0 ssl liquidsoap.1.3.6"
|
||||
args:
|
||||
chdir: "{{ app_base }}"
|
||||
executable: "bash" # Fixes a hanging issue.
|
||||
|
||||
- name: Link Liquidsoap binary
|
||||
file:
|
||||
src: /var/azuracast/.opam/default/bin/liquidsoap
|
||||
dest: /usr/local/bin/liquidsoap
|
||||
state: link
|
||||
force: yes
|
||||
|
|
|
@ -3,15 +3,16 @@
|
|||
file: path="{{ item }}" state=touch mode="a+x"
|
||||
with_items:
|
||||
- "{{ www_base }}/update.sh"
|
||||
- "{{ www_base }}/bin/azuracast"
|
||||
|
||||
- name: Run AzuraCast Setup (Install Mode)
|
||||
become: true
|
||||
become_user: azuracast
|
||||
shell: php {{ util_base }}/cli.php azuracast:setup
|
||||
shell: php {{ app_base }}/bin/azuracast.php azuracast:setup
|
||||
when: update_mode|bool == false
|
||||
|
||||
- name: Run AzuraCast Setup (Update Mode)
|
||||
become: true
|
||||
become_user: azuracast
|
||||
shell: php {{ util_base }}/cli.php azuracast:setup --update
|
||||
when: update_mode|bool == true
|
||||
shell: php {{ app_base }}/bin/azuracast.php azuracast:setup --update
|
||||
when: update_mode|bool == true
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
roles:
|
||||
- init
|
||||
- azuracast-config
|
||||
- { role: azuracast-radio, when: update_revision|int < 33 }
|
||||
- { role: azuracast-radio, when: update_revision|int < 35 }
|
||||
- { role: supervisord, when: update_revision|int < 13 }
|
||||
- { role: mariadb, when: update_revision|int < 15 }
|
||||
- { role: nginx, when: update_revision|int < 30 }
|
||||
|
|
Loading…
Reference in New Issue