Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y meson libaccountsservice-dev dbus libpolkit-gobject-1-dev python3 libglib2.0-bin
apt install -y meson libaccountsservice-dev dbus libpolkit-gobject-1-dev python3 libglib2.0-bin systemd-dev
- name: Build
env:
DESTDIR: ${{ env.PWD }}/build/out
Expand Down
32 changes: 32 additions & 0 deletions flatpak/appcenter.preinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[Flatpak Preinstall io.elementary.calculator]
Branch=stable

[Flatpak Preinstall io.elementary.camera]
Branch=stable

[Flatpak Preinstall io.elementary.capnet-assist]
Branch=stable

[Flatpak Preinstall io.elementary.maps]
Branch=stable

[Flatpak Preinstall io.elementary.music]
Branch=stable

[Flatpak Preinstall io.elementary.screenshot]
Branch=stable

[Flatpak Preinstall io.elementary.videos]
Branch=stable

[Flatpak Preinstall org.gnome.Epiphany]
Branch=stable

[Flatpak Preinstall org.gnome.Evince]
Branch=stable

[Flatpak Preinstall org.gnome.FileRoller]
Branch=stable

[Flatpak Preinstall org.gnome.font-viewer]
Branch=stable
22 changes: 22 additions & 0 deletions flatpak/flatpak-preinstalld.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Unit]
Description=Preinstall Flatpaks
After=network-online.target
Wants=network-online.target
ConditionPathExists=/usr/bin/flatpak
ConditionPathExists=!/var/lib/flatpak/.preinstall-finished
Comment thread
ryonakano marked this conversation as resolved.
Documentation=man:flatpak-preinstall(1)
StartLimitIntervalSec=600

[Service]
Type=oneshot
ExecStart=mkdir -p /var/lib/flatpak/
ExecStart=/usr/bin/flatpak preinstall -y
ExecStart=touch /var/lib/flatpak/.preinstall-finished
RemainAfterExit=true
Restart=on-failure
RestartSec=30

StartLimitBurst=3

[Install]
WantedBy=multi-user.target
17 changes: 17 additions & 0 deletions flatpak/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
install_data(
'appcenter.preinstall',
install_dir: datadir / 'flatpak' / 'preinstall.d'
)

systemd_system_unit_dir = get_option('systemdsystemunitdir')
if systemd_system_unit_dir != 'no'
if systemd_system_unit_dir == ''
systemd_dep = dependency('systemd')
systemd_system_unit_dir = systemd_dep.get_variable('systemdsystemunitdir', pkgconfig_define: ['rootprefix', prefix])
endif

install_data(
'flatpak-preinstalld.service',
install_dir: systemd_system_unit_dir
)
endif
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ gnome = import('gnome')
prefix = get_option('prefix')
datadir = prefix / get_option('datadir')
sysconfdir = get_option('sysconfdir')
sharedstatedir = get_option('sharedstatedir')
schemadir = datadir / 'glib-2.0' / 'schemas'

gnome.post_install(glib_compile_schemas: true)
Expand Down Expand Up @@ -59,3 +60,6 @@ subdir('gtk')

# Network settings
subdir('network')

# Flatpak preinstall files
subdir('flatpak')
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ option('geoclue',
type: 'boolean',
value: true,
description: 'Install configuration files for GeoClue')

option('systemdsystemunitdir',
type: 'string',
value: '',
description: 'Custom directory for systemd system units, or \'no\' to disable')
6 changes: 6 additions & 0 deletions skel/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ skeldir = sysconfdir / 'skel'

# AppCenter Flatpak Remote
if get_option('appcenter-flatpak')
# remote for system-wide installation
install_subdir(
'flatpak',
install_dir: sharedstatedir
)
# remote for per-user installation
install_subdir(
'flatpak',
install_dir: skeldir / '.local' / 'share'
Expand Down