1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

net-im/signal-desktop: Update to 7.15.0

This commit is contained in:
Mikael Urankar 2024-07-09 13:25:20 +02:00
parent c73766042e
commit c3656c4ee5
11 changed files with 48 additions and 20929 deletions

View File

@ -1,14 +1,10 @@
PORTNAME= signal-desktop
DISTVERSIONPREFIX= v
DISTVERSION= 7.13.0
PORTREVISION= 1
DISTVERSION= 7.15.0
CATEGORIES= net-im
MASTER_SITES= LOCAL/mikael/signal-desktop/:npm \
LOCAL/mikael/signal-desktop/:sqlite \
LOCAL/mikael/signal-desktop/:yarn \
https://build-artifacts.signal.org/desktop/:sqlcipher
DISTFILES= signal-desktop-${DISTVERSION}-yarn-cache.tar.gz:yarn \
signal-desktop-6.37.0-npm-cache.tar.gz:npm \
DISTFILES= signal-desktop-${DISTVERSION}-npm-cache.tar.gz:npm \
${SQLCIPHER}.tar.gz:sqlcipher
MAINTAINER= mikael@FreeBSD.org
@ -21,7 +17,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= aarch64 amd64
EXTRACT_DEPENDS=jq:textproc/jq \
yarn-node20>0:www/yarn-node20
npm:www/npm-node20
BUILD_DEPENDS= ${LOCALBASE}/lib/libcrypto.a:security/openssl \
${LOCALBASE}/lib/libringrtc.so:multimedia/ringrtc \
${LOCALBASE}/lib/libsignal_node.so:net-im/libsignal-node \
@ -29,8 +25,7 @@ BUILD_DEPENDS= ${LOCALBASE}/lib/libcrypto.a:security/openssl \
app-builder>0:devel/app-builder \
electron${ELECTRON_VER_MAJOR}:devel/electron${ELECTRON_VER_MAJOR} \
jq:textproc/jq \
npm:www/npm-node20 \
yarn:www/yarn-node20
npm:www/npm-node20
LIB_DEPENDS= libasound.so:audio/alsa-lib \
libatk-bridge-2.0.so:accessibility/at-spi2-core \
libatspi.so:accessibility/at-spi2-core \
@ -67,7 +62,10 @@ USE_GL= gbm gl
USE_GNOME= atk cairo gdkpixbuf2 glib20 gtk30 libxml2 libxslt pango
USE_XORG= x11 xcb xcomposite xdamage xext xfixes xi xrandr xrender xtst
PACKAGE_ENV= SIGNAL_ENV=production
PACKAGE_ENV= SIGNAL_ENV=production \
npm_config_runtime=electron \
npm_config_target=${ELECTRON_VER_MAJOR} \
npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers
MAKE_ENV+= ELECTRON_OVERRIDE_DIST_PATH=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} \
HOME=${WRKDIR} \
USE_SYSTEM_APP_BUILDER=true \
@ -81,27 +79,19 @@ MAKE_ENV+= ELECTRON_SKIP_BINARY_DOWNLOAD=1
# This is a workaround to avoid filesystem violations during poudriere build
MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1
MAKE_ENV+= ESBUILD_BINARY_PATH=${WRKDIR}/esbuild-freebsd-64/package/bin/esbuild
_BUILD_DATE= $$(date +'%s')
ELECTRON_VER_MAJOR= 30
# sh get_deps.sh
NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.50.0-5cff29a49b658916aa277943d0fc01a2668ef0c6-integrity
NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.42.0-de6e58bf780279dad63a3877b79643b7dace461f-integrity
NPM_SQLITE3_DIR= npm-@signalapp-better-sqlite3-8.7.1-0a09293aa833b836ec6b17f6ab0e790097f3fdeb-integrity
NPM_ESBUILD_VERS= 0.18.20
SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b
SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b
ESBUILD_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/}
NODE_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/}
APP_OUT_DIR= linux-${ARCH:S/aarch64/arm64-/:S/amd64//}unpacked
PLIST_SUB= NODE_ARCH=${NODE_ARCH} \
SHARP_ARCH=${ARCH:S/aarch64/arm64v8/:S/amd64/x64/}
YARN_TIMESTAMP= 1661146515
NPM_TIMESTAMP= 1661146515
.include <bsd.port.pre.mk>
@ -111,49 +101,18 @@ PLIST_SUB+= NOT_AARCH64="@comment "
PLIST_SUB+= NOT_AARCH64=""
.endif
fetch-yarn:
if [ ! -f ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz ]; then \
${MKDIR} /tmp/signal-desktop; \
${FETCH_CMD} -o - https://raw.githubusercontent.com/signalapp/Signal-Desktop/v${DISTVERSION}/package.json | \
${PREFIX}/bin/jq '.devDependencies.esbuild = "0.18.20"' | \
${PREFIX}/bin/jq '.engines.node = ""' > /tmp/signal-desktop/package.json; \
${FETCH_CMD} -o /tmp/signal-desktop/yarn.lock https://raw.githubusercontent.com/signalapp/Signal-Desktop/v${DISTVERSION}/yarn.lock; \
${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \
/tmp/signal-desktop/.yarnrc; \
${PREFIX}/bin/jq 'del(.devDependencies."@signalapp/mock-server")' /tmp/signal-desktop/package.json > /tmp/signal-desktop/package.json.tmp; \
${MV} /tmp/signal-desktop/package.json.tmp /tmp/signal-desktop/package.json; \
cd /tmp/signal-desktop && ${SETENV} HOME=/tmp/signal-desktop XDG_CACHE_HOME=/tmp/signal-desktop/.cache \
yarn --ignore-scripts; \
${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
-e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
-e 's:\([gu]id\)=[0-9]*:\1=0:g' \
-e 's:flags=.*:flags=none:' \
-e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
${TAR} cJf ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz \
@yarn-offline-cache.mtree; \
${RM} -r ${WRKDIR}; \
${CP} /tmp/signal-desktop/yarn.lock ${FILESDIR}; \
fi
post-extract:
# install yarn modules and fail silently
${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc
${ECHO_CMD} 'nodedir "${LOCALBASE}"' >> ${WRKSRC}/.yarnrc
# Update node engine
${PREFIX}/bin/jq '.engines.node = ""' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp.1
${PREFIX}/bin/jq '.devDependencies.esbuild = "0.18.20"' ${WRKSRC}/package.json.tmp.1 > ${WRKSRC}/package.json.tmp
${MV} ${WRKSRC}/package.json.tmp ${WRKSRC}/package.json
${MV} ${WRKSRC}/package.json.tmp.1 ${WRKSRC}/package.json
# remove mock-server as it doesn't build and is useless
${PREFIX}/bin/jq 'del(.devDependencies."@signalapp/mock-server")' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp
${MV} ${WRKSRC}/package.json.tmp ${WRKSRC}/package.json
${CP} ${FILESDIR}/yarn.lock ${WRKSRC}
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} yarn install --ignore-optional --offline || ${TRUE}
${SETENV} ${MAKE_ENV} npm install --ignore-optional --ignore-scripts --offline || ${TRUE}
do-build:
${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc
${ECHO_CMD} 'nodedir "${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers"' >> ${WRKSRC}/.yarnrc
# electron-builder is stupid and tries to open ${LOCALBASE}/share/electron30/electron with WRITE priv
# copy ${LOCALBASE}/share/electron30 in WRKDIR
# it's needed for the do-install phase, it's here because of this issue
@ -162,47 +121,40 @@ do-build:
@${CP} -pR ${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} ${WRKDIR}/electron${ELECTRON_VER_MAJOR}
${CHMOD} -R a+w ${WRKDIR}/electron${ELECTRON_VER_MAJOR}
# Install libsignal_node.so and libringrtc.so binaries in the yarn cache
${MKDIR} ${WRKDIR}/.cache/yarn/v6/${NPM_SIGNAL_DIR}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH} \
${WRKDIR}/.cache/yarn/v6/${NPM_RINGRTC_DIR}/node_modules/@signalapp/ringrtc/build/freebsd
# Install libsignal_node.so and libringrtc.so binaries in node_modules
${MKDIR} ${WRKSRC}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH} \
${WRKSRC}/node_modules/@signalapp/ringrtc/build/freebsd
${CP} ${LOCALBASE}/lib/libsignal_node.so \
${WRKDIR}/.cache/yarn/v6/${NPM_SIGNAL_DIR}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH}/node.napi.node
${WRKSRC}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH}/@signalapp+libsignal-client.node
${CP} ${LOCALBASE}/lib/libringrtc.so \
${WRKDIR}/.cache/yarn/v6/${NPM_RINGRTC_DIR}/node_modules/@signalapp/ringrtc/build/freebsd/libringrtc-${NODE_ARCH}.node
${WRKSRC}/node_modules/@signalapp/ringrtc/build/freebsd/libringrtc-${NODE_ARCH}.node
${MKDIR} ${WRKDIR}/.cache/yarn/v6/${NPM_SQLITE3_DIR}/node_modules/@signalapp/better-sqlite3/deps
${CP} ${DISTDIR}/${SQLCIPHER}.tar.gz \
${WRKDIR}/.cache/yarn/v6/${NPM_SQLITE3_DIR}/node_modules/@signalapp/better-sqlite3/deps/sqlcipher.tar.gz
${CP} ${FILESDIR}/fetch-prebuild.js \
${WRKDIR}/.cache/yarn/v6/${NPM_RINGRTC_DIR}/node_modules/@signalapp/ringrtc/scripts/fetch-prebuild.js
${CP} ${FILESDIR}/download.js \
${WRKDIR}/.cache/yarn/v6/${NPM_SQLITE3_DIR}/node_modules/@signalapp/better-sqlite3/deps/download.js
${WRKSRC}/node_modules/@signalapp/better-sqlite3/deps/sqlcipher.tar.gz
# patch-package can't patch sqlite3 on aarch64, patch the yarn cache instead
cd ${WRKDIR}/.cache/yarn/v6 && ${PATCH} -s -N -i ${FILESDIR}/sqlite3.gyp.diff
${MKDIR} ${WRKDIR}/esbuild-freebsd-64
${TAR} -xf ${WRKDIR}/yarn-offline-cache/@esbuild-freebsd-${ESBUILD_ARCH}-${NPM_ESBUILD_VERS}.tgz -C ${WRKDIR}/esbuild-freebsd-64
cd ${WRKSRC} && ${PATCH} -s -N -i ${FILESDIR}/sqlite3.gyp.diff
${CP} ${FILESDIR}/dns-fallback.json ${WRKSRC}/build
# For offline build
${ECHO_CMD} offline=true > ${WRKDIR}/.npmrc
@${RM} -r ${WRKSRC}/node_modules/fs-xattr
${ECHO_CMD} offline=true >> ${WRKSRC}/.npmrc
${ECHO_CMD} ${PATH}
${ECHO_CMD} a >> ${WRKSRC}/todo
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} yarn install --frozen-lockfile --ignore-optional --offline
${SETENV} ${MAKE_ENV} npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers npm install --ignore-optional --offline
${ECHO_CMD} b >> ${WRKSRC}/todo
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} yarn --offline generate
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} yarn --offline build:esbuild:prod
${SETENV} ${MAKE_ENV} npm run generate --offline
do-install:
# taken from https://github.com/tagattie/FreeBSD-Electron/blob/master/Mk/Uses/electron.mk#L387
# and editors/vscode
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${PACKAGE_ENV} yarn run electron-builder \
${SETENV} ${MAKE_ENV} ${PACKAGE_ENV} npm run build:electron -- \
--linux --dir --config.npmRebuild=false \
--config.electronVersion=${ELECTRON_VER_MAJOR} \
--config.electronVersion=${ELECTRON_VER} \
--config.electronDist=${WRKDIR}/electron${ELECTRON_VER_MAJOR}
${MKDIR} ${STAGEDIR}${DATADIR}
@ -229,7 +181,7 @@ do-install:
create-caches-tarball:
# do some cleanup first
${RM} -r ${WRKDIR}/.npm/_logs ${WRKDIR}/.npm/_update-notifier-last-checked ${WRKDIR}/.cache/yarn/v6/.tmp
${RM} -r ${WRKDIR}/.npm/_logs ${WRKDIR}/.npm/_update-notifier-last-checked
cd ${WRKDIR} && \
${TAR} czf signal-desktop-${DISTVERSION}-npm-cache.tar.gz .npm

