diff options
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 84 | ||||
-rw-r--r-- | noto-emoji.patch | 65 | ||||
-rw-r--r-- | openssl-linking.patch | 19 | ||||
-rw-r--r-- | signal-desktop.desktop | 9 |
5 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..04dc95da3e46 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = signal-desktop-noto + pkgdesc = Electron application that links with Signal on mobile (Noto emoji version) + pkgver = 1.29.1 + pkgrel = 1 + url = https://github.com/Skycoder42/Signal-Desktop-Noto + arch = x86_64 + license = GPL3 + makedepends = yarn + makedepends = git + makedepends = python2 + makedepends = nodejs>=12.4.0 + makedepends = npm + makedepends = python + depends = electron + provides = signal + provides = signal-desktop + replaces = signal + replaces = signal-desktop + source = signal-desktop-1.29.1.tar.gz::https://github.com/signalapp/Signal-Desktop/archive/v1.29.1.tar.gz + source = signal-desktop.desktop + source = openssl-linking.patch + source = noto-emoji.patch + sha512sums = 09c843074eefe66e5452a230e1e47925c1e436a23d4feedeb4dd9a17c8dbccbf093ad8c106af3f34443c379d007d54d9aa019717c2bbee6249ff3c80d1ae0393 + sha512sums = c5ec0bf524e527ecf94207ef6aa1f2671346e115ec15de6d063cde0960151813752a1814e003705fc1a99d4e2eae1b3ca4d03432a50790957186e240527cc361 + sha512sums = 2c10d4cc6c0b9ca650e786c1e677f22619a78c93465f27fc4cf4831f1cfe771f3b9885a416e381a9e14c3aea5d88cb3545264046188db72d54b8567266811e51 + sha512sums = f1843bc1758c227bfcf85d1ef3a4705ac73d54b7b96baee13c7667da6ea1c32383208e8d4fc0be355dcf89c9b3dc02477cef983bf41bb3882cc34dc2d3c0d6a4 + +pkgname = signal-desktop-noto + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3bd1ad6fad79 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,84 @@ +# Maintainer: Jean Lucas <jean@4ray.co> + +_pkgroot=signal-desktop +pkgname=${_pkgroot}-noto +_pkgname=Signal-Desktop +pkgver=1.29.1 +pkgrel=1 +pkgdesc='Electron application that links with Signal on mobile (Noto emoji version)' +arch=(x86_64) +url=https://github.com/Skycoder42/Signal-Desktop-Noto +license=(GPL3) +depends=(electron) +makedepends=( + yarn + git + python2 + 'nodejs>=12.4.0' + npm + python +) +provides=(signal signal-desktop) +replaces=(signal signal-desktop) +source=( + $_pkgroot-$pkgver.tar.gz::https://github.com/signalapp/$_pkgname/archive/v$pkgver.tar.gz + $_pkgroot.desktop + openssl-linking.patch + noto-emoji.patch +) +sha512sums=('09c843074eefe66e5452a230e1e47925c1e436a23d4feedeb4dd9a17c8dbccbf093ad8c106af3f34443c379d007d54d9aa019717c2bbee6249ff3c80d1ae0393' + 'c5ec0bf524e527ecf94207ef6aa1f2671346e115ec15de6d063cde0960151813752a1814e003705fc1a99d4e2eae1b3ca4d03432a50790957186e240527cc361' + '2c10d4cc6c0b9ca650e786c1e677f22619a78c93465f27fc4cf4831f1cfe771f3b9885a416e381a9e14c3aea5d88cb3545264046188db72d54b8567266811e51' + 'f1843bc1758c227bfcf85d1ef3a4705ac73d54b7b96baee13c7667da6ea1c32383208e8d4fc0be355dcf89c9b3dc02477cef983bf41bb3882cc34dc2d3c0d6a4') + +prepare() { + cd $_pkgname-$pkgver + + # apply emoji patch + git apply ../noto-emoji.patch + + # Fix SpellChecker build with imminent Node 13 + # See https://github.com/atom/node-spellchecker/issues/127 + sed -r 's#("spellchecker": ").*"#\1https://github.com/atom/node-spellchecker/archive/613ff91dd2d9a5ee0e86be8a3682beecc4e94887.tar.gz"#' -i package.json + + # Set system Electron version for ABI compatibility + sed -r 's#("electron": ").*"#\1'$(cat /usr/lib/electron/version)'"#' -i package.json + + # Allow higher Node versions + sed 's#"node": "#&>=#' -i package.json + + yarn install + + # Have SQLCipher dynamically link from OpenSSL + # See https://github.com/signalapp/Signal-Desktop/issues/2634 + patch -Np0 < ../openssl-linking.patch +} + +build() { + cd $_pkgname-$pkgver + + # Gruntfile expects Git commit information which we don't have in a tarball download + # See https://github.com/signalapp/Signal-Desktop/issues/2376 + yarn generate exec:build-protobuf exec:transpile concat copy:deps sass + + yarn build-release --dir +} + +package() { + cd $_pkgname-$pkgver + + install -d "$pkgdir"/usr/{lib,bin} + cp -a release/linux-unpacked/resources "$pkgdir"/usr/lib/$_pkgroot + cat << EOF > "$pkgdir"/usr/bin/$_pkgroot +#!/bin/sh + +NODE_ENV=production electron /usr/lib/$_pkgroot/app.asar "\$@" +EOF + chmod +x "$pkgdir"/usr/bin/$_pkgroot + + install -Dm 644 ../$_pkgroot.desktop -t "$pkgdir"/usr/share/applications + for i in 16 24 32 48 64 128 256 512 1024; do + install -Dm 644 build/icons/png/${i}x${i}.png \ + "$pkgdir"/usr/share/icons/hicolor/${i}x${i}/apps/$_pkgroot.png + done +} diff --git a/noto-emoji.patch b/noto-emoji.patch new file mode 100644 index 000000000000..3edddc164d4e --- /dev/null +++ b/noto-emoji.patch @@ -0,0 +1,65 @@ +diff --git a/create-noto-emoji-patch.sh b/create-noto-emoji-patch.sh +new file mode 100755 +index 00000000..b1692606 +--- /dev/null ++++ b/create-noto-emoji-patch.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++# $1 out-path ++set -e ++exec git diff origin/master origin/noto-emoji > ${1:-'noto-emoji.patch'} +diff --git a/package.json b/package.json +index 511d2c95..4e95afca 100644 +--- a/package.json ++++ b/package.json +@@ -62,7 +62,7 @@ + "electron-mocha": "8.1.1", + "electron-notarize": "0.1.1", + "emoji-datasource": "4.1.0", +- "emoji-datasource-apple": "4.1.0", ++ "emoji-datasource-google": "4.1.0", + "emoji-regex": "8.0.0", + "filesize": "3.6.1", + "firstline": "1.2.1", +@@ -291,8 +291,8 @@ + "node_modules/**", + "!node_modules/emoji-datasource/emoji_pretty.json", + "!node_modules/emoji-datasource/*.png", +- "!node_modules/emoji-datasource-apple/emoji_pretty.json", +- "!node_modules/emoji-datasource-apple/img/apple/sheets*", ++ "!node_modules/emoji-datasource-google/emoji_pretty.json", ++ "!node_modules/emoji-datasource-google/img/google/sheets*", + "!node_modules/spellchecker/vendor/hunspell/**/*", + "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts}", + "!**/node_modules/.bin", +diff --git a/ts/components/emoji/lib.ts b/ts/components/emoji/lib.ts +index edddb196..5986b743 100644 +--- a/ts/components/emoji/lib.ts ++++ b/ts/components/emoji/lib.ts +@@ -72,7 +72,7 @@ const data = (untypedData as Array<EmojiData>).filter( + ); + + const makeImagePath = (src: string) => { +- return `node_modules/emoji-datasource-apple/img/apple/64/${src}`; ++ return `node_modules/emoji-datasource-google/img/google/64/${src}`; + }; + + const imageQueue = new PQueue({ concurrency: 10 }); +diff --git a/yarn.lock b/yarn.lock +index 5029cabb..bceedf4a 100644 +--- a/yarn.lock ++++ b/yarn.lock +@@ -2934,10 +2934,10 @@ elliptic@^6.0.0: + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +-emoji-datasource-apple@4.1.0: ++emoji-datasource-google@4.1.0: + version "4.1.0" +- resolved "https://registry.yarnpkg.com/emoji-datasource-apple/-/emoji-datasource-apple-4.1.0.tgz#e6725311b115144a32fb60043416a755fea30bf5" +- integrity sha1-5nJTEbEVFEoy+2AENBanVf6jC/U= ++ resolved "https://registry.yarnpkg.com/emoji-datasource-google/-/emoji-datasource-google-4.1.0.tgz#d69be74d48c76ee2bb9fcb4e7920f27fa12dde9e" ++ integrity sha1-1pvnTUjHbuK7n8tOeSDyf6Et3p4= + + emoji-datasource@4.1.0: + version "4.1.0" diff --git a/openssl-linking.patch b/openssl-linking.patch new file mode 100644 index 000000000000..f459103f45f9 --- /dev/null +++ b/openssl-linking.patch @@ -0,0 +1,19 @@ +--- node_modules/@journeyapps/sqlcipher/deps/sqlite3.gyp 2019-10-27 01:53:29.860275405 -0400 ++++ node_modules/@journeyapps/sqlcipher/deps/sqlite3.gyp 2019-10-27 01:51:32.001730882 -0400 +@@ -73,7 +73,7 @@ + 'link_settings': { + 'libraries': [ + # This statically links libcrypto, whereas -lcrypto would dynamically link it +- '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/OpenSSL-Linux/libcrypto.a' ++ '-lcrypto' + ] + } + }] +@@ -141,7 +141,6 @@ + { # linux + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/', +- '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/openssl-include/' + ] + }] + ], diff --git a/signal-desktop.desktop b/signal-desktop.desktop new file mode 100644 index 000000000000..b3409c123582 --- /dev/null +++ b/signal-desktop.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=Signal +Comment=Electron application that links with Signal on mobile +Icon=signal-desktop +Exec=signal-desktop +Terminal=false +Categories=Network;InstantMessaging; +StartupWMClass=Signal |