summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2020-09-07 19:18:57 +0200
committerMichel Zou2020-09-07 19:18:57 +0200
commitb3bbb4352aaa4c9085e182e610de20955f6c80c4 (patch)
treebcc34a785c46ede515f58302c53894fe121b1279
parentf13d7c98d8fe9251824297a28fcba61d44d201f0 (diff)
downloadaur-b3bbb4352aaa4c9085e182e610de20955f6c80c4.tar.gz
submodule
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD24
2 files changed, 14 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a2fe10ef15ce..4b550b0807e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -11,9 +11,8 @@ pkgbase = deepspeech
makedepends = python-wheel
makedepends = git
makedepends = sox
+ makedepends = wget
source = DeepSpeech-0.8.2::git+https://github.com/mozilla/DeepSpeech.git#tag=v0.8.2
- source = git+https://github.com/mozilla/tensorflow.git#branch=r2.2
- sha256sums = SKIP
sha256sums = SKIP
pkgname = deepspeech
diff --git a/PKGBUILD b/PKGBUILD
index b3dfa568bd27..1242b1ab2b64 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,19 +7,21 @@ pkgdesc="A TensorFlow implementation of Baidu's DeepSpeech architecture"
arch=('x86_64')
url="https://github.com/mozilla/DeepSpeech"
license=('MPL2')
-makedepends=('bazel=2.0.0' 'python-numpy' 'python-pip' 'python-wheel' 'git' 'sox')
-source=("${_pkgname}-${pkgver}::git+https://github.com/mozilla/DeepSpeech.git#tag=v${pkgver//_/-}"
- "git+https://github.com/mozilla/tensorflow.git#branch=r2.2")
-sha256sums=('SKIP' 'SKIP')
+makedepends=('bazel=2.0.0' 'python-numpy' 'python-pip' 'python-wheel' 'git' 'sox' 'wget')
+source=("${_pkgname}-${pkgver}::git+https://github.com/mozilla/DeepSpeech.git#tag=v${pkgver}")
+sha256sums=('SKIP')
prepare()
{
- cd "$srcdir/tensorflow"
- ln -sf "../${_pkgname}-${pkgver//_/-}/native_client" ./
+ cd "$srcdir/${_pkgname}-${pkgver}"
+ git submodule sync tensorflow/
+ git submodule update --init tensorflow/
+ cd tensorflow
+ ln -sf ../native_client
}
build() {
- cd "$srcdir/tensorflow"
+ cd "$srcdir/${_pkgname}-${pkgver}/tensorflow"
export PYTHON_BIN_PATH=/usr/bin/python
export USE_DEFAULT_PYTHON_LIB_PATH=1
export TF_NEED_OPENCL_SYCL=0
@@ -35,7 +37,7 @@ build() {
bazel build --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden //native_client:libdeepspeech.so
- cd "${srcdir}/${_pkgname}-${pkgver//_/-}/native_client"
+ cd "${srcdir}/${_pkgname}-${pkgver}/native_client"
make deepspeech SOX_LDFLAGS="-lsox -Wl,-no-undefined"
make bindings -C python
make bindings -C ctcdecode
@@ -43,16 +45,16 @@ build() {
package_deepspeech() {
depends=('sox')
- cd "${srcdir}/${_pkgname}-${pkgver//_/-}/native_client"
+ cd "${srcdir}/${_pkgname}-${pkgver}/native_client"
PREFIX="${pkgdir}"/usr make install
}
package_python-deepspeech() {
pkgdesc="DeepSpeech Python bindings"
depends=('deepspeech' 'python-numpy')
- cd "${srcdir}/${_pkgname}-${pkgver//_/-}/native_client"
+ cd "${srcdir}/${_pkgname}-${pkgver}/native_client"
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps python/dist/deepspeech*.whl
PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps ctcdecode/dist/ds_ctcdecoder*.whl
mv "$pkgdir/usr/bin/deepspeech" "$pkgdir/usr/bin/deepspeech_python"
- cp -rv "${srcdir}/${_pkgname}-${pkgver//_/-}/training/deepspeech_training" "$pkgdir"`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
+ cp -rv "${srcdir}/${_pkgname}-${pkgver}/training/deepspeech_training" "$pkgdir"`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
}