Skip to content

Commit

Permalink
snap: use mir-libs snap
Browse files Browse the repository at this point in the history
  • Loading branch information
Saviq committed May 8, 2024
1 parent a978d46 commit 332f047
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 30 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
with:
fetch-depth: 0 # needed for version determination

- name: Patch PPA and version
run: |
sed -i 's@mir-team/release@mir-team/dev@' snap/snapcraft.yaml
sed -i 's@rev-list --count@rev-parse --short@' snap/snapcraft.yaml
- name: Build and publish the snap
uses: canonical/actions/build-snap@release
with:
Expand Down
42 changes: 17 additions & 25 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ confinement: strict
base: core24
license: GPL-3.0
compression: lzo
package-repositories:
- type: apt
ppa: mir-team/release

platforms:
amd64:
Expand Down Expand Up @@ -93,10 +90,20 @@ slots:
- $SNAP_COMMON/diagnostic

parts:
mir:
plugin: nil
stage-snaps:
- mir-libs/24/edge
prime:
- -*.h
- -*.pc
- -share

ubuntu-frame:
override-pull: |
after: [mir]
override-build: |
craftctl default
mir_version=`LANG=C apt-cache policy mir-graphics-drivers-desktop | sed -rne 's/^\s+Candidate:\s+([^-]*)-.+$/\1/p'`
mir_version=$( sed -rne 's/^version:\s+([^-]*)-.+$/\1/p' ${SNAPCRAFT_STAGE}/meta.mir-libs/snap.yaml )
# work around https://github.com/diddlesnaps/snapcraft-multiarch-action/issues/22
git config --global --add safe.directory ${CRAFT_PROJECT_DIR}
recipe_version=`git -C ${CRAFT_PROJECT_DIR} rev-list --count HEAD`
Expand All @@ -106,21 +113,17 @@ parts:
source: src
build-packages:
- pkg-config
- libmiral-dev
- libwayland-dev
- libboost-iostreams-dev
- libapparmor-dev
- libfreetype6-dev
- libxkbcommon-dev
stage-packages:
- libboost-iostreams1.74.0
# Stage libmiral<n> indirectly as we cannot (since core22) do `try:/else:`
- libmiral-dev
- xkb-data
prime:
# Do not prime the `-dev` part of libmiral-dev, we don't need it (just the libmiral<n> dependency)
- -usr/include
- -usr/lib/*/pkgconfig
- -usr/lib/*/libmir*.so
- libxkbcommon0

build-environment:
- LD_LIBRARY_PATH: ${CRAFT_STAGE}/usr/lib/${CRAFT_ARCH_TRIPLET}

assets:
plugin: nil
Expand All @@ -130,16 +133,6 @@ parts:
- usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf
- usr/share/fonts/truetype/ubuntu/Ubuntu[wdth,wght].ttf

platform:
plugin: nil
stage-packages:
- mir-platform-graphics-gbm-kms
- mir-platform-graphics-x
- mir-platform-graphics-eglstream-kms
prime:
- usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}
- usr/share/libinput

icons:
plugin: nil
stage-packages: [dmz-cursor-theme]
Expand All @@ -164,7 +157,6 @@ parts:
after:
- ubuntu-frame
- assets
- platform
- icons
- scripts
- grim
Expand Down

0 comments on commit 332f047

Please sign in to comment.