Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@diddledan @flexiondotorg
290 lines (269 sloc) 6.73 KB
name: mycroft
summary: Your AI personal assistant!
description: >
Mycroft is a free and open-source intelligent personal assistant and knowledge
navigator for Linux-based operating systems that uses a natural language user
interface. It is the world’s first fully open-source AI voice assistant.
Mycroft is named after a fictional computer from 1966 science fiction novel
"The Moon Is a Harsh Mistress".
Installing skills by voice seems to be broken for now, but you can use
the `mycroft.msm` command to list, install, and remove skills.
adopt-info: mycroft
grade: stable
confinement: strict
base: core18
passthrough:
layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib:
symlink: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib
/usr/local/lib:
symlink: $SNAP/usr/lib
/usr/include:
bind: $SNAP/usr/include
/usr/share/alsa/alsa.conf:
symlink: $SNAP/etc/asound.conf
/etc/mycroft/mycroft.conf:
symlink: $SNAP/etc/mycroft/mycroft.conf
parts:
alsa:
# after: [alsa-lib, alsa-plugins]
plugin: nil
source: https://github.com/diddledan/snapcraft-alsa.git
override-pull: |
cat > asound.conf <<EOF
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
EOF
override-build: |
snapcraftctl build
install -m644 -D -t $SNAPCRAFT_PART_INSTALL/etc asound.conf
patches:
source: patches
plugin: dump
prime: [msm-skillsdir.diff]
scripts:
source: scripts
source-type: local
plugin: dump
organize:
mycroft-launch: bin/mycroft-launch
stage:
- bin/mycroft-launch
desktop:
source: desktop
plugin: dump
organize:
mycroft.desktop: usr/share/applications/mycroft.desktop
mycroft.png: usr/share/icons/mycroft.png
snapcraft-preload:
# Until sergiusens/snapcraft-preload#29 is merged
source: https://github.com/diddledan/snapcraft-preload.git
source-branch: semaphore-support
plugin: cmake
build-packages:
- on amd64:
- gcc-multilib
- g++-multilib
mimic:
after: [patches]
plugin: autotools
source: https://github.com/MycroftAI/mimic.git
source-type: git
source-depth: 1
configflags:
- --prefix=/usr
- --disable-static
- --with-audio=pulseaudio
override-pull: |
snapcraftctl pull
patch -Np1 < $SNAPCRAFT_STAGE/mimic-pulseaudio.diff
build-packages:
- libpcre2-dev
- libpulse-dev
stage-packages:
- libpcre2-8-0
- libpulse0
prime:
- usr/bin
- usr/include
- usr/lib
- -usr/lib/*.a
- -usr/lib/*.la
- -usr/lib/pkgconfig
- usr/share/mimic
mycroft-conf:
plugin: nil
override-pull: |
cat <<EOF > mycroft.conf
{
"enclosure": {
"platform": "snap",
"update": "false"
}
}
EOF
override-build:
install -m644 -D -t $SNAPCRAFT_PART_INSTALL/etc/mycroft mycroft.conf
mycroft-deps:
plugin: nil
override-stage: |
snapcraftctl stage
sed -i -E 's|(/usr/lib/x86_64-linux-gnu/libc_nonshared.a)|/snap/mycroft/current/\1|' \
$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libc.so
sed -i -E 's|(/usr/lib/x86_64-linux-gnu/libmvec_nonshared.a)|/snap/mycroft/current/\1|' \
$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libm.so
sed -i -E 's|(/usr/lib/x86_64-linux-gnu/libpthread_nonshared.a)|/snap/mycroft/current/\1|' \
$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libpthread.so
# sed -i -E -s 's|^prefix=/root/stage/usr|prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr|' $SNAPCRAFT_STAGE/usr/lib/*/pkgconfig/*.pc
organize:
usr/lib/*/*fann*.so*: usr/lib/
usr/bin/mpg123.bin: usr/bin/mpg123
stage-packages:
- libgdk-pixbuf2.0-0 # yad
- libgtk-3-0 # yad
- libfreetype6 # yad
- libfontconfig1 # yad
- libnotify4 # yad
- libnotify-bin
- yad
- binutils
- bison
- cmake
- curl
- flac
- g++
- gcc
- git
- jq
- libasound2-dev
- libasound2-plugins
- libc++-dev
- libc6-dev
- libfann-dev
- libffi-dev
- libglib2.0-dev
- libgpm2
- libicu-dev
- libjpeg-dev
- libpcre2-dev
- libpulse-dev
- libssl-dev
- libvlc-dev
- locales-all
- make
- mpg123
- mplayer
- patch
- pkg-config
- portaudio19-dev
- pulseaudio-utils
- python-gobject-2-dev
- python-setuptools
- python3-dev
- rsync
- swig
- vlc
- zlib1g
mycroft:
after: [mycroft-deps, snapcraft-preload, patches, mimic]
source: https://github.com/MycroftAI/mycroft-core.git
source-type: git
plugin: dump
override-pull: |
snapcraftctl pull
git checkout "$(git describe --tags --abbrev=0 --match release/v*)"
snapcraftctl set-version "$(git describe --tags | sed -e 's|release/v||')"
patch -Np1 -i "$SNAPCRAFT_STAGE/mycroft-cache.diff"
organize:
'*': mycroft-source/
'.*.yml': mycroft-source/
.gitignore: mycroft-source/
.gitmessage: mycroft-source/
.version: mycroft-source/
# mycroft-plasma:
# after: [desktop-qt5]
# source: https://anongit.kde.org/plasma-mycroft.git
# plugin: cmake
# configflags:
# - -DCMAKE_INSTALL_PREFIX=/usr
# - -DCMAKE_BUILD_TYPE=Release
# - -DKDE_INSTALL_LIBDIR=lib
# - -DKDE_INSTALL_USE_QT_SYS_PATHS=on
# override-build: |
# snapcraftctl build
# chmod +x usr/share/plasma/plasmoids/org.kde.plasma.mycroftplasmoid/contents/code/*service.sh
apps:
mycroft:
command: mycroft-launch start-all
plugs:
- desktop
- desktop-legacy
- mount-observe
- network
- network-bind
- pulseaudio
- x11
- wayland
msm:
command: mycroft-launch msm
plugs:
- desktop
- desktop-legacy
- network
- pulseaudio
- x11
- wayland
cli:
command: mycroft-launch client.text
plugs:
- desktop
- desktop-legacy
- network
- x11
- wayland
bus:
command: mycroft-launch messagebus.service
plugs:
- desktop
- desktop-legacy
- network
- network-bind
- x11
- wayland
skills:
command: mycroft-launch skills
plugs:
- desktop
- desktop-legacy
- mount-observe
- network
- x11
- wayland
audio:
command: mycroft-launch audio
plugs:
- desktop
- desktop-legacy
- network
- pulseaudio
- x11
- wayland
speech:
command: mycroft-launch client.speech
plugs:
- desktop
- desktop-legacy
- network
- pulseaudio
- x11
- wayland
You can’t perform that action at this time.