LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mycroft-core.spec of Package mycroft-core (Project home:alarrosa:packages)

#
# spec file for package mycroft-core
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define numversion 18.2.0

Name:           mycroft-core
Version:        18.2.0beta
Release:        0
Summary:        The Mycroft Artificial Intelligence platform
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        GPL-3.0
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group:          System/GUI/Other
Url:            https://mycroft.ai
Source:         https://github.com/MycroftAI/%{name}/archive/release/v%{numversion}.tar.gz
Source1:        version.json
Source2:        mycroft-bus.service
Source3:        mycroft-skills.service
Source4:        mycroft-audio.service
Source5:        mycroft-voice.service
Source6:        mycroft.target
Source7:        SKILL_README.md
Source8:        mycroft.conf
Source9:        mycroft-user-template.conf
Source10:       create-initial-user-configuration.sh
Source11:       skills-fallback-wolfram-alpha.patch
Source12:       skills-skill-reminder.patch
Source13:       skills-mycroft-youtube.patch
Source14:       skills-mycroft-music-skill.patch
Source15:       skills-skill-desktop-launcher.patch
Source16:       skills-fallback-duckduckgo.patch
Source17:       skills-skill-autogui.patch
Patch3:         0002-Make-speech-client-python3-compatible.patch
Patch4:         0003-Make-text-client-python2-3-compatible.patch
Patch5:         0004-Fix-hashes-in-settings-for-python3.patch
Patch6:         0005-Fix-test-cases-under-python-3.patch
Patch7:         0006-Remove-backwards-compatibility-with-python-2.7.patch
Patch8:         0008-Fix-cli-crash-with-Python-3.patch
Patch9:         0010-Use-sorted-json-to-perform-hash-of-settings.patch
Patch10:        0013-Remove-backwards-compatibility-from-tests.patch
Patch1000:      fix-installation-paths.patch
Patch1001:      use-pycodestyle-instead-of-pep8.patch
Patch1002:      msm-use-python3.patch
Patch1003:      msm-add-local-patch-support.patch
BuildRequires:  fdupes
BuildRequires:  python3-devel
BuildRequires:  python3-PyChromecast
BuildRequires:  python3-PyRIC
BuildRequires:  python3-SpeechRecognition >= 3.8.1
BuildRequires:  python3-adapt-parser
BuildRequires:  python3-astral
BuildRequires:  python3-fann2 >= 1.0.7
BuildRequires:  python3-future >= 0.16.0
BuildRequires:  python3-google-api-python-client >= 1.6.4
BuildRequires:  python3-gTTS
BuildRequires:  python3-gTTS-token
BuildRequires:  python3-inflection >= 0.3.1
BuildRequires:  python3-monotonic
BuildRequires:  python3-python-dateutil
BuildRequires:  python3-padatious
BuildRequires:  python3-parsedatetime
BuildRequires:  python3-pep8
BuildRequires:  python3-psutil
BuildRequires:  python3-pulsectl
BuildRequires:  python3-pyalsaaudio
BuildRequires:  python3-pyee >= 1.0.1
BuildRequires:  python3-pyjokes
BuildRequires:  python3-pyowm
BuildRequires:  python3-python-vlc
BuildRequires:  python3-requests-futures
BuildRequires:  python3-wikipedia
BuildRequires:  python3-xmlrunner
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools
BuildRequires:  python3-Pillow
BuildRequires:  python3-pyserial >= 3.0
BuildRequires:  python3-PyYAML
#BuildRequires:  python3-pystache >= 0.5.4
BuildRequires:  python3-six
BuildRequires:  python3-tornado
BuildRequires:  python3-virtualenv
BuildRequires:  python3-websocket-client
BuildRequires:  python3-gobject
BuildRequires:  libtool
BuildRequires:  libffi-devel
BuildRequires:  openssl-devel
BuildRequires:  autoconf
BuildRequires:  bison
BuildRequires:  swig
BuildRequires:  glib2-devel
#BuildRequires:  s3cmd
BuildRequires:  portaudio-devel
BuildRequires:  mpg123
BuildRequires:  mpg123-pulse
BuildRequires:  pkgconfig
BuildRequires:  libicu-devel
BuildRequires:  automake
BuildRequires:  libjpeg62-devel
Requires:       mimic
Requires:       python3-PyChromecast
Requires:       python3-PyRIC
Requires:       python3-SpeechRecognition >= 3.8.1
Requires:       python3-adapt-parser
Requires:       python3-fann2 >= 1.0.7
Requires:       python3-future >= 0.16.0
Requires:       python3-google-api-python-client >= 1.6.4
Requires:       python3-gTTS >= 1.1.7
Requires:       python3-gTTS-token
Requires:       python3-inflection
Requires:       python3-monotonic
Requires:       python3-python-dateutil
Requires:       python3-padatious
Requires:       python3-parsedatetime
Requires:       python3-pycodestyle
Requires:       python3-psutil
Requires:       python3-pulsectl
Requires:       python3-pyalsaaudio
Requires:       python3-pyee
Requires:       python3-python-vlc
Requires:       python3-requests-futures
Requires:       python3-xmlrunner
Requires:       python3-pip
Requires:       python3-setuptools
Requires:       python3-Pillow
Requires:       python3-pyserial
Requires:       python3-PyYAML
#Requires:       python3-pystache
Requires:       python3-six
Requires:       python3-tornado
Requires:       python3-virtualenv
Requires:       python3-virtualenvwrapper
Requires:       python3-websocket-client >= 0.32.0
Requires:       python3-gobject
#--- Requirements of the default skills
Requires:       python3-pytz
Requires:       python3-tzlocal
Requires:       python3-astral >= 1.4
Requires:       python3-pyowm
Requires:       python3-arrow
Requires:       python3-duckduckgo2
Requires:       python3-humanhash3
Requires:       python3-requests
Requires:       python3-feedparser
Requires:       python3-pyjokes
Requires:       python3-netifaces
Requires:       python3-multi_key_dict
Requires:       python3-wikipedia
Requires:       python3-wolframalpha
# Required by Plasma skills
Requires:       python3-dbus-python
Requires:       python3-python-aiml
Requires:       python3-python-xlib
Requires:       python3-PyAutoGUI
Requires:       python3-num2words
#----
Requires:       openssl
Requires:       portaudio
Requires:       mpg123
Requires:       mpg123-pulse
Requires:       screen
Requires:       curl
Requires:       jq
Requires:       git
Requires:       patch
Recommends:     espeak
Recommends:     plasma-mycroft
Recommends:     vlc
BuildArch:      noarch
%systemd_requires

