111 lines
4.4 KiB
Ruby
111 lines
4.4 KiB
Ruby
class Khal < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "CLI calendar application"
|
|
homepage "https://lostpackets.de/khal/"
|
|
url "https://files.pythonhosted.org/packages/f2/7d/c7d88bf11e6e62c5671d7b89fbc6dd7ce67d09a79ab8951ed6726791cc48/khal-0.10.3.tar.gz"
|
|
sha256 "2fdd8fc14fe597e5a7d6e9c63c7868d960b4ed021b563c684a71f07090eda432"
|
|
license "MIT"
|
|
head "https://github.com/pimutils/khal.git"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "3cced9430aa43b2bf09eabd48f715eba96fc440183a99ca653cf6bf2909a0f16"
|
|
sha256 cellar: :any_skip_relocation, big_sur: "3e90a57da163a0233afe9086d19b20992065b2166905b43971fdd9beda727846"
|
|
sha256 cellar: :any_skip_relocation, catalina: "91685e0cb8aee14a698634d66032ca208493c4da59a0871e1275f3edea293048"
|
|
sha256 cellar: :any_skip_relocation, mojave: "5eb78b53541dbc953a60345ff433ee5e4a5f1f0c16699cafbf71d5a49f28b509"
|
|
end
|
|
|
|
depends_on "python@3.9"
|
|
|
|
resource "atomicwrites" do
|
|
url "https://files.pythonhosted.org/packages/55/8d/74a75635f2c3c914ab5b3850112fd4b0c8039975ecb320e4449aa363ba54/atomicwrites-1.4.0.tar.gz"
|
|
sha256 "ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"
|
|
end
|
|
|
|
resource "click" do
|
|
url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz"
|
|
sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"
|
|
end
|
|
|
|
resource "click-log" do
|
|
url "https://files.pythonhosted.org/packages/22/44/3d73579b547f0790a2723728088c96189c8b52bd2ee3c3de8040efc3c1b8/click-log-0.3.2.tar.gz"
|
|
sha256 "16fd1ca3fc6b16c98cea63acf1ab474ea8e676849dc669d86afafb0ed7003124"
|
|
end
|
|
|
|
resource "configobj" do
|
|
url "https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz"
|
|
sha256 "a2f5650770e1c87fb335af19a9b7eb73fc05ccf22144eb68db7d00cd2bcb0902"
|
|
end
|
|
|
|
resource "icalendar" do
|
|
url "https://files.pythonhosted.org/packages/58/b8/9aa7963f442b2a8bfdfc40eab8bc399c5eaac5711b8919c52122e4903544/icalendar-4.0.7.tar.gz"
|
|
sha256 "0fc18d87f66e0b5da84fa731389496cfe18e4c21304e8f6713556b2e8724a7a4"
|
|
end
|
|
|
|
resource "python-dateutil" do
|
|
url "https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz"
|
|
sha256 "73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"
|
|
end
|
|
|
|
resource "pytz" do
|
|
url "https://files.pythonhosted.org/packages/b0/61/eddc6eb2c682ea6fd97a7e1018a6294be80dba08fa28e7a3570148b4612d/pytz-2021.1.tar.gz"
|
|
sha256 "83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"
|
|
end
|
|
|
|
resource "pyxdg" do
|
|
url "https://files.pythonhosted.org/packages/6f/2e/2251b5ae2f003d865beef79c8fcd517e907ed6a69f58c32403cec3eba9b2/pyxdg-0.27.tar.gz"
|
|
sha256 "80bd93aae5ed82435f20462ea0208fb198d8eec262e831ee06ce9ddb6b91c5a5"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz"
|
|
sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"
|
|
end
|
|
|
|
resource "tzlocal" do
|
|
url "https://files.pythonhosted.org/packages/ce/73/99e4cc30db6b21cba6c3b3b80cffc472cc5a0feaf79c290f01f1ac460710/tzlocal-2.1.tar.gz"
|
|
sha256 "643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44"
|
|
end
|
|
|
|
resource "urwid" do
|
|
url "https://files.pythonhosted.org/packages/94/3f/e3010f4a11c08a5690540f7ebd0b0d251cc8a456895b7e49be201f73540c/urwid-2.1.2.tar.gz"
|
|
sha256 "588bee9c1cb208d0906a9f73c613d2bd32c3ed3702012f51efe318a3f2127eae"
|
|
end
|
|
|
|
def install
|
|
virtualenv_install_with_resources
|
|
end
|
|
|
|
test do
|
|
ENV["LC_ALL"] = "en_US.UTF-8"
|
|
ENV["LANG"] = "en_US.UTF-8"
|
|
(testpath/".calendar/test/01ef8547.ics").write <<~EOS
|
|
BEGIN:VCALENDAR
|
|
VERSION:2.0
|
|
BEGIN:VEVENT
|
|
DTSTART;VALUE=DATE:20130726
|
|
SUMMARY:testevent
|
|
DTEND;VALUE=DATE:20130727
|
|
LAST-MODIFIED:20130725T142824Z
|
|
DTSTAMP:20130725T142824Z
|
|
CREATED:20130725T142824Z
|
|
UID:01ef8547
|
|
END:VEVENT
|
|
END:VCALENDAR
|
|
EOS
|
|
(testpath/".config/khal/config").write <<~EOS
|
|
[calendars]
|
|
[[test]]
|
|
path = #{testpath}/.calendar/test/
|
|
color = light gray
|
|
[sqlite]
|
|
path = #{testpath}/.calendar/khal.db
|
|
[locale]
|
|
firstweekday = 0
|
|
[default]
|
|
default_calendar = test
|
|
EOS
|
|
system "#{bin}/khal", "--no-color", "search", "testevent"
|
|
end
|
|
end
|