-
-
Notifications
You must be signed in to change notification settings - Fork 399
/
snapcraft.yaml
157 lines (149 loc) · 4.35 KB
/
snapcraft.yaml
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
147
148
149
150
151
152
153
154
155
156
157
name: qownnotes
version: "VERSION-STRING"
summary: Plain-text file markdown note taking with Nextcloud/ownCloud integration
grade: stable
confinement: strict
# There is no qmake plugin in core22!
base: core22
description: |
QOwnNotes is the open source (GPL) plain-text file markdown note taking app
for GNU/Linux, macOS and Windows, that (optionally) works together with the
notes application of Nextcloud/ownCloud.
https://www.qownnotes.org/
apps:
qownnotes:
# "=" is not allowed in the command anymore in core20
command: "./wrapper.sh"
environment:
DISABLE_WAYLAND: 1
QT_QPA_PLATFORMTHEME: gtk3
GIT_EXEC_PATH: $SNAP/usr/lib/git-core
GIT_TEMPLATE_DIR: $SNAP/usr/share/git-core/templates
GIT_AUTHOR_NAME: "QOwnNotes"
GIT_AUTHOR_EMAIL: "snap@qownnotes.git"
GIT_COMMITTER_NAME: "QOwnNotes"
GIT_COMMITTER_EMAIL: "snap@qownnotes.git"
EMAIL: "snap@qownnotes.git"
# see https://docs.snapcraft.io/reference/interfaces
plugs:
- x11
- unity7
- network
- network-bind
- home
# - kde-frameworks-5-plug
- desktop
- desktop-legacy
- removable-media
- opengl
- cups-control
# plugs:
# kde-frameworks-5-plug:
# content: kde-frameworks-5-all
# interface: content
# default-provider: kde-frameworks-5
# target: kf5
plugs: # plugs for theming, font settings, cursor and to use gtk3 file chooser
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes:gtk-3-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes:icon-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes:sounds-themes
parts:
qownnotes:
source: https://github.com/pbek/QOwnNotes/releases/download/vVERSION-STRING/qownnotes-VERSION-STRING.tar.xz
source-checksum: sha256/ARCHIVE-SHA256
# see https://snapcraft.io/docs/qmake-plugin
# plugin: qmake
plugin: make
# qmake-parameters:
# - CONFIG+=release
# - CONFIG+=snapcraft
# qmake-project-file: ./src/QOwnNotes.pro
override-build: |
export QT_SELECT=qt5
# remove the default desktop file
rm PBE.QOwnNotes.desktop
echo "#define RELEASE \"Launchpad Snap\"" > release.h
lrelease QOwnNotes.pro
qmake CONFIG+=release CONFIG+=snapcraft QOwnNotes.pro
craftctl default
make install INSTALL_ROOT="${CRAFT_PART_INSTALL}"
build-packages:
- qt5-qmake
- qttools5-dev
- build-essential
- qtdeclarative5-dev
- libqt5svg5-dev
- qttools5-dev-tools
- libqt5websockets5-dev
- libqt5x11extras5-dev
stage-packages:
- libqt5gui5
- libqt5sql5
- libqt5sql5-sqlite
- libqt5widgets5
- libqt5qml5
- libqt5svg5
- libqt5network5
- libqt5xml5
- libqt5printsupport5
- libqt5websockets5
- libqt5x11extras5
- qtwayland5
- git-core
stage:
- -usr/share/pkgconfig
after: [desktop-qt5]
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
# - ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
# - libgtk2.0-0 # snapcraft was complaining about missing libgtk-x11-2.0.so.0
- libqt5svg5 # for loading icon themes which are svg
# - appmenu-qt5
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5
- libglib2.0-0
plasma-integration:
plugin: nil
stage-packages:
# - plasma-integration # causes the KDE file selector to be used that didn't work
- kde-style-breeze
- breeze-icon-theme
# - kio # runtime slaves for kio, but does not seem to work
prime:
- "-usr/share/wallpapers/*"
- "-usr/share/fonts/*"
qt5-gtk-platform:
plugin: nil
stage-packages:
- qt5-gtk-platformtheme
scripts:
plugin: dump
source: snap/local
stage:
- wrapper.sh