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..a920b08 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,85 @@ +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 + + 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/**] + 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 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')