View File

@ -1,9 +1,7 @@
TIMESTAMP = 1718974683
SHA256 (signal-desktop-7.13.0-yarn-cache.tar.gz) = 087352802ad35e03b36d4f48eac075225913ada41454ba9e07917fef95075b01
SIZE (signal-desktop-7.13.0-yarn-cache.tar.gz) = 539065320
SHA256 (signal-desktop-6.37.0-npm-cache.tar.gz) = 40411861a3b913b26a4bb563faa72a4c07c8807b917e53f627c58fa3b3b695a8
SIZE (signal-desktop-6.37.0-npm-cache.tar.gz) = 4471369
TIMESTAMP = 1720443621
SHA256 (signal-desktop-7.15.0-npm-cache.tar.gz) = 28c79209e84d991b6a42fc9403d484d438b576f3c3457a595657d25c37e6a7e4
SIZE (signal-desktop-7.15.0-npm-cache.tar.gz) = 325615757
SHA256 (sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b.tar.gz) = ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b
SIZE (sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b.tar.gz) = 75708533
SHA256 (signalapp-Signal-Desktop-v7.13.0_GH0.tar.gz) = 39543999c19aa7e66031b9e1ea20c923d61621f235afbbeaf37e5ff5dbdc3a51
SIZE (signalapp-Signal-Desktop-v7.13.0_GH0.tar.gz) = 42015776
SHA256 (signalapp-Signal-Desktop-v7.15.0_GH0.tar.gz) = f92ba15a86920861b4cd53cd5218934128508682d82120f195a59e9deef8e272
SIZE (signalapp-Signal-Desktop-v7.15.0_GH0.tar.gz) = 42189716

