From 9f1d57473c4dc6a3e53b82e3f683205f9d674b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 4 Apr 2018 22:07:20 -0500 Subject: [PATCH 1/3] wscript: add x11 as dependency --- wscript | 1 + 1 file changed, 1 insertion(+) diff --git a/wscript b/wscript index d705bff..169f335 100644 --- a/wscript +++ b/wscript @@ -66,6 +66,7 @@ def configure(conf): conf.check_cfg(package='gio-unix-2.0', uselib_store='GIOUNIX', atleast_version='2.32.0', mandatory=1, args='--cflags --libs') conf.check_cfg(package='glib-2.0', uselib_store='GLIB', atleast_version='2.32.0', mandatory=1, args='--cflags --libs') conf.check_cfg(package='gtk+-3.0', uselib_store='GTK', atleast_version='3.10.0', mandatory=1, args='--cflags --libs') + conf.check_cfg(package='x11', uselib_store='X11', atleast_version='1.2.0', mandatory=1, args='--cflags --libs') conf.check_cfg(package='xtst', uselib_store='XTST', atleast_version='1.2.0', mandatory=1, args='--cflags --libs') conf.check_cfg(package='zeitgeist-2.0', uselib_store='ZEITGEIST', atleast_version='0.9.14', mandatory=1, args='--cflags --libs') From 027159c672d5ce00072ad60c13d31a1f9e1e9df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 4 Apr 2018 22:07:59 -0500 Subject: [PATCH 2/3] snap: add basic snap build This still needs devmode confinemenet as per https://pad.lv/1761363 --- .gitignore | 5 +++ snap/snapcraft.yaml | 76 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 snap/snapcraft.yaml diff --git a/.gitignore b/.gitignore index 87f500e..b00e1f0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ _build_ *.swp .lock-waf* .intlcache +*.snap +/parts/ +/prime/ +/stage/ +/snap/.snapcraft diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..c348793 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,76 @@ +name: diodon +version: git +icon: data/icons/hicolor/scalable/apps/diodon.svg +summary: GTK+ Clipboard manager +description: | + Diodon is a lightweight clipboard manager for Linux written in Vala which + "aims to be the best integrated clipboard manager for the Gnome/Unity desktop". + + Diodon features include Ubuntu indicator, clipboard sync (primary selection + and Ctrl+C / Ctrl+V clipboard) and a zeitgeist integration for an infinite + clipboard history. + +grade: stable +confinement: devmode + +apps: + diodon: + command: desktop-launch diodon + desktop: usr/share/applications/diodon.desktop + plugs: + - desktop + - desktop-legacy + - gsettings + - unity7 + - wayland + +slots: + diodon-gapp: + interface: dbus + bus: session + name: net.launchpad.Diodon + +parts: + diodon: + plugin: waf + build-packages: + - gobject-introspection + - intltool + - libappindicator3-dev + - libgee-0.8-dev + - libglib2.0-dev + - libgtk-3-dev + - libpeas-dev + - libx11-dev + - libxtst-dev + - libzeitgeist-2.0-dev + - valac + - xvfb + configflags: + - --nocache + - --skiptests + - --notests + # XXX: This is an hack to have a kind of bind-mount with absolute prefix. + - --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr + organize: + snap/diodon/current: . + stage-packages: + - libgirepository-1.0-1 + - libpeas-1.0-0 + - libxtst6 + - libzeitgeist-2.0-0 + install: | + set -x + export XDG_DATA_DIRS=$SNAPCRAFT_PART_INSTALL/usr/share + update-mime-database $SNAPCRAFT_PART_INSTALL/usr/share/mime + + for dir in $SNAPCRAFT_PART_INSTALL/usr/share/icons/*/; do + if [ -f $dir/index.theme ]; then + gtk-update-icon-cache-3.0 -q $dir + fi + done + after: + - desktop-gtk3 + + desktop-gtk3: + stage: [-./usr/share/fonts/**] From f30853ba26c28d6e2ba7b926c3bf9632cf89134e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 5 Apr 2018 16:55:10 -0500 Subject: [PATCH 3/3] snap: generate icon cache when creating desktop-gtk3 --- snap/snapcraft.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c348793..a920b08 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -62,7 +62,6 @@ parts: install: | set -x export XDG_DATA_DIRS=$SNAPCRAFT_PART_INSTALL/usr/share - update-mime-database $SNAPCRAFT_PART_INSTALL/usr/share/mime for dir in $SNAPCRAFT_PART_INSTALL/usr/share/icons/*/; do if [ -f $dir/index.theme ]; then @@ -74,3 +73,13 @@ parts: desktop-gtk3: stage: [-./usr/share/fonts/**] + install: | + set -x + export XDG_DATA_DIRS=$SNAPCRAFT_PART_INSTALL/usr/share + update-mime-database $SNAPCRAFT_PART_INSTALL/usr/share/mime + + for dir in $SNAPCRAFT_PART_INSTALL/usr/share/icons/*/; do + if [ -f $dir/index.theme ]; then + gtk-update-icon-cache-3.0 -q $dir + fi + done