[shotwell/wip/phako/enhanced-faces: 1/5] facedetect: Add desktop file to make flatpak happy



commit 873e883fc52ec487ee15ffa1a291656b90da0be5
Author: Jens Georg <mail jensge org>
Date:   Thu Oct 11 11:28:14 2018 +0200

    facedetect: Add desktop file to make flatpak happy

 flatpak/org.gnome.Shotwell.Faces.json              | 76 ++++++++++++++++++++++
 subprojects/shotwell-facedetect/meson.build        | 13 +++-
 .../org.gnome.Shotwell.Faces1.desktop.in           |  7 ++
 3 files changed, 93 insertions(+), 3 deletions(-)
---
diff --git a/flatpak/org.gnome.Shotwell.Faces.json b/flatpak/org.gnome.Shotwell.Faces.json
new file mode 100644
index 00000000..facf2052
--- /dev/null
+++ b/flatpak/org.gnome.Shotwell.Faces.json
@@ -0,0 +1,76 @@
+{
+    "app-id" : "org.gnome.Shotwell.Faces1",
+    "runtime" : "org.gnome.Platform",
+    "runtime-version" : "3.30",
+    "sdk" : "org.gnome.Sdk",
+    "tags" : [
+        "nightly"
+    ],
+    "desktop-file-name-prefix" : "(Nightly) ",
+    "finish-args" : [
+        "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
+        "--filesystem=~/.config/dconf:ro",
+        "--filesystem=xdg-download",
+        "--filesystem=xdg-pictures",
+        "--share=ipc",
+        "--talk-name=org.gtk.vfs",
+        "--talk-name=org.gtk.vfs.*"
+    ],
+    "cleanup" : [
+        "/include",
+        "/lib/pkconfig",
+        "/share/pkgconfig",
+        "/share/gtk-doc",
+        "/share/man",
+        "/share/vala",
+        "/lib/girepository",
+        "*.la",
+        "*.a"
+    ],
+    "modules" : [
+        {
+            "name" : "opencv",
+            "buildsystem" : "cmake",
+            "builddir" : true,
+            "cleanup" : [
+                "/share/OpenCV/*.cmake",
+                "/share/OpenCV/*.supp"
+            ],
+            "config-opts" : [
+                "-DBUILD_TESTS=OFF",
+                "-DBUILD_EXAMPLES=OFF",
+                "-DBUILD_PERF_TESTS=OFF",
+                "-DWITH_FFMPEG=OFF",
+                "-DWITH_GTK=OFF",
+                "-DWITH_GSTREAMER=OFF",
+                "-DWITH_JASPER=OFF",
+                "-DWITH_OPENEXR=OFF",
+                "-DWITH_GDAL=OFF",
+                "-DWITH_GDCM=OFF",
+                "-DBUILD_opencv_apps=OFF",
+                "-DCMAKE_INSTALL_LIBDIR=lib",
+                "-DBUILD_LIST=imgproc,imgcodecs,objdetect,dnn"
+            ],
+            "sources" : [
+                {
+                    "type" : "git",
+                    "tag" : "3.4.1",
+                    "commit" : "6ffc48769ac60d53c4bd1913eac15117c9b1c9f7",
+                    "url" : "https://github.com/opencv/opencv";
+                }
+            ]
+        },
+        {
+            "name" : "shotwell-facedetect",
+            "buildsystem" : "meson",
+            "subdir" : "subprojects/shotwell-facedetect",
+            "sources" : [
+                {
+                    "type" : "git",
+                    "path": "/home/jgeorg/Source/GNOME/shotwell",
+                    "branch" : "enhanced-faces"
+                }
+            ]
+        }
+    ]
+}
diff --git a/subprojects/shotwell-facedetect/meson.build b/subprojects/shotwell-facedetect/meson.build
index 07c0c70e..4ece7d15 100644
--- a/subprojects/shotwell-facedetect/meson.build
+++ b/subprojects/shotwell-facedetect/meson.build
@@ -17,10 +17,20 @@ gdbus_src = gnome.gdbus_codegen('dbus-interface',
   sources: 'org.gnome.ShotwellFaces1.xml',
   interface_prefix : 'org.gnome.')
 
+con = configuration_data()
+con.set('libexecdir', join_paths(get_option('prefix'), libexecdir))
+
 if meson.is_subproject()
     config_incdir = include_directories('../..')
 else
     config_incdir = include_directories('.')
+    configure_file(
+        input: 'org.gnome.Shotwell.Faces1.desktop.in',
+        output: 'org.gnome.Shotwell.Faces1.desktop',
+        configuration: con,
+        install: true,
+        install_dir : join_paths(get_option('datadir'), 'applications')
+    )
 endif
 
 executable('shotwell-facedetect',
@@ -32,9 +42,6 @@ executable('shotwell-facedetect',
 install_data('facedetect-haarcascade.xml',
               install_dir : join_paths(get_option('datadir'), 'shotwell'))
 
-con = configuration_data()
-con.set('libexecdir', join_paths(get_option('prefix'), libexecdir))
-
 configure_file(
     input : 'org.gnome.Shotwell.Faces1.service.in',
     output : 'org.gnome.Shotwell.Faces1.service',
diff --git a/subprojects/shotwell-facedetect/org.gnome.Shotwell.Faces1.desktop.in 
b/subprojects/shotwell-facedetect/org.gnome.Shotwell.Faces1.desktop.in
new file mode 100644
index 00000000..d64714e2
--- /dev/null
+++ b/subprojects/shotwell-facedetect/org.gnome.Shotwell.Faces1.desktop.in
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Version=1.0
+Name=Shotwell Face detection
+Comment=Shotwell face detection and recognition backend
+NoDisplay=true
+Type=Application
+Exec=@libexecdir@/shotwell-facedetect


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]