|
1 | 1 | class Pastebinit < Formula |
| 2 | + include Language::Python::Shebang |
| 3 | + |
2 | 4 | desc "Send things to pastebin from the command-line" |
3 | | - homepage "https://launchpad.net/pastebinit" |
4 | | - url "https://launchpad.net/pastebinit/trunk/1.5/+download/pastebinit-1.5.tar.gz" |
5 | | - sha256 "0d931dddb3744ed38aa2d319dd2d8a2f38a391011ff99db68ce7c83ab8f5b62f" |
| 5 | + homepage "https://github.com/pastebinit/pastebinit" |
| 6 | + url "https://github.com/pastebinit/pastebinit/archive/refs/tags/1.7.1.tar.gz" |
| 7 | + sha256 "8e91c2c0d02a41faaa40d9f585fe858893c3f0ef94836ee4ce14094cfc10b938" |
6 | 8 | license "GPL-2.0-or-later" |
7 | | - revision 4 |
8 | | - |
9 | | - no_autobump! because: :requires_manual_review |
| 9 | + head "https://github.com/pastebinit/pastebinit.git", branch: "master" |
10 | 10 |
|
11 | 11 | bottle do |
12 | | - rebuild 4 |
13 | | - sha256 cellar: :any_skip_relocation, all: "01413047be89a3e516a5a8e4668488ae73c1b30e90d98ed6e4c47d43e4672a46" |
| 12 | + sha256 cellar: :any_skip_relocation, all: "89be086efffd69157222144a6a0606ba775daaf156927cfde6aae9d2fadec2ae" |
14 | 13 | end |
15 | 14 |
|
16 | 15 | depends_on "docbook2x" => :build |
17 | | - # Do not bump, `FancyURLopener` is removed in 3.14 |
18 | | - # ref: https://docs.python.org/ko/dev/whatsnew/3.14.html#id12 |
19 | | - |
20 | | - |
21 | | - # Remove for next release |
22 | | - patch do |
23 | | - url "https://github.com/lubuntu-team/pastebinit/commit/ab05aa431a6bf76b28586ad97c98069b8de5e46a.patch?full_index=1" |
24 | | - sha256 "1abd0ec274cf0952a371e6738fcd3ece67bb9a4dd52f997296cd107f035f5690" |
25 | | - end |
| 16 | + depends_on "gettext" => :build # for msgfmt |
| 17 | + |
| 18 | + uses_from_macos "python" |
26 | 19 |
|
27 | 20 | def install |
28 | | - inreplace "pastebinit" do |s| |
29 | | - s.gsub! "/usr/bin/python3", which("python3.13") |
30 | | - s.gsub! "/usr/local/etc/pastebin.d", etc/"pastebin.d" |
31 | | - end |
| 21 | + inreplace "pastebinit", "confdirs = []", "confdirs = ['#{pkgetc}/pastebin.d']" |
| 22 | + rewrite_shebang detected_python_shebang(use_python_from_path: true), "pastebinit" |
| 23 | + |
| 24 | + bin.install "pastebinit", *buildpath.glob("utils/*{s,t}") |
| 25 | + pkgetc.install "pastebin.d" |
32 | 26 |
|
33 | 27 | system "docbook2man", "pastebinit.xml" |
34 | | - bin.install "pastebinit" |
35 | | - etc.install "pastebin.d" |
36 | 28 | man1.install "PASTEBINIT.1" => "pastebinit.1" |
37 | | - libexec.install %w[po utils] |
| 29 | + man1.install buildpath.glob("utils/*.1") |
| 30 | + |
| 31 | + system "make", "-C", "po" |
| 32 | + (share/"locale").install (buildpath/"po/mo").children |
38 | 33 | end |
39 | 34 |
|
40 | 35 | test do |
|
0 commit comments