diff options
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | mycroft-core.install | 28 |
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c39ec06f179a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +# Generated by mksrcinfo v8 +# Mon Dec 26 23:10:27 UTC 2016 +pkgbase = mycroft-core + pkgdesc = Mycroft Core, the Mycroft Artificial Intelligence platform. Contribute to this package at: https://gitlab.com/rafamanzo/aur-mycroft-core + pkgver = 0.7.20.eb0a37c + pkgrel = 1 + url = https://github.com/MycroftAI/mycroft-core + install = mycroft-core.install + arch = i686 + arch = x86_64 + license = GPLv3 + makedepends = sudo + depends = git + depends = python2 + depends = python2-virtualenv + depends = python2-setuptools + depends = python2-gobject2 + depends = python-virtualenvwrapper + depends = libtool + depends = libffi + depends = openssh + depends = autoconf + depends = bison + depends = swig + depends = glib2 + depends = s3cmd + depends = portaudio + depends = mpg123 + depends = flac + depends = curl + depends = mimic-git + depends = alsa-utils + source = git://github.com/MycroftAI/mycroft-core.git#commit=eb0a37c + sha512sums = SKIP + +pkgname = mycroft-core + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..d98522ed3103 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pkg.tar.xz +mycroft-core/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7129a0d31389 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Rafael Reggiani Manzo <rr.manzo#protonmail.com> + +pkgname=mycroft-core +_pkgcommit=eb0a37c +pkgver=0.7.20.${_pkgcommit} +pkgrel=1 +pkgdesc="Mycroft Core, the Mycroft Artificial Intelligence platform. Contribute to this package at: https://gitlab.com/rafamanzo/aur-mycroft-core" +arch=('i686' 'x86_64') +url='https://github.com/MycroftAI/mycroft-core' +license=('GPLv3') +depends=('git' + 'python2' + 'python2-virtualenv' + 'python2-setuptools' + 'python2-gobject2' + 'python-virtualenvwrapper' + 'libtool' + 'libffi' + 'openssh' + 'autoconf' + 'bison' + 'swig' + 'glib2' + 's3cmd' + 'portaudio' + 'mpg123' + 'flac' + 'curl' + 'mimic-git' + 'alsa-utils') +makedepends=('sudo') +optdepends=() +conflicts=() +install=mycroft-core.install +# changelog=ChangeLog +# FIXME: The tarball is outdated and not able to pair with home.mycroft.ai +#source=("https://codeload.github.com/MycroftAI/mycroft-core/tar.gz/release/${pkgver}") +#sha512sums=('cd86a76b4131db1b5a172b617ee8ff46d60b8094b8dec9e3a88fe976f7d6c4d9b65b44fd62984d1ce5c8c761f15a341291677b9c1bccc50fead80727b474bca5') +source=("git://github.com/MycroftAI/mycroft-core.git#commit=${_pkgcommit}") +sha512sums=(SKIP) # Git already ensures data consistency + +# Valid only when using a tarball +# prepare(){ +# tar xzfv "${pkgver}" +# } + +# build() {} + +package() { + mkdir -p ${pkgdir}/usr/share/ + cp -R mycroft-core ${pkgdir}/usr/share/ +} diff --git a/mycroft-core.install b/mycroft-core.install new file mode 100644 index 000000000000..67ca2333d647 --- /dev/null +++ b/mycroft-core.install @@ -0,0 +1,28 @@ +pre_install() { + useradd -r mycroft-core -b /usr/share +} + +post_install() { + chown -R mycroft-core:mycroft-core /usr/share/mycroft-core + + # install packages + touch /usr/share/mycroft-core/.bashrc + echo "# Virtualenv initialization" >> /usr/share/mycroft-core/.bashrc + echo "export WORKON_HOME=\$HOME/.virtualenvs" >> /usr/share/mycroft-core/.bashrc + echo "export PROJECT_HOME=\$HOME/Devel" >> /usr/share/mycroft-core/.bashrc + echo "source /usr/bin/virtualenvwrapper.sh" >> /usr/share/mycroft-core/.bashrc + + sudo -u mycroft-core bash -c 'source ~/.bashrc' &> /dev/null # Initialize virtualenv + + sudo -u mycroft-core bash -c 'source ~/.bashrc && mkvirtualenv mycroft --system-site-packages -p $(which python2)' + sudo -u mycroft-core bash -c 'source ~/.bashrc && workon mycroft && pip install -r /usr/share/mycroft-core/requirements.txt' +} + +post_upgrade() { + sudo -u mycroft-core bash -c "source ~/.bashrc && workon mycroft && pip install -r /usr/share/mycroft-core/requirements.txt" +} + +post_remove() { + userdel mycroft-core + rm -rf /usr/share/mycroft-core +} |