forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesktop-file-utils.rb
48 lines (42 loc) · 1.52 KB
/
desktop-file-utils.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class DesktopFileUtils < Formula
desc "Command-line utilities for working with desktop entries"
homepage "https://wiki.freedesktop.org/www/Software/desktop-file-utils/"
url "https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-0.24.tar.xz"
sha256 "a1de5da60cbdbe91e5c9c10ac9afee6c3deb019e0cee5fdb9a99dddc245f83d9"
bottle do
sha256 "2e57d92d8b0385a97a55d6aa32b191a144b329c1b73f85f7465f7c2ab0f2c40f" => :mojave
sha256 "12281d3b3e388bb2f9149ec6b229d44b8b1e65a01e5ecfbde482c7ebb9cec6b9" => :high_sierra
sha256 "16405a7ca997e90c3448d86f291b8d8793cf413ccd95090f64e05bfbb10cb7e9" => :sierra
end
depends_on "pkg-config" => :build
depends_on "glib"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-lispdir=#{elisp}"
system "make", "install"
end
test do
(testpath/"test.desktop").write <<~EOS
[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