View File

@ -1,63 +0,0 @@
const https = require('https');
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const { Transform } = require('stream');
const { pipeline } = require('stream/promises');
const BASE_URI = `https://build-artifacts.signal.org/desktop`;
const HASH = 'b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986';
const SQLCIPHER_VERSION = '4.5.3-fts';
const OPENSSL_VERSION = '3.0.7';
const TOKENIZER_VERSION = '0.2.1';
const TAG = [SQLCIPHER_VERSION, OPENSSL_VERSION, TOKENIZER_VERSION].join('--');
const URL = `${BASE_URI}/sqlcipher-${TAG}-${HASH}.tar.gz`;
const tmpFile = path.join(__dirname, 'unverified.tmp');
const finalFile = path.join(__dirname, 'sqlcipher.tar.gz');
async function main() {
return;
if (fs.statSync(finalFile, { throwIfNoEntry: false })) {
const hash = crypto.createHash('sha256');
const existingHash = await pipeline(
fs.createReadStream(finalFile),
hash,
);
if (hash.digest('hex') === HASH) {
console.log('local build artifact is up-to-date');
return;
}
console.log('local build artifact is outdated');
}
download();
}
function download() {
console.log(`downloading ${URL}`);
https.get(URL, async (res) => {
const out = fs.createWriteStream(tmpFile);
const hash = crypto.createHash('sha256');
const t = new Transform({
transform(chunk, encoding, callback) {
hash.write(chunk, encoding);
callback(null, chunk);
}
});
await pipeline(res, t, out);
const actualDigest = hash.digest('hex');
if (actualDigest !== HASH) {
fs.unlinkSync(tmpFile);
throw new Error(`Digest mismatch. Expected ${HASH} got ${actualDigest}`);
}
fs.renameSync(tmpFile, finalFile);
})
}
main();

