{
 "app_id": "org.gnome.SimpleScan",
 "source_url": "https://raw.githubusercontent.com/flathub/org.gnome.SimpleScan/master/org.gnome.SimpleScan.json",
 "runtime": "org.gnome.Platform",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=all",
  "--system-talk-name=org.freedesktop.Avahi"
 ],
 "module_count": 8,
 "fetched_at": "2026-09-19T13:04:18.259554+00:00",
 "manifest": {
  "id": "org.gnome.SimpleScan",
  "runtime": "org.gnome.Platform",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "command": "simple-scan",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--device=all",
   "--share=network",
   "--system-talk-name=org.freedesktop.Avahi",
   "--env=SANE_CONFIG_DIR=/app/etc/sane.d"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/man",
   "/share/aclocal",
   "/share/gir-1.0",
   "/share/girepository-1",
   "/share/gtk-doc",
   "/share/man",
   "/share/pkgconfig",
   "/share/vala",
   "*.la",
   "*.a"
  ],
  "modules": [
   {
    "name": "libgusb",
    "buildsystem": "meson",
    "config-opts": [
     "-Ddocs=false"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/hughsie/libgusb.git",
      "commit": "ed31c8134d80d006bd45450e84180be2a7c0742e",
      "tag": "0.4.9",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([\\d.]+)$"
      }
     }
    ]
   },
   {
    "name": "sane-backends",
    "buildsystem": "autotools",
    "sources": [
     {
      "type": "git",
      "url": "https://gitlab.com/sane-project/backends.git",
      "commit": "c7e4b5e35e3d614d2b1181d760a717bfc395a203",
      "tag": "1.4.0",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([\\d.]+)$"
      }
     }
    ]
   },
   {
    "name": "net-snmp",
    "no-parallel-make": true,
    "config-opts": [
     "--disable-static",
     "--disable-embedded-perl",
     "--without-perl-modules",
     "--without-rpm",
     "--enable-ucd-snmp-compatibility",
     "--enable-ipv6",
     "--enable-as-needed",
     "--with-openssl",
     "--with-pic",
     "--with-default-snmp-version=3",
     "--with-sys-contact=root@localhost"
    ],
    "build-options": {
     "ldflags": "-lncurses -ltinfo"
    },
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/net-snmp/net-snmp-5.9.5.2.tar.gz",
      "sha256": "16707719f833184a4b72835dac359ae188123b06b5e42817c00790d7dc1384bf",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 2062,
       "stable-only": true,
       "url-template": "https://downloads.sourceforge.net/net-snmp/net-snmp-$version.tar.gz"
      }
     }
    ]
   },
   {
    "name": "libevent",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/libevent/libevent.git",
      "commit": "5df3037d10556bfcb675bc73e516978b75fc7bc7",
      "tag": "release-2.1.12-stable",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^release-([\\d.]+)-stable$"
      }
     }
    ]
   },
   {
    "name": "avahi",
    "cleanup": [
     "/bin",
     "/lib/avahi",
     "/share/applications/*.desktop",
     "/share/avahi"
    ],
    "config-opts": [
     "--with-distro=none",
     "--disable-introspection",
     "--disable-qt3",
     "--disable-qt4",
     "--disable-qt5",
     "--disable-gtk",
     "--disable-gtk3",
     "--disable-core-docs",
     "--disable-manpages",
     "--disable-libdaemon",
     "--disable-python",
     "--disable-pygobject",
     "--disable-mono",
     "--disable-monodoc",
     "--disable-autoipd",
     "--disable-doxygen-doc",
     "--disable-doxygen-dot",
     "--disable-doxygen-xml",
     "--disable-doxygen-html",
     "--disable-manpages",
     "--disable-xmltoman"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/lathiat/avahi.git",
      "commit": "f060abee2807c943821d88839c013ce15db17b58",
      "tag": "v0.8",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^v([\\d.]+)$"
      }
     }
    ]
   },
   {
    "name": "sane-airscan",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/alexpevzner/sane-airscan.git",
      "commit": "03eddd0d8058c482462bccabadad0e56e8400cb4",
      "tag": "0.99.37",
      "x-checker-data": {
       "type": "git",
       "tag-pattern": "^([\\d.]+)$"
      }
     }
    ]
   },
   {
    "name": "hpaio",
    "config-opts": [
     "--disable-static",
     "--disable-doc-build",
     "--disable-hpijs-install",
     "--disable-hpcups-install",
     "--disable-new-hpcups",
     "--disable-hpps-install",
     "--disable-gui-build",
     "--disable-fax-build",
     "--disable-cups11-build",
     "--disable-foomatic-ppd-install",
     "--disable-foomatic-drv-install",
     "--disable-cups-drv-install",
     "--disable-cups-ppd-install",
     "--disable-foomatic-rip-hplip-install",
     "--disable-qt3",
     "--disable-qt4",
     "--disable-qt5",
     "--enable-dbus-build",
     "--enable-network-build",
     "--enable-pp-build",
     "--enable-scan-build",
     "--with-pic",
     "--with-cupsfilterdir=/app/lib/cups/filter",
     "--with-cupsbackenddir=/app/lib/cups/backend"
    ],
    "build-options": {
     "cflags": "-std=gnu18 -Wno-error=implicit-function-declaration",
     "cppflags": "-I/app/include/libusb-1.0"
    },
    "sources": [
     {
      "type": "archive",
      "url": "https://downloads.sourceforge.net/sourceforge/hplip/hplip-3.25.8.tar.gz",
      "sha256": "1cf6d6c28735435c8eb6646e83bcfb721e51c4b1f0e8cf9105a6faf96dc9ad25",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 1327,
       "stable-only": true,
       "url-template": "https://downloads.sourceforge.net/sourceforge/hplip/hplip-$version.tar.gz"
      }
     },
     {
      "type": "patch",
      "paths": [
       "patches/0001-hplip-scan-hpaio-include.patch",
       "patches/0002-hplip-hpaio-gcc14.patch",
       "patches/0003-hplip-scan-orblite-c99.patch",
       "patches/0004-hplip-covscan.patch",
       "patches/0005-hplip-orblite-use-const.patch",
       "patches/0017-Workaround-patch-for-missing-Python3-transition-of-t.patch",
       "patches/0099-flatpak.patch"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "sed -i -re '/^[[:blank:]]*(@HPLIP_BUILD_TRUE@)?halpredir[[:blank:]]*=/s!/usr/share/!$(datadir)/!' Makefile*;",
       "sed -i -re '/^[[:blank:]]*(@HPLIP_BUILD_TRUE@)?rulessystemdir[[:blank:]]*=/s!/usr/lib/!$(libdir)/!' Makefile*;"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "find * -xtype f | xargs -I{} grep -El '(^|[^A-Za-z)])/etc' '{}' | xargs -I{} sed -i -re '/(^|[^A-Za-z)])\\/etc/s!(/etc)!/app\\1!g' '{}';"
      ]
     },
     {
      "type": "shell",
      "commands": [
       "[ $(grep -c 'SAVE_CPPFLAGS=\"$CPPFLAGS\"' configure.in) -eq 1 ];",
       "sed -i -e 's/SAVE_CPPFLAGS=\"$CPPFLAGS\"/save_CFLAGS=\"$CFLAGS\"/' configure.in;"
      ]
     }
    ],
    "post-install": [
     "[ -f \"${FLATPAK_DEST}/etc/hp/hplip.conf\" ] || install -p -D \"hplip.conf\" -t \"${FLATPAK_DEST}/etc/hp/\";",
     "echo 'hpaio' > hpaio && install -p -D hpaio -t \"${FLATPAK_DEST}/etc/sane.d/dll.d/\";"
    ],
    "cleanup": [
     "/lib/cups",
     "/share/ppd"
    ]
   },
   {
    "name": "simple-scan",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://download.gnome.org/sources/simple-scan/50/simple-scan-50.0.tar.xz",
      "sha256": "cc32b561ae227182d31a94466632e311723756e3ac90538c3c7e2a2c9aaa4a09",
      "x-checker-data": {
       "type": "gnome",
       "is-important": true,
       "name": "simple-scan"
      }
     }
    ]
   }
  ]
 }
}