2 arch arm: "M1", intel: "x64"
3 pkg_arch = on_arch_conditional arm: "aarch64", intel: "x64"
6 sha256 arm: "2ffbf235fe0ff77c72707c674a67d4ffb924c05eca5910c7478dc96069c900a9",
7 intel: "a14b6203d597cd113a2f53d587d657320632011b29cea1fbeadfd663140bcbed"
9 url "https://estaticos.redsara.es/comunes/autofirma/#{version.major}/#{version.minor}/#{version.patch}/AutoFirma_Mac_#{arch}.zip",
10 verified: "estaticos.redsara.es/comunes/autofirma/"
12 desc "Digital signature editor and validator"
13 homepage "https://firmaelectronica.gob.es/Home/Descargas.htm"
17 regex(%r{autofirma/(\d+)/(\d+)/(\d+)/AutoFirma[._-]Mac[._-]#{arch}\.zip}i)
18 strategy :page_match do |page, regex|
19 page.scan(regex).map { |match| "#{match[0]}.#{match[1]}.#{match[2]}" }
23 pkg "AutoFirma_#{version.dots_to_underscores}_#{pkg_arch}.pkg"
25 # remove 'Autofirma ROOT' and '127.0.0.1' certificates from keychain (these were installed by pkg)
26 uninstall_postflight do
27 system_command "/usr/bin/security",
30 "-c", "AutoFirma ROOT"
34 system_command "/usr/bin/security",
42 uninstall quit: "es.gob.afirma",
43 pkgutil: "es.gob.afirma",
44 delete: "/Applications/AutoFirma.app"
48 "~/Library/Application Support/AutoFirma",
49 "~/Library/Preferences/es.gob.afirma.plist",