View File

@ -1,92 +0,0 @@
//
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
/* eslint-disable no-console */
const https = require('https');
const { HttpsProxyAgent } = require('https-proxy-agent');
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const tar = require('tar');
const { Transform } = require('stream');
const { pipeline } = require('stream/promises');
const VERSION = process.env.npm_package_version;
const URL = process.env.npm_package_config_prebuildUrl.replace(
'${npm_package_version}', // eslint-disable-line no-template-curly-in-string
VERSION
);
const HASH = process.env.npm_package_config_prebuildChecksum;
const tmpFile = path.join(__dirname, 'unverified-prebuild.tmp');
const finalFile = path.join(__dirname, 'prebuild.tar.gz');
async function main() {
return;
if (!HASH) {
console.log('(no checksum provided; assuming local build)');
process.exit(0);
}
await downloadIfNeeded();
console.log('extracting...');
await tar.extract({ file: finalFile, onwarn: process.emitWarning });
}
async function downloadIfNeeded() {
if (fs.statSync(finalFile, { throwIfNoEntry: false })) {
const hash = crypto.createHash('sha256');
await pipeline(fs.createReadStream(finalFile), hash);
if (hash.digest('hex') === HASH) {
console.log('local build artifact is up-to-date');
return;
}
console.log('local build artifact is outdated');
}
await download();
}
function download() {
console.log(`downloading ${URL}`);
return new Promise((resolve, reject) => {
let options = {};
if (process.env.HTTPS_PROXY != undefined) {
options.agent = new HttpsProxyAgent(process.env.HTTPS_PROXY);
}
https.get(URL, options, async res => {
try {
const out = fs.createWriteStream(tmpFile);
const hash = crypto.createHash('sha256');
const t = new Transform({
transform(chunk, encoding, callback) {
hash.write(chunk, encoding);
callback(null, chunk);
},
});
await pipeline(res, t, out);
const actualDigest = hash.digest('hex');
if (actualDigest !== HASH) {
fs.unlinkSync(tmpFile);
throw new Error(
`Digest mismatch. Expected ${HASH} got ${actualDigest}`
);
}
fs.renameSync(tmpFile, finalFile);
resolve();
} catch (error) {
reject(error);
}
});
});
}
main();

