Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
182 lines (181 sloc) 8.04 KB
{
"app-id": "nz.scuttlebutt.Patchwork",
"runtime": "org.freedesktop.Platform",
"runtime-version": "1.6",
"branch": "stable",
"sdk": "org.freedesktop.Sdk",
"base": "io.atom.electron.BaseApp",
"base-version": "stable",
"command": "run.sh",
"separate-locales": false,
"finish-args": [
"--device=dri",
"--share=ipc",
"--share=network",
"--socket=pulseaudio",
"--socket=wayland",
"--socket=x11",
"--persist=.ssb",
/* For uploading avatar picture; Electron doesn't use portals: */
"--filesystem=xdg-pictures:ro"
],
"build-options" : {
"cflags": "-O2 -g",
"cxxflags": "-O2 -g",
"env": {
"NPM_CONFIG_LOGLEVEL": "info"
}
},
"modules": [
{
"name": "nodejs",
"cleanup": [
"/include",
"/share",
"/app/lib/node_modules/npm/changelogs",
"/app/lib/node_modules/npm/doc",
"/app/lib/node_modules/npm/html",
"/app/lib/node_modules/npm/man",
"/app/lib/node_modules/npm/scripts"
],
"sources": [
{
"type": "archive",
"url": "https://nodejs.org/dist/v8.11.2/node-v8.11.2.tar.xz",
"sha256": "539946c0381809576bed07424a35fc1740d52f4bd56305d6278d9e76c88f4979"
}
]
},
{
"name": "xkbfile",
"cleanup": [
"/include",
"/lib/*.la",
"/lib/pkgconfig"
],
"config-opts": ["--disable-static"],
"sources": [
{
"type": "archive",
"url": "https://www.x.org/releases/individual/lib/libxkbfile-1.0.9.tar.bz2",
"sha256": "51817e0530961975d9513b773960b4edd275f7d5c72293d5a151ed4f42aeb16a"
}
]
},
{
"name": "patchwork",
"build-options" : {
"env": {
/* Need this for electron-download to find the cached electron binary */
"electron_config_cache": "/run/build/patchwork/npm-cache"
}
},
"buildsystem": "simple",
"sources": [
{
"type": "git",
"url": "https://github.com/ssbc/patchwork.git",
"tag": "v3.10.1",
"commit": "5e556245f4b2af5556f1aee173f191d73949b988",
"dest": "main"
},
/* Prebuilt NPM modules are only available for x64. In theory it
* should be possible to build the modules from source, but
* node-gyp is not passing the include path to the NodeJS
* headers correctly. */
{
"type": "file",
"only-arches": ["x86_64"],
"url": "https://github.com/ssbc/paulcbetts-cld-prebuilt/releases/download/v2.4.6/cld-v2.4.6-node-v57-linux-x64.tar.gz",
"sha256": "e8dbbcb579d421c9d9ae8c204d2a270354fe280f415ac0905de28d97237d2cc7",
"dest": "npm-cache/_prebuilds",
"dest-filename": "https-github.com-ssbc-paulcbetts-cld-prebuilt-releases-download-v2.4.6-cld-v2.4.6-node-v57-linux-x64.tar.gz"
},
{
"type": "file",
"only-arches": ["x86_64"],
"url": "https://github.com/ssbc/paulcbetts-spellchecker-prebuilt/releases/download/v4.0.6/spellchecker-v4.0.6-node-v57-linux-x64.tar.gz",
"sha256": "a06ebc504e55c5f662ea63e6eabfbcd2aa3a93d37c4c33acfd5b74bb43cd5a12",
"dest": "npm-cache/_prebuilds",
"dest-filename": "https-github.com-ssbc-paulcbetts-spellchecker-prebuilt-releases-download-v4.0.6-spellchecker-v4.0.6-node-v57-linux-x64.tar.gz"
},
{
"type": "file",
"only-arches": ["x86_64"],
"url": "https://github.com/ssbc/keyboard-layout-prebuilt/releases/download/v2.0.13/keyboard-layout-v2.0.13-node-v57-linux-x64.tar.gz",
"sha256": "921836f22343b4eedfc502b26e5de704d4efec73ab69db7fb55946a0471eec53",
"dest": "npm-cache/_prebuilds",
"dest-filename": "https-github.com-ssbc-keyboard-layout-prebuilt-releases-download-v2.0.13-keyboard-layout-v2.0.13-node-v57-linux-x64.tar.gz"
},
{
"type": "file",
"only-arches": ["x86_64"],
"url": "https://github.com/level/leveldown/releases/download/v4.0.1/leveldown-v4.0.1-node-v57-linux-x64.tar.gz",
"sha256": "2d5fc4b539ec281f83bb5a9d01f3312f092c1fbbb611651bad3816bd97a670f2",
"dest": "npm-cache/_prebuilds",
"dest-filename": "5d6b35-leveldown-v4.0.1-node-v57-linux-x64.tar.gz"
},
{
"type": "file",
"only-arches": ["x86_64"],
"url": "https://github.com/level/leveldown/releases/download/v3.0.2/leveldown-v3.0.2-node-v57-linux-x64.tar.gz",
"sha256": "1c8e105acc0390238cc50a1bd7b414b2e272b50e309cb8a81ba94afafbdc634a",
"dest": "npm-cache/_prebuilds",
"dest-filename": "686ac3-leveldown-v3.0.2-node-v57-linux-x64.tar.gz"
},
/* Generated from package-lock.json, and 'main' dir prefixed to
* all files in the sed expressions manually */
"generated-sources.json",
/* Wrapper to launch the app */
{
"type": "script",
"dest-filename": "run.sh",
"commands": [
"npm start --prefix=/app/main"
]
},
{
"type": "file",
"path": "nz.scuttlebutt.Patchwork-128.png"
},
{
"type": "file",
"path": "nz.scuttlebutt.Patchwork-64.png"
},
{
"type": "file",
"path": "nz.scuttlebutt.Patchwork.desktop"
},
{
"type": "file",
"path": "nz.scuttlebutt.Patchwork.appdata.xml"
}
],
"build-commands": [
/* Install npm dependencies */
"npm install --prefix=main --offline --cache=/run/build/patchwork/npm-cache/ --nodedir=/app/include/node",
/* Bundle app and dependencies */
"mkdir -p /app/main /app/bin",
"cp -ra main/* /app/main/",
/* Install app wrapper */
"install run.sh /app/bin/",
"install -Dm644 main/assets/icon.png /app/share/icons/hicolor/512x512/apps/nz.scuttlebutt.Patchwork.png",
"install -Dm644 nz.scuttlebutt.Patchwork-128.png /app/share/icons/hicolor/128x128/apps/nz.scuttlebutt.Patchwork.png",
"install -Dm644 nz.scuttlebutt.Patchwork-64.png /app/share/icons/hicolor/64x64/apps/nz.scuttlebutt.Patchwork.png",
"install -Dm644 nz.scuttlebutt.Patchwork.desktop /app/share/applications/nz.scuttlebutt.Patchwork.desktop",
"install -Dm644 nz.scuttlebutt.Patchwork.appdata.xml /app/share/appdata/nz.scuttlebutt.Patchwork.appdata.xml"
],
"cleanup": [
"/app/main/assets/icon.png",
"/app/main/code-of-conduct.md",
"/app/main/contributing.md",
"/app/main/LICENSE",
"/app/main/package.json",
"/app/main/package-lock.json",
"/app/main/README.md",
"/app/main/screenshot.jpg",
"/app/main/scripts/*"
]
}
]
}