linuxninja

Arch AUR session-desktop.patch for v1.0.8

May 23rd, 2020
2,936
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/.SRCINFO b/.SRCINFO
  2. index 01e9c64..bd461ca 100644
  3. --- a/.SRCINFO
  4. +++ b/.SRCINFO
  5. @@ -1,13 +1,16 @@
  6.  pkgbase = session-desktop
  7.         pkgdesc = Private messaging from your desktop
  8. -       pkgver = 1.0.6
  9. +       pkgver = 1.0.8
  10.         pkgrel = 1
  11.         url = https://getsession.org
  12.         install = session-desktop.install
  13.         arch = x86_64
  14.         license = GPL-3.0
  15.         makedepends = git
  16. +       makedepends = jq
  17.         makedepends = nvm
  18. +       makedepends = python
  19. +       makedepends = python2
  20.         makedepends = yarn
  21.         depends = libxtst
  22.         depends = nss
  23. @@ -21,12 +24,10 @@ pkgbase = session-desktop
  24.         conflicts = session-desktop-git
  25.         conflicts = session-desktop-appimage
  26.         options = !strip
  27. -       source = git+https://github.com/loki-project/session-desktop.git
  28. +       source = session-desktop-1.0.8.tar.gz::https://github.com/loki-project/session-desktop/archive/v1.0.8.tar.gz
  29.         source = session-desktop.desktop
  30. -       source = patch.diff.example
  31. -       sha256sums = SKIP
  32. -       sha256sums = 931e317b69e5c5ed3ef1f2ff0c82bf72b8706ab5ac50ad0564f3f164d7d5f7b8
  33. -       sha256sums = 327e29f1c2e52dfa285545d1459ea92651cb6c23c4f4a7b897e9f4382802021a
  34. +       sha256sums = d53736bad6210c52b4972c31d8d4852b050d43f0abc93bc809f902cd862a4562
  35. +       sha256sums = e5797f8d901dc15a289624b2c87a9a1b6e2dddf169c61e389d017d6af34ca092
  36.  
  37.  pkgname = session-desktop
  38.  
  39. diff --git a/PKGBUILD b/PKGBUILD
  40. index 1b44a48..f88058b 100644
  41. --- a/PKGBUILD
  42. +++ b/PKGBUILD
  43. @@ -1,69 +1,49 @@
  44.  # Maintainer: xXR01I1Xx <xxr01i1xx@tuta.io>
  45. -pkgname=session-desktop
  46. -pkgver=1.0.6
  47. -pkgrel=1
  48. -_commit=6438698
  49. +# Contributor: Linux Ninja <linuxninja at linuxninja dot guru>
  50. +pkgname='session-desktop'
  51. +pkgver='1.0.8'
  52. +pkgrel='1'
  53.  pkgdesc="Private messaging from your desktop"
  54. -arch=(x86_64)
  55. -url="https://getsession.org"
  56. +arch=('x86_64')
  57. +url='https://getsession.org'
  58.  license=('GPL-3.0')
  59. -depends=(libxtst nss alsa-lib libxss libnotify xdg-utils)
  60. -makedepends=('git' 'nvm' 'yarn')
  61. +depends=('libxtst' 'nss' 'alsa-lib' 'libxss' 'libnotify' 'xdg-utils')
  62. +makedepends=('git' 'jq' 'nvm' 'python' 'python2' 'yarn')
  63.  optdepends=('libappindicator-gtk3: for tray support')
  64. -provides=(session-messenger-desktop)
  65. -conflicts=(session-desktop-bin session-desktop-git session-desktop-appimage)
  66. +provides=('session-messenger-desktop')
  67. +conflicts=('session-desktop-bin' 'session-desktop-git' 'session-desktop-appimage')
  68.  options=(!strip)
  69. -install=$pkgname.install
  70. -source=('git+https://github.com/loki-project/session-desktop.git'
  71. -        'session-desktop.desktop'
  72. -        'patch.diff.example')
  73. -sha256sums=('SKIP'
  74. -            '931e317b69e5c5ed3ef1f2ff0c82bf72b8706ab5ac50ad0564f3f164d7d5f7b8'
  75. -            '327e29f1c2e52dfa285545d1459ea92651cb6c23c4f4a7b897e9f4382802021a')
  76. -
  77. -prepare() {
  78. -  cd $srcdir/session-desktop
  79. -  git checkout $_commit
  80. -  echo "Applying patch"
  81. -  sed "s/ver_placeholder/$pkgver/g" $srcdir/patch.diff.example > $srcdir/patch.diff
  82. -  git apply $srcdir/patch.diff
  83. -  source /usr/share/nvm/init-nvm.sh && nvm install 10.13.0
  84. -}
  85. +install="${pkgname}.install"
  86. +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/loki-project/${pkgname}/archive/v${pkgver}.tar.gz"
  87. +        "${pkgname}.desktop")
  88. +sha256sums=('d53736bad6210c52b4972c31d8d4852b050d43f0abc93bc809f902cd862a4562'
  89. +            'e5797f8d901dc15a289624b2c87a9a1b6e2dddf169c61e389d017d6af34ca092')
  90.  
  91.  build() {
  92. -  cd "$srcdir/session-desktop"
  93. -  source /usr/share/nvm/init-nvm.sh && nvm use --delete-prefix v10.13.0 --silent
  94. +  cd ${pkgname}-${pkgver}
  95. +  local nvmver=$(jq --raw-output .engines.node package.json | sed -e 's/\^//')
  96.    export SIGNAL_ENV=production
  97. +  source /usr/share/nvm/init-nvm.sh
  98. +  nvm install ${nvmver}
  99. +  nvm use --delete-prefix ${nvmver} --silent
  100.    yarn install --frozen-lockfile
  101.    yarn generate
  102.    yarn lint-full
  103. -  $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --publish=never --config.directories.output=release --linux tar.xz
  104. +  $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --publish=never --config.directories.output=release --linux dir
  105.  }
  106.  
  107.  package() {
  108. -  mkdir -p $pkgdir/usr/share/applications
  109. -  mkdir -p $pkgdir/opt/
  110. -  mkdir -p $pkgdir/usr/share/icons/hicolor/16x16/apps/
  111. -  mkdir -p $pkgdir/usr/share/icons/hicolor/24x24/apps/
  112. -  mkdir -p $pkgdir/usr/share/icons/hicolor/32x32/apps/
  113. -  mkdir -p $pkgdir/usr/share/icons/hicolor/48x48/apps/
  114. -  mkdir -p $pkgdir/usr/share/icons/hicolor/64x64/apps/
  115. -  mkdir -p $pkgdir/usr/share/icons/hicolor/128x128/apps/
  116. -  mkdir -p $pkgdir/usr/share/icons/hicolor/256x256/apps/
  117. -  mkdir -p $pkgdir/usr/share/icons/hicolor/512x512/apps/
  118. -  mkdir -p $pkgdir/usr/share/icons/hicolor/1024x1024/apps/
  119. -
  120. -  cp $srcdir/session-desktop/build/icons/png/16x16.png $pkgdir/usr/share/icons/hicolor/16x16/apps/session-messenger-desktop.png
  121. -  cp $srcdir/session-desktop/build/icons/png/24x24.png $pkgdir/usr/share/icons/hicolor/24x24/apps/session-messenger-desktop.png
  122. -  cp $srcdir/session-desktop/build/icons/png/32x32.png $pkgdir/usr/share/icons/hicolor/32x32/apps/session-messenger-desktop.png
  123. -  cp $srcdir/session-desktop/build/icons/png/48x48.png $pkgdir/usr/share/icons/hicolor/48x48/apps/session-messenger-desktop.png
  124. -  cp $srcdir/session-desktop/build/icons/png/64x64.png $pkgdir/usr/share/icons/hicolor/64x64/apps/session-messenger-desktop.png
  125. -  cp $srcdir/session-desktop/build/icons/png/128x128.png $pkgdir/usr/share/icons/hicolor/128x128/apps/session-messenger-desktop.png
  126. -  cp $srcdir/session-desktop/build/icons/png/256x256.png $pkgdir/usr/share/icons/hicolor/256x256/apps/session-messenger-desktop.png
  127. -  cp $srcdir/session-desktop/build/icons/png/512x512.png $pkgdir/usr/share/icons/hicolor/512x512/apps/session-messenger-desktop.png
  128. -  cp $srcdir/session-desktop/build/icons/png/1024x1024.png $pkgdir/usr/share/icons/hicolor/1024x1024/apps/session-messenger-desktop.png
  129. -
  130. -  tar xf $srcdir/session-desktop/release/session-messenger-desktop-linux-x64-$pkgver.tar.xz -C $pkgdir/opt/
  131. -  mv $pkgdir/opt/session-messenger-desktop-linux-x64-$pkgver $pkgdir/opt/Session
  132. -  cp $srcdir/session-desktop.desktop $pkgdir/usr/share/applications/
  133. +  cd ${pkgname}-${pkgver}
  134. +  install -Dm644 build/icons/png/16x16.png ${pkgdir}/usr/share/icons/hicolor/16x16/apps/session-messenger-desktop.png
  135. +  install -Dm644 build/icons/png/24x24.png ${pkgdir}/usr/share/icons/hicolor/24x24/apps/session-messenger-desktop.png
  136. +  install -Dm644 build/icons/png/32x32.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/session-messenger-desktop.png
  137. +  install -Dm644 build/icons/png/48x48.png ${pkgdir}/usr/share/icons/hicolor/48x48/apps/session-messenger-desktop.png
  138. +  install -Dm644 build/icons/png/64x64.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/session-messenger-desktop.png
  139. +  install -Dm644 build/icons/png/128x128.png ${pkgdir}/usr/share/icons/hicolor/128x128/apps/session-messenger-desktop.png
  140. +  install -Dm644 build/icons/png/256x256.png ${pkgdir}/usr/share/icons/hicolor/256x256/apps/session-messenger-desktop.png
  141. +  install -Dm644 build/icons/png/512x512.png ${pkgdir}/usr/share/icons/hicolor/512x512/apps/session-messenger-desktop.png
  142. +  install -Dm644 build/icons/png/1024x1024.png ${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/session-messenger-desktop.png
  143. +  install -Dm644 ${srcdir}/${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
  144. +  install -dm755 ${pkgdir}/opt/${pkgname}/
  145. +  mv release/linux-unpacked/* ${pkgdir}/opt/${pkgname}/
  146.  }
  147. diff --git a/patch.diff.example b/patch.diff.example
  148. deleted file mode 100644
  149. index e58f169..0000000
  150. --- a/patch.diff.example
  151. +++ /dev/null
  152. @@ -1,13 +0,0 @@
  153. -diff --git a/package.json b/package.json
  154. -index d05625c7..128028f8 100644
  155. ---- a/package.json
  156. -+++ b/package.json
  157. -@@ -2,7 +2,7 @@
  158. -   "name": "session-messenger-desktop",
  159. -   "productName": "Session",
  160. -   "description": "Private messaging from your desktop",
  161. --  "version": "1.0.5",
  162. -+  "version": "ver_placeholder",
  163. -   "license": "GPL-3.0",
  164. -   "author": {
  165. -     "name": "Loki Project",
  166. diff --git a/session-desktop.desktop b/session-desktop.desktop
  167. index 2b44f07..ab1657a 100644
  168. --- a/session-desktop.desktop
  169. +++ b/session-desktop.desktop
  170. @@ -1,6 +1,6 @@
  171.  [Desktop Entry]
  172.  Name=Session
  173. -Exec=/opt/Session/session-messenger-desktop %U
  174. +Exec=/opt/session-desktop/session-messenger-desktop %U
  175.  Terminal=false
  176.  Type=Application
  177.  Icon=session-messenger-desktop
  178. diff --git a/session-desktop.install b/session-desktop.install
  179. index 080ddd4..b769a3f 100644
  180. --- a/session-desktop.install
  181. +++ b/session-desktop.install
  182. @@ -1,5 +1,5 @@
  183.  post_install() {
  184. -    ln -sf /opt/Session/session-messenger-desktop /usr/bin/session-messenger-desktop
  185. +    ln -sf /opt/session-desktop/session-messenger-desktop /usr/bin/session-messenger-desktop
  186.      update-desktop-database /usr/share/applications
  187.      gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
  188.  }
RAW Paste Data