View File

@ -1,11 +1,11 @@
--- package.json.orig 2024-04-02 18:24:45.626302000 +0200
+++ package.json 2024-04-02 18:25:02.071341000 +0200
--- package.json.orig 2024-07-08 15:06:16 UTC
+++ package.json
@@ -19,7 +19,7 @@
"postinstall": "yarn build:acknowledgments && patch-package && yarn electron:install-app-deps",
"postuninstall": "yarn build:acknowledgments",
"postinstall": "npm run build:acknowledgments && patch-package && npm run electron:install-app-deps",
"postuninstall": "npm run build:acknowledgments",
"start": "electron .",
- "generate": "npm-run-all build-protobuf build:esbuild build:dns-fallback build:icu-types build:compact-locales sass get-expire-time copy-components",
+ "generate": "npm-run-all build-protobuf build:esbuild build:icu-types build:compact-locales sass get-expire-time copy-components",
"build-release": "yarn run build",
"build-release": "npm run build",
"sign-release": "node ts/updater/generateSignature.js",
"notarize": "echo 'No longer necessary'",

View File

@ -1,5 +1,5 @@
--- patches/electron-builder+23.0.8.patch.orig 2022-02-24 13:03:47 UTC
+++ patches/electron-builder+23.0.8.patch
--- patches/electron-builder+24.13.3.patch.orig 2022-02-24 13:03:47 UTC
+++ patches/electron-builder+24.13.3.patch
@@ -0,0 +1,13 @@
+diff --git a/node_modules/electron-builder/out/cli/install-app-deps.js b/node_modules/electron-builder/out/cli/install-app-deps.js
+index 0c58564..2b6f9a5 100644

View File

