HPKBUILD 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright (c) 2023 Huawei Device Co., Ltd.
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS,
  10. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. # See the License for the specific language governing permissions and
  12. # limitations under the License.
  13. # Contributor: yaofangyong <2385605052@qq.com>
  14. # Maintainer: yaofangyong <2385605052@qq.com>
  15. pkgname=soundtouch
  16. pkgver=ijk-r0.1.2-dev
  17. pkgrel=0
  18. pkgdesc="SoundTouch is an open-source audio processing library that allows changing the sound tempo, pitch and playback rate parameters independently from each other"
  19. url="https://github.com/bilibili/soundtouch/branches"
  20. archs=("armeabi-v7a" "arm64-v8a" "x86_64")
  21. license=("LGPL-2.1")
  22. depends=()
  23. makedepends=()
  24. install=
  25. source="https://codeload.github.com/bilibili/$pkgname/zip/refs/heads/$pkgver"
  26. autounpack=ture
  27. downloadpackage=ture
  28. builddir=$pkgname
  29. packagename=$builddir-$pkgver.zip
  30. prepare() {
  31. mkdir -p $builddir/$ARCH-build
  32. cp -rf ./$builddir-$pkgver/* ./$builddir/
  33. cp soundtouch_config.h ./$builddir/include/
  34. cp CMakeLists.txt $builddir/
  35. }
  36. build() {
  37. cd $builddir
  38. ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L
  39. ${MAKE} -C $ARCH-build
  40. ret=$?
  41. cd $OLDPWD
  42. return $ret
  43. }
  44. package() {
  45. cd $builddir
  46. mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/
  47. mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib
  48. cp -rf *.h $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/
  49. cp -rf include/* $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/
  50. cp -rf $ARCH-build/*.a $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/
  51. ret=$?
  52. cd $OLDPWD
  53. return $ret
  54. }
  55. check() {
  56. echo "Test MUST on OpenHarmony device!"
  57. }
  58. cleanbuild(){
  59. rm -rf ${PWD}/$builddir ${PWD}/$builddir-$pkgver ${PWD}/$pkgname
  60. }