%description
Mycroft is a hackable open source voice assistant.

%prep
%setup -q -n %{name}-release-v%{numversion}
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch1000 -p1
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
sed -i -s "s/==.*//" requirements.txt
sed -i -s "s,#!/usr/bin/env bash,#!/bin/bash," scripts/my-info.sh
sed -i -s "s,#!/usr/bin/env bash,#!/bin/bash," scripts/prepare-msm.sh
sed -i -s "s,#!/usr/bin/env bash,#!/bin/bash," skiller.sh

%build
python3 mycroft-base-setup.py build

%install
python3 mycroft-base-setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -D -m 0755 msm/msm %{buildroot}%{_bindir}/msm
mkdir -p %{buildroot}%{_datadir}/mycroft-core/skills
install -D -m644 %{S:1} %{buildroot}%{_datadir}/mycroft-core/version.json
install -d %{buildroot}%{_userunitdir}/
install -m 0644 %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} %{buildroot}%{_userunitdir}/
install -D -m644 %{S:7} %{buildroot}%{_docdir}/mycroft-core/SKILL_README.md
install -D -m644 mycroft/configuration/mycroft.conf %{buildroot}%{_docdir}/mycroft-core/mycroft.conf
install -D -m644 %{S:8}     %{buildroot}%{_sysconfdir}/mycroft/mycroft.conf
install -D -m644 %{S:9}     %{buildroot}%{_datadir}/mycroft-core/mycroft-user-template.conf
install -D -m755 %{S:10}    %{buildroot}%{_datadir}/mycroft-core/create-initial-user-configuration.sh
install -D -m755 skiller.sh %{buildroot}%{_datadir}/mycroft-core/skiller.sh
install -D -m644 %{S:11}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/fallback-wolfram-alpha.patch
install -D -m644 %{S:12}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/skill-reminder.patch
install -D -m644 %{S:13}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/mycroft-youtube.patch
install -D -m644 %{S:14}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/mycroft-music-skill.patch
install -D -m644 %{S:15}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/skill-desktop-launcher.patch
install -D -m644 %{S:16}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/fallback-duckduckgo.patch
install -D -m644 %{S:17}    %{buildroot}%{_datadir}/mycroft-core/skill-patches/skill-autogui.patch

%fdupes %{buildroot}/%{python3_sitelib}/mycroft

%post
echo "*** ATTENTION ***"
echo ""
echo "* You can configure your Mycroft instance preferences systemwide at:"
echo "    /etc/mycroft/mycroft.conf"
echo "  or locally for your user at:"
echo "    ~/.mycroft/mycroft.conf"
echo ""
echo "* The systemd units are"
echo "    - mycroft.target"
echo "    - mycroft-bus.service"
echo "    - mycroft-skills.service"
echo "    - mycroft-audio.service"
echo "    - mycroft-voice.service"
echo ""
echo "* Those are USER units which you can start issuing:"
echo "    systemctl --user daemon-reload"
echo "    systemctl --user start mycroft.target"
echo "  and stop with:"
echo "    systemctl --user stop mycroft.target"
echo ""
echo "* If you installed plasma-mycroft from packages, then it will"
echo "  start/stop the services automatically when enabling/disabling"
echo "  Mycroft from the user interface."

%files
%defattr(-,root,root)
%doc README.md LICENSE.md ACKNOWLEDGEMENTS.md
%doc msm/man/man1/msm.1
%{_docdir}/mycroft-core
%dir %{_sysconfdir}/mycroft
%config %{_sysconfdir}/mycroft/mycroft.conf
%{_bindir}/mycroft-audio
%{_bindir}/mycroft-audio-test
%{_bindir}/mycroft-cli-client
%{_bindir}/mycroft-echo-observer
%{_bindir}/mycroft-enclosure-client
%{_bindir}/mycroft-messagebus
%{_bindir}/mycroft-skill-container
%{_bindir}/mycroft-skills
%{_bindir}/mycroft-speech-client
%{_bindir}/msm
%{_datadir}/mycroft-core
%{_userunitdir}/mycroft-bus.service
%{_userunitdir}/mycroft-skills.service
%{_userunitdir}/mycroft-audio.service
%{_userunitdir}/mycroft-voice.service
%{_userunitdir}/mycroft.target
%{python3_sitelib}/mycroft/
%{python3_sitelib}/mycroft_core-%{numversion}-py%{py3_ver}.egg-info

%changelog