@ -1,5 +1,5 @@
--- npm-@signalapp-better-sqlite3-8.7.1-0a09293aa833b836ec6b17f6ab0e790097f3fdeb-integrity/node_modules/@signalapp/better-sqlite3/deps/sqlite3.gyp.orig 2022-07-02 14:34:04 UTC
+++ npm-@signalapp-better-sqlite3-8.7.1-0a09293aa833b836ec6b17f6ab0e790097f3fdeb-integrity/node_modules/@signalapp/better-sqlite3/deps/sqlite3.gyp
--- node_modules/@signalapp/better-sqlite3/deps/sqlite3.gyp.orig 2022-07-02 14:34:04 UTC
+++ node_modules/@signalapp/better-sqlite3/deps/sqlite3.gyp
@@ -100,6 +100,15 @@
]
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
#!/bin/sh
SIGNAL_VERS=v7.13.0
SIGNAL_VERS=v7.15.0
fetch -qo /tmp/package.json https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/package.json
node_version=$(awk /'"node":'/'{print $2}' /tmp/package.json | sed 's/"//g')
@ -18,27 +18,3 @@ electron_version=$(grep '"electron":' /tmp/package.json | awk -F ":" '{print $2}
echo "ELECTRON_VERSION= ${electron_version}"
bsqlite3_version=$(grep '@signalapp/better-sqlite3' /tmp/package.json | awk -F ":" '{print $2}' | sed -E 's#("|,| )##g')
esbuild_version=$(grep '"esbuild":' /tmp/package.json | awk -F ":" '{print $2}' | sed -E 's#("|,| )##g')
echo "ESBUILD_VERSION= ${esbuild_version}"
fetch -qo /tmp/download.js https://raw.githubusercontent.com/signalapp/better-sqlite3/v${bsqlite3_version}/deps/download.js
BASE_URI=https://build-artifacts.signal.org/desktop
HASH=$(awk /"HASH ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g")
SQLCIPHER_VERSION=$(awk /"SQLCIPHER_VERSION ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g")
OPENSSL_VERSION=$(awk /"OPENSSL_VERSION ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g")
TOKENIZER_VERSION=$(awk /"TOKENIZER_VERSION ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g")
TAG="${SQLCIPHER_VERSION}--${OPENSSL_VERSION}--${TOKENIZER_VERSION}"
echo "Signal-FTS5-Extension= ${TOKENIZER_VERSION}"
echo "SQLCIPHER=sqlcipher-${TAG}-${HASH}" | portedit merge -i Makefile
fetch -qo /tmp/yarn.lock https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/yarn.lock
npm_signal_hash=$(egrep "libsignal-client.*${libsignalclient_version}" /tmp/yarn.lock | awk -F '#' /resolved/'{print $2}' | sed 's/"//g')
echo "NPM_SIGNAL_DIR=npm-@signalapp-libsignal-client-${libsignalclient_version}-${npm_signal_hash}-integrity" | portedit merge -i Makefile
npm_ringrtc_hash=$(grep ringrtc /tmp/yarn.lock | awk -F '#' /resolved/'{print $2}' | sed 's/"//g')
echo "NPM_RINGRTC_DIR=npm-@signalapp-ringrtc-${ringrtc_version}-${npm_ringrtc_hash}-integrity" | portedit merge -i Makefile
npm_bsqlite3_hash=$(grep better-sqlite3 /tmp/yarn.lock | awk -F '#' /resolved/'{print $2}' | sed 's/"//g')
echo "NPM_SQLITE3_DIR=npm-@signalapp-better-sqlite3-${bsqlite3_version}-${npm_bsqlite3_hash}-integrity" | portedit merge -i Makefile

View File

@ -2,4 +2,4 @@ Signal is a cross-platform centralized encrypted messaging service developed
by the Signal Technology Foundation and Signal Messenger LLC.
It uses the Internet to send one-to-one and group messages, which can include
files, voice notes, images and videos. It can also be used to make one-to-one
and group voice and video calls.
and group voice and video calls.

View File

@ -106,7 +106,7 @@ share/pixmaps/signal-desktop.png
%%DATADIR%%/resources/app-update.yml
%%DATADIR%%/resources/app.asar
%%DATADIR%%/resources/app.asar.unpacked/node_modules/@signalapp/better-sqlite3/build/Release/better_sqlite3.node
%%DATADIR%%/resources/app.asar.unpacked/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-%%NODE_ARCH%%/node.napi.node
%%DATADIR%%/resources/app.asar.unpacked/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-%%NODE_ARCH%%/@signalapp+libsignal-client.node
%%DATADIR%%/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/freebsd/libringrtc-%%NODE_ARCH%%.node
@(,,755) %%DATADIR%%/signal-desktop
%%DATADIR%%/snapshot_blob.bin