Advertisement
Guest User

0001-Add-support-for-aarch64.patch

a guest
Feb 16th, 2022
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. From 052fbf9f24af93a8c651cef6cc09b4cdf0225c46 Mon Sep 17 00:00:00 2001
  2. From: 1994 <1994intime@protonmail.com>
  3. Date: Wed, 16 Feb 2022 08:16:56 +0000
  4. Subject: [PATCH] Add support for aarch64
  5.  
  6. 1. Patched package.json so that we build for the 'dir' target. The
  7. 'deb' target is attempting to use an x86_64 version of fpm.
  8. We don't use the built target anyway.
  9.  
  10. 2. When the build is done on aarch64, the dist package directory is
  11. updated
  12. ---
  13. PKGBUILD | 14 ++++++++++++--
  14. package-json-dir-target.patch | 12 ++++++++++++
  15. 2 files changed, 24 insertions(+), 2 deletions(-)
  16. create mode 100644 package-json-dir-target.patch
  17.  
  18. diff --git a/PKGBUILD b/PKGBUILD
  19. index 10af11b..c5a0864 100644
  20. --- a/PKGBUILD
  21. +++ b/PKGBUILD
  22. @@ -14,13 +14,16 @@ options=('!strip')
  23. source=("${pkgname}-${pkgver}.tar.gz::https://github.com/adityapk00/zecwallet-lite/archive/v${pkgver}.tar.gz"
  24. "zecwallet-icons.tar.xz"
  25. "${pkgname}.desktop"
  26. + "package-json-dir-target.patch"
  27. )
  28. sha256sums=('0cca04b3e0bca8a99a3a6aadd167397a005460dfe5fc287ad0ec5a3dbee0d892'
  29. '19d8b4acee2c6ff062e86ecbb2365123d0471f2991192323780b53630104574d'
  30. - '7d596dda26bfb44a4b910b128a7f2c3c7734d0722312c28147ade706b25027d2')
  31. + '7d596dda26bfb44a4b910b128a7f2c3c7734d0722312c28147ade706b25027d2'
  32. + '151deee6257f5fae6984a45eaccc80906c1af142068ab3ebfe7ee9ccdd1f8f1f')
  33.  
  34. prepare() {
  35. cd "${pkgname}-${pkgver}"
  36. + patch -u package.json -i ${srcdir}/package-json-dir-target.patch
  37. #yarn lint-fix
  38. yarn install
  39. }
  40. @@ -36,7 +39,14 @@ package() {
  41.  
  42. cd "${pkgname}-${pkgver}"
  43. install -d "${pkgdir}/opt/${pkgname}/"
  44. - cp -ra dist/linux-unpacked/* "${pkgdir}/opt/${pkgname}/"
  45. +
  46. + unpackeddir='linux-unpacked'
  47. + if [ ${CARCH} = 'aarch64' ]
  48. + then
  49. + unpackeddir='linux-arm64-unpacked'
  50. + fi
  51. +
  52. + cp -ra dist/${unpackeddir}/* "${pkgdir}/opt/${pkgname}/"
  53. cd ..
  54.  
  55. # Icons
  56. diff --git a/package-json-dir-target.patch b/package-json-dir-target.patch
  57. new file mode 100644
  58. index 0000000..21eb933
  59. --- /dev/null
  60. +++ b/package-json-dir-target.patch
  61. @@ -0,0 +1,12 @@
  62. +--- package.json 2021-10-14 18:14:22.000000000 +0000
  63. ++++ package.json 2022-02-16 06:15:58.897046436 +0000
  64. +@@ -183,8 +183,7 @@
  65. + "category": "Development",
  66. + "icon": "./resources/icon.icns",
  67. + "target": [
  68. +- "deb",
  69. +- "AppImage"
  70. ++ "dir"
  71. + ],
  72. + "desktop": {
  73. + "Name": "ZecWallet Lite",
  74. --
  75. 2.35.1
  76.  
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement