From af5ce3348b649a2a8eb6c708e9f799f7ac88b7d8 Mon Sep 17 00:00:00 2001 From: Tom Schoonjans Date: Tue, 18 Aug 2015 09:43:43 +0200 Subject: [PATCH] desktop-file-utils 0.22 (new formula) --- Formula/desktop-file-utils.rb | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Formula/desktop-file-utils.rb diff --git a/Formula/desktop-file-utils.rb b/Formula/desktop-file-utils.rb new file mode 100644 index 0000000000..14f36a6472 --- /dev/null +++ b/Formula/desktop-file-utils.rb @@ -0,0 +1,43 @@ +class DesktopFileUtils < Formula + desc "Command-line utilities for working with desktop entries" + homepage "https://wiki.freedesktop.org/www/Software/desktop-file-utils/" + url "http://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.22.tar.xz" + sha256 "843532672692f98e9b2d6ae6cc8658da562dfde1606c7f33d9d227a344de56c5" + + depends_on "pkg-config" => :build + depends_on "glib" + + def install + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-lispdir=#{share}/emacs/site-lisp/desktop-file-utils" + system "make", "install" + end + + test do + (testpath/"test.desktop").write <<-EOS.undent + [Desktop Entry] + Version=1.0 + Type=Application + Name=Foo Viewer + Comment=The best viewer for Foo objects available! + TryExec=fooview + Exec=fooview %F + Icon=fooview + MimeType=image/x-foo; + Actions=Gallery;Create; + + [Desktop Action Gallery] + Exec=fooview --gallery + Name=Browse Gallery + + [Desktop Action Create] + Exec=fooview --create-new + Name=Create a new Foo! + Icon=fooview-new + EOS + system "#{bin}/desktop-file-validate", "test.desktop" + end +end