~ubuntu-desktop/quadrapassel/snap

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: quadrapassel
adopt-info: quadrapassel
summary: Fit falling blocks together
description: |
  Quadrapassel is a derivative of a classic Russian falling-block game.
  Reposition and rotate the blocks as they fall, and attempt to fit them
  together. When you form a complete horizontal row of blocks, the row will
  disappear and you score points. The game is over when the blocks get stacked
  too high. As your score gets higher, you level up and the blocks fall faster.

  If you're looking for a challenge, Quadrapassel allows you to increase the
  initial speed of the blocks, or begin the game with partial blocks on some
  of the rows. Or, instead of allowing the blocks to fall randomly, it can
  select blocks that will be hard for you to place.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict
base: core18

plugs:
  gnome-3-28-1804:
    interface: content
    target: $SNAP/gnome-platform
    default-provider: gnome-3-28-1804
  gtk-3-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes
  sound-themes:
    interface: content
    target: $SNAP/data-dir/sounds
    default-provider: gtk-common-themes

slots:
  # for GtkApplication registration
  quadrapassel:
    interface: dbus
    bus: session
    name: org.gnome.quadrapassel

apps:
  quadrapassel:
    command: desktop-launch quadrapassel
    plugs:
      - desktop
      - desktop-legacy
      - gsettings
      - opengl
      - pulseaudio
      - unity7
      - wayland
    desktop: usr/share/applications/quadrapassel.desktop
    environment:
      GSETTINGS_SCHEMA_DIR: $SNAP/share/glib-2.0/schemas
      LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib/quadrapassel

parts:
  desktop-gnome-platform:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: gtk
    plugin: make
    make-parameters: ["FLAVOR=gtk3"]
    build-packages:
      - build-essential
      - libgtk-3-dev
    override-build: |
      snapcraftctl build
      mkdir -pv $SNAPCRAFT_PART_INSTALL/gnome-platform
        
  libcanberra:
    source: git://git.0pointer.de/libcanberra
    source-type: git
    plugin: autotools
    configflags:
      - --prefix=/snap/quadrapassel/current/usr
      - --enable-pulse
      - --enable-gstreamer
      - --enable-gtk3
      - --enable-alsa
      - --disable-oss
    organize:
      snap/quadrapassel/current/usr: usr
    build-packages:
      - libltdl-dev
      - libasound2-dev
      - libvorbis-dev
      - libgtk-3-dev
      - libtdb-dev
      - libpulse-dev
      - libgstreamer1.0-dev
      - gtk-doc-tools

  gsound:
    after: [libcanberra]
    source: https://gitlab.gnome.org/GNOME/gsound.git
    source-type: git
    plugin: autotools
    configflags: [--prefix=/snap/quadrapassel/current/usr, --disable-Werror]
    organize:
      snap/quadrapassel/current/usr: usr
    build-packages:
      - intltool
      - libgirepository1.0-dev
      - libglib2.0-dev
      - valac

  quadrapassel:
    after: [desktop-gnome-platform, gsound]
    source: https://gitlab.gnome.org/GNOME/quadrapassel.git
    source-type: git
    #source-branch: master
    source-tag: 3.22.0
    plugin: autotools
    # workaround the issue described in https://launchpad.net/bugs/1583250
    configflags: [--prefix=/snap/quadrapassel/current/usr]
    organize:
      snap/quadrapassel/current/usr: usr
    override-pull: |
      snapcraftctl pull
      snapcraftctl set-version $(git describe --tags --abbrev=10)
    override-build: |
      sed -i.bak -e 's|=quadrapassel$|=${SNAP}/meta/gui/quadrapassel.png|g' data/quadrapassel.desktop.in
      snapcraftctl build
      mkdir -p $SNAPCRAFT_PART_INSTALL/meta/gui/
      cp ../src/data/icons/hicolor/48x48/quadrapassel.png $SNAPCRAFT_PART_INSTALL/meta/gui/
      cp data/quadrapassel.desktop $SNAPCRAFT_PART_INSTALL/meta/gui/
    build-packages:
      - desktop-file-utils
      - gettext
      - gnome-common
      - gsettings-desktop-schemas-dev
      - appstream-util
      - gnome-pkg-tools
      - intltool
      - libcanberra-gtk3-dev
      - libclutter-1.0-dev
      - libclutter-gtk-1.0-dev
      - libglib2.0-dev
      - libgtk-3-dev
      - librsvg2-dev
      - valac
      - yelp-tools