Ubuntu Pastebin

Paste from Daniel Holbach at Thu, 28 Jul 2016 13:35:38 +0000

Download as text
 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
daniel@daydream:/tmp/1$ cat snapcraft.yaml 
name: pithos-ahoneybun  # the name of the snap
version: 1.2.0  # the version of the snap
summary: This is my-snap's summary  # 79 char long summary
description: This is my-snap's description  # a longer description for the snap
confinement: devmode  # use "strict" to enforce system access only via declared interfaces

apps:
  pithos-app:
    command: desktop-launch
    plugs: [X11, network, network-bind, pulseaudio]

parts:
    pithos:
      source: https://github.com/pithos/pithos/archive/master.tar.gz
      plugin: x_autogen
      build-packages:
        - python3-dbus
        - python3-gi
        - python3-gi-cairo
        - gir1.2-gstreamer-1.0
        - gir1.2-gst-plugins-base-1.0
        - gstreamer1.0-plugins-good
        - gstreamer1.0-plugins-bad
        - gir1.2-secret-1
        - libgdk-pixbuf2.0-dev
        - libglib2.0-dev
        - python3-pylast
        - gir1.2-appindicator3-0.1
        - gir1.2-notify-0.7
        - gir1.2-keybinder-3.0
        - gnome-icon-theme-symbolic
        - libxml2-utils
      after: [desktop/gtk3]
daniel@daydream:/tmp/1$ cat parts/plugins/x_autogen.py 
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-

import snapcraft
from snapcraft.plugins import autotools

import os


class VLCAutotoolsPlugin(autotools.AutotoolsPlugin):

    def build(self):
        # setup build directory
        super(autotools.AutotoolsPlugin, self).build()

        # run boostrap before autotools build
        os.chdir(self.builddir)
        self.run(['./autogen.sh'])

        # the plugins hooks are not idemnpotent, where they should be.
        # so we need to answer that calling the autotools plugins won't
        # retrigger BasePlugin build() which erase the directory.
        # However the issue with this hack is that other parts from this
        # project will be impacted if they are instantiated after this
        # method is ran, which is unlikely, but still possible.
        # https://bugs.launchpad.net/snapcraft/+bug/1595964.
        snapcraft.BasePlugin.build = lambda self: None
        super().build()
daniel@daydream:/tmp/1$ 
Download as text