Commit c390a57b authored by Sophie Herold's avatar Sophie Herold
Browse files

Merge branch 'flatpak-dist' into 'master'

Prepare for flathup release

See merge request sophie-h/pika-backup!2
parents 82e52987 65087185
......@@ -3,3 +3,4 @@ Cargo.lock
*~
tags.*
.vscode/
build/
......@@ -3,12 +3,12 @@ include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_
flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.36'
variables:
MANIFEST_PATH: "build-aux/org.gnome.gitlab.sophie_h.PikaPileBackup.yml"
MESON_ARGS: "-Dprofile=Devel"
FLATPAK_MODULE: "pika-pile"
APP_ID: "org.gnome.gitlab.sophie_h.PikaPileBackup"
MANIFEST_PATH: "build-aux/ci.manifest.yml"
MESON_ARGS: "-Dprofile=dev"
FLATPAK_MODULE: "pika-backup"
APP_ID: "org.gnome.gitlab.sophie_h.PikaBackup"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
BUNDLE: "pika-pile-backup-dev.flatpak"
BUNDLE: "pika-backup-dev.flatpak"
extends: .flatpak
nightly:
......
[package]
name = "pika-pile"
name = "pika-backup"
description = "Simple backups based on borg"
version = "0.1.0-beta.2"
authors = ["Sophie Herold <sophie@hemio.de>"]
homepage = "https://gitlab.gnome.org/sophie-h/pika-pile"
homepage = "https://gitlab.gnome.org/sophie-h/pika-backup"
edition = "2018"
[dependencies]
......
# Pika Pile Backup
# Pika Backup
Simple backups based on borg
## Build
You need [Rust](https://rustup.rs/) to build Pika Pile
You need [Rust](https://rustup.rs/) to build Pika
```sh
$ apt install libgtk-3-dev
......
# dist config
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
[net]
offline = true
#!/bin/sh
#!/bin/sh -x
export MESON_BUILD_ROOT="$1"
export MESON_SOURCE_ROOT="$2"
export CARGO_TARGET_DIR="$MESON_BUILD_ROOT"/target
export CARGO_HOME="$CARGO_TARGET_DIR"/cargo-home
export OUTPUT="$3"
export BUILDTYPE="$4"
export APP_BIN="$5"
MESON_SOURCE_ROOT="$1"
CARGO_TARGET_DIR="$2"
CARGO_OPTIONS="$3"
CARGO_OUTPUT="$4"
OUTPUT="$5"
if [[ $BUILDTYPE = "release" ]]
then
echo "RELEASE MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --release && \
cp "$CARGO_TARGET_DIR"/release/"$APP_BIN" "$OUTPUT"
else
echo "DEBUG MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --verbose && \
cp "$CARGO_TARGET_DIR"/debug/"$APP_BIN" "$OUTPUT"
fi
cargo build \
--manifest-path "${MESON_SOURCE_ROOT}/Cargo.toml" \
--target-dir "$CARGO_TARGET_DIR" \
$CARGO_OPTIONS && \
cp "$CARGO_OUTPUT" "$OUTPUT"
---
app-id: org.gnome.gitlab.sophie_h.PikaPileBackup
app-id: org.gnome.gitlab.sophie_h.PikaBackup
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
build-args:
......@@ -7,7 +7,7 @@ build-options:
env:
CARGO_HOME: /run/build/rust-flatpak/cargo
RUSTFLAGS: "--remap-path-prefix =../"
command: pika-pile
command: pika-backup
finish-args:
- --filesystem=host
- --share=network
......@@ -34,7 +34,7 @@ modules:
sources:
- type: archive
url: "https://github.com/libfuse/libfuse/releases/download/fuse-2.9.9/fuse-2.9.9.tar.gz"
"sha256" : d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
sha256: d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
-
type: "file"
path: "fusermount-wrapper.sh"
......@@ -45,11 +45,11 @@ modules:
- install borg /app/bin/borg
sources:
- dest-filename: borg
sha256: 7848d1788b5d7f2ae99a599a87992cab4f01584fe5eb393819fceaecf076433b
type: file
url: "https://github.com/borgbackup/borg/releases/download/1.1.11/borg-linux64"
url: "https://github.com/borgbackup/borg/releases/download/1.1.13/borg-linux64"
sha256: 60a662bef3669ed16bb29dadf6b59b74ff664f983d5fa71de7f1fb05a4fec7c0
- name: pika-pile
- name: pika-backup
buildsystem: meson
sources:
- path: ../
......
#!/bin/sh -x
mkdir "${MESON_DIST_ROOT}/.cargo"
cp "${MESON_SOURCE_ROOT}/build-aux/cargo-config.toml" "${MESON_DIST_ROOT}/.cargo/config"
cargo vendor "${MESON_DIST_ROOT}/vendor"
#!/bin/bash -x
APP_ID=$(cat data/APPLICATION_ID)
REPO_NAME=pika-pile-dev
REPO_NAME=pika-backup-dev
REPO_DIR=flatpak_repo
flatpak remove $APP_ID -y
flatpak-builder --install-deps-from=https://dl.flathub.org/repo/ \
--user --verbose --force-clean -y --repo=$REPO_DIR flatpak_out build-aux/$APP_ID.yml
--user --verbose --force-clean -y --repo=$REPO_DIR flatpak_out build-aux/ci.manifest.yml
flatpak build-bundle $REPO_DIR $APP_ID.flatpak $APP_ID
flatpak --force remote-delete $REPO_NAME
flatpak --user remote-add --no-gpg-verify $REPO_NAME $REPO_DIR
......
#!/usr/bin/python3
import configparser
import sys
config = configparser.ConfigParser()
config.read('Cargo.toml')
print(config.get(sys.argv[1], sys.argv[2]).strip('"'), end='')
org.gnome.gitlab.sophie_h.PikaPileBackup
\ No newline at end of file
org.gnome.gitlab.sophie_h.PikaBackup
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<clipPath id="a">
<rect height="128" width="128"/>
</clipPath>
<clipPath id="b">
<rect height="128" width="128"/>
</clipPath>
<filter id="c" height="100%" width="100%" x="0%" y="0%">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
</filter>
<mask id="d">
<g clip-path="url(#b)" filter="url(#c)">
<g clip-path="url(#a)">
<path d="m 14.789062 41.804688 l 91.207032 24.4375 l -12.789063 47.734374 l -91.207031 -24.4375 z m 0 0" fill="#f9f06b" fill-rule="evenodd"/>
<path d="m 2.011719 89.527344 l 91.207031 24.441406 l -5.625 3.609375 l -82.519531 -22.113281 z" fill="#f8e45c" fill-rule="evenodd"/>
<path d="m 35.65625 21.332031 l 81.144531 49.550781 l -23.59375 43.097657 l -81.148437 -49.554688 z m 0 0" fill="#ffa348" fill-rule="evenodd"/>
<path d="m 12.070312 64.417969 l 81.148438 49.550781 l -6.226562 1.949219 l -73.417969 -44.832031 z" fill="#ff7800" fill-rule="evenodd"/>
<path d="m 60.441406 7.171875 l 65.558594 71.285156 l -32.792969 35.523438 l -65.558593 -71.289063 z m 0 0" fill="#9141ac" fill-rule="evenodd"/>
<path d="m 27.660156 42.683594 l 65.558594 71.285156 l -6.402344 0.15625 l -59.3125 -64.496094 z" fill="#813d9c" fill-rule="evenodd"/>
<path d="m 15.592846 28.799277 c -3.149162 -5.780526 -2.837037 -13.928866 0.733805 -19.201929 c 3.570842 -5.27203 9.336898 -6.096786 13.588836 -1.944068" fill="none" stroke="#5e5c64" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.645833" transform="matrix(3.779527 0 0 3.779527 0.000007 0)"/>
<path d="m 10.842366 289.201365 l 0.974598 1.657461 l -1.922785 0.015668 z m 0 0" fill="#77767b" fill-rule="evenodd" stroke="#5e5c64" stroke-linecap="round" stroke-width="1.5875" transform="matrix(6.113545 7.158238 -7.158238 6.113545 2066.445503 -1753.556158)"/>
<path d="m 15.328262 27.211777 c -3.149162 -5.780526 -2.837036 -13.928866 0.733806 -19.20193 c 3.570841 -5.272029 9.336898 -6.096785 13.588835 -1.944067" fill="none" stroke="#f6f5f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.645833" transform="matrix(3.779527 0 0 3.779527 0.000007 0)"/>
<path d="m 10.842374 289.20137 l 0.974599 1.657461 l -1.922785 0.015668 z m 0 0" fill="#77767b" fill-rule="evenodd" stroke="#f6f5f4" stroke-linecap="round" stroke-width="1.5875" transform="matrix(6.113545 7.158238 -7.158238 6.113545 2065.445488 -1759.55625)"/>
</g>
</g>
</mask>
<mask id="e">
<g filter="url(#c)">
<rect fill-opacity="0.8" height="128" width="128"/>
</g>
</mask>
<linearGradient id="f" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)" gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
<stop offset="0" stop-color="#f9f06b"/>
<stop offset="1" stop-color="#f5c211"/>
</linearGradient>
<clipPath id="g">
<rect height="128" width="128"/>
</clipPath>
<clipPath id="h">
<rect height="128" width="128"/>
</clipPath>
<g fill-rule="evenodd">
<path d="m 14.789062 41.804688 l 91.207032 24.4375 l -12.789063 47.734374 l -91.207031 -24.4375 z m 0 0" fill="#f9f06b"/>
<path d="m 2.011719 89.527344 l 91.207031 24.441406 l -5.625 3.609375 l -82.519531 -22.113281 z" fill="#f8e45c"/>
<path d="m 35.65625 21.332031 l 81.144531 49.550781 l -23.59375 43.097657 l -81.148437 -49.554688 z m 0 0" fill="#ffa348"/>
<path d="m 12.070312 64.417969 l 81.148438 49.550781 l -6.226562 1.949219 l -73.417969 -44.832031 z" fill="#ff7800"/>
<path d="m 60.441406 7.171875 l 65.558594 71.285156 l -32.792969 35.523438 l -65.558593 -71.289063 z m 0 0" fill="#9141ac"/>
<path d="m 27.660156 42.683594 l 65.558594 71.285156 l -6.402344 0.15625 l -59.3125 -64.496094 z" fill="#813d9c"/>
</g>
<path d="m 58.93358946384 108.84764500198 c -11.90234280637 -21.8476540912 -10.7226579415 -52.64452512638 2.77343581024 -72.57420910758 c 13.49609375173 -19.92577972981 35.28905808725 -23.04296730022 51.35937256057 -7.34765749584" fill="none" stroke="#5e5c64" stroke-linecap="round" stroke-linejoin="round" stroke-width="9.99999726099"/>
<path d="m 10.842366 289.201365 l 0.974598 1.657461 l -1.922785 0.015668 z m 0 0" fill="#77767b" fill-rule="evenodd" stroke="#5e5c64" stroke-linecap="round" stroke-width="1.5875" transform="matrix(6.113545 7.158238 -7.158238 6.113545 2066.445503 -1753.556158)"/>
<path d="m 57.93358709207 102.84764588948 c -11.90234280637 -21.8476540912 -10.72265416197 -52.64452512638 2.77343958976 -72.57421288711 c 13.49608997221 -19.92577595028 35.28905808725 -23.0429635207 51.35936878105 -7.34765371631" fill="none" stroke="#f6f5f4" stroke-linecap="round" stroke-linejoin="round" stroke-width="9.99999726099"/>
<path d="m 10.842374 289.20137 l 0.974599 1.657461 l -1.922785 0.015668 z m 0 0" fill="#77767b" fill-rule="evenodd" stroke="#f6f5f4" stroke-linecap="round" stroke-width="1.5875" transform="matrix(6.113545 7.158238 -7.158238 6.113545 2065.445488 -1759.55625)"/>
<g clip-path="url(#h)" mask="url(#d)">
<g clip-path="url(#g)" mask="url(#e)">
<path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#f)"/>
<path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m 42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v -21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0 0"/>
</g>
</g>
</svg>
......@@ -2,10 +2,10 @@
Version=1.0
Type=Application
Name=Pika Pile Backup
Name=Pika Backup
Comment=Simple backups based on borg
Categories=System;GTK;
Icon=org.gnome.gitlab.sophie_h.PikaPileBackup
Exec=pika-pile --syslog
Icon=org.gnome.gitlab.sophie_h.PikaBackup
Exec=pika-backup --syslog
Terminal=false
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.gnome.gitlab.sophie_h.PikaPileBackup</id>
<id>org.gnome.gitlab.sophie_h.PikaBackup</id>
<name>Pika Pile Backup</name>
<name>Pika Backup</name>
<summary>Simple backups based on borg</summary>
<metadata_license>CC-BY-SA-4.0</metadata_license>
......@@ -20,7 +20,7 @@
</p>
</description>
<launchable type="desktop-id">org.gnome.gitlab.sophie_h.PikaPileBackup.desktop</launchable>
<launchable type="desktop-id">org.gnome.gitlab.sophie_h.PikaBackup.desktop</launchable>
<categories>
<category>System</category>
......@@ -28,6 +28,6 @@
</categories>
<provides>
<binary>pika-pile</binary>
<binary>pika-backup</binary>
</provides>
</component>
datadir = get_option('prefix') / get_option('datadir')
application_id = 'org.gnome.gitlab.sophie_h.PikaPileBackup'
# Read more https://mesonbuild.com/Reference-manual.html#install_data
application_id = run_command('cat', 'APPLICATION_ID').stdout()
install_data(
'@0@.desktop'.format(application_id),
'app.desktop',
rename: '@0@.desktop'.format(application_id),
install_dir: datadir / 'applications'
)
install_data(
'@0@.metainfo.xml'.format(application_id),
'app.metainfo.xml',
rename: 'app.metainfo.xml'.format(application_id),
install_dir: datadir / 'metainfo'
)
app_icon = 'app'
if get_option('profile') == 'dev'
app_icon += '.Devel'
endif
install_data(
'@0@.svg'.format(application_id),
'@0@.svg'.format(app_icon),
rename: '@0@.svg'.format(application_id),
install_dir: datadir / 'icons' / 'hicolor' / 'scalable' / 'apps'
)
project('pika-pile',
'rust',
version: '0.1.0')
project(
run_command(
find_program(join_paths(meson.source_root(), 'build-aux/manifest.py')),
'package', 'name'
).stdout(),
'rust',
version: run_command(
find_program(join_paths(meson.source_root(), 'build-aux/manifest.py')),
'package', 'version'
).stdout()
)
dependency('glib-2.0')
dependency('gio-2.0')
dependency('gtk+-3.0')
meson.add_dist_script('build-aux/dist-vendor.sh')
subdir('data')
subdir('src')
option (
'profile',
type: 'combo',
choices: [
'release',
'dev'
],
value: 'release',
)
fn main() {
pika_pile::ui::main()
pika_backup::ui::main()
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment