Addded script as signed fix, added roles for ansible (not tested).
This commit is contained in:
commit
d62c521caf
37
gspeech-installer_20180321.sh
Normal file
37
gspeech-installer_20180321.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This is a "Signed fix" script.
|
||||
|
||||
# Define a fix name.
|
||||
name=gspeech-installer_20180321.sh
|
||||
|
||||
# Finding domain
|
||||
domain=$(awk '/search/ { print $2 }' /etc/resolv.conf)
|
||||
|
||||
# If already applied, skip
|
||||
if [[ -f "/var/lib/${domain}/fixes/${name}.done" ]]; then
|
||||
echo "Already fixed with ${name}. Skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Doing the stuff.
|
||||
apt-get update
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -qy --force-yes \
|
||||
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
|
||||
python-gst0.10 python-gtk2 libttspico-utils python-notify \
|
||||
gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
|
||||
gstreamer0.10-pulseaudio python-appindicator sox git
|
||||
|
||||
pushd /opt
|
||||
git clone https://github.com/tuxmouraille/gSpeech.git gSpeech
|
||||
popd &>/dev/null
|
||||
|
||||
install -m 0644 -o root -g root gspeech.desktop /opt/gSpeech/gspeech.desktop
|
||||
ln -sf /opt/gSpeech/gspeech.desktop /usr/share/applications/gspeech.desktop
|
||||
|
||||
unset DEBIAN_FRONTEND
|
||||
|
||||
# Create flag file for skipping
|
||||
mkdir -p "/var/lib/${domain}/fixes"
|
||||
echo "$(date --iso | tr -d '-')" > "/var/lib/${domain}/fixes/${name}.done"
|
10
gspeech.desktop
Normal file
10
gspeech.desktop
Normal file
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=gSpeech
|
||||
GenericName=gSpeech
|
||||
Comment=a simple GUI for SVox Pico TTS
|
||||
Exec=/opt/gSpeech/gSpeech.sh
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility;Accessibility;
|
||||
NoDisplay=false
|
||||
Icon=/opt/gSpeech/icons/gSpeech-it-IT.svg
|
1
roles/gspeech/files/gspeech.desktop
Symbolic link
1
roles/gspeech/files/gspeech.desktop
Symbolic link
@ -0,0 +1 @@
|
||||
../../../gspeech.desktop
|
25
roles/gspeech/tasks/installation.yml
Normal file
25
roles/gspeech/tasks/installation.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
# Installation from github sources
|
||||
|
||||
- name: Installation from github
|
||||
git:
|
||||
repo: 'https://github.com/tuxmouraille/gSpeech.git'
|
||||
dest: /opt/gSpeech
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Installing desktop file
|
||||
copy:
|
||||
src: gspeech.desktop
|
||||
dest: /opt/gSpeech/gspeech.desktop
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: Linking desktop file where it can be found by system
|
||||
file:
|
||||
src: /opt/gSpeech/gspeech.desktop
|
||||
dest: /usr/share/applications/gspeech.desktop
|
||||
state: link
|
12
roles/gspeech/tasks/main.yml
Normal file
12
roles/gspeech/tasks/main.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
# Installing gSpeech from sources (python scripts)
|
||||
|
||||
- include: prerequisites.yml
|
||||
tags:
|
||||
- gspeech
|
||||
- gspeech-prereq
|
||||
|
||||
- include: installation.yml
|
||||
tags:
|
||||
- gspeech
|
||||
- gspeech-install
|
18
roles/gspeech/tasks/prerequisites.yml
Normal file
18
roles/gspeech/tasks/prerequisites.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Dependencies for gSpeech
|
||||
apt:
|
||||
name:
|
||||
- python-gst0.10
|
||||
- python-gtk2
|
||||
- libttspico-utils
|
||||
- python-notify
|
||||
- gstreamer0.10-plugins-base
|
||||
- gstreamer0.10-plugins-good
|
||||
- gstreamer0.10-pulseaudio
|
||||
- python-appindicator
|
||||
- sox
|
||||
- git
|
||||
state: present
|
||||
update_cache: yes
|
||||
become: yes
|
||||
become_user: root
|
Loading…
Reference in New Issue
Block a user