HPKBUILD 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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=yuv
  16. pkgver=ijk-r0.2.1-dev
  17. pkgrel=0
  18. pkgdesc="libyuv is an open source project that includes YUV conversion and scaling functionality."
  19. url="https://github.com/bilibili/libyuv/branches"
  20. archs=("armeabi-v7a" "arm64-v8a" "x86_64")
  21. license=("BSD 3-Clause "New" or "Revised" License")
  22. depends=()
  23. makedepends=()
  24. install=
  25. source="https://codeload.github.com/bilibili/libyuv/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 ./lib$builddir-$pkgver/* ./$builddir/
  33. cp CMakeLists.txt $builddir/
  34. }
  35. build() {
  36. cd $builddir
  37. ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L
  38. ${MAKE} -C $ARCH-build
  39. ret=$?
  40. cd $OLDPWD
  41. return $ret
  42. }
  43. package() {
  44. cd $builddir
  45. mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/
  46. mkdir -p $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib
  47. cp -rf include/* $LYCIUM_ROOT/usr/$pkgname/$ARCH/include/
  48. cp -rf $ARCH-build/*.a $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/
  49. ret=$?
  50. cd $OLDPWD
  51. return $ret
  52. }
  53. check() {
  54. echo "Test MUST on OpenHarmony device!"
  55. }
  56. cleanbuild(){
  57. rm -rf ${PWD}/$builddir ${PWD}/lib$builddir-$pkgver ${PWD}/$pkgname
  58. }