From c949d05403248af7aa641e9e02a13ef226a2defc Mon Sep 17 00:00:00 2001
From: Jeffrey Wildman <jeffrey.wildman@gmail.com>
Date: Sun, 5 Aug 2018 20:50:40 -0400
Subject: [PATCH] osinfo-db: 20180720

---
 osinfo-db.rb | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 osinfo-db.rb

diff --git a/osinfo-db.rb b/osinfo-db.rb
new file mode 100644
index 0000000..3463f0c
--- /dev/null
+++ b/osinfo-db.rb
@@ -0,0 +1,19 @@
+class OsinfoDb < Formula
+  desc "Libosinfo database files"
+  homepage "https://libosinfo.org/"
+  url "https://releases.pagure.org/libosinfo/osinfo-db-20180720.tar.xz"
+  sha256 "48c9047c35e9f6289c0dfe9238a039068eca6b026962e25bc2fa753e99fa0978"
+
+  depends_on "osinfo-db-tools" => :build
+
+  def install
+    system "osinfo-db-import", "--local", cached_download
+
+    # Copy the archive into the prefix to avoid empty installation error
+    cp_r "./", prefix
+  end
+
+  test do
+    system "#{bin}/osinfo-db-validate", "--local"
+  end
+end