From 74730a1eba5210baa9887b46a1542c472474aec9 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Mon, 7 Aug 2023 01:46:54 +0300 Subject: [PATCH] mercurial-scm.org (#2755) * mercurial-scm.org * sed * simplify some file management * install -d * install is picky --------- Co-authored-by: Jacob Heider --- projects/mercurial-scm.org/package.yml | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 projects/mercurial-scm.org/package.yml diff --git a/projects/mercurial-scm.org/package.yml b/projects/mercurial-scm.org/package.yml new file mode 100644 index 00000000..e296e133 --- /dev/null +++ b/projects/mercurial-scm.org/package.yml @@ -0,0 +1,41 @@ +distributable: + url: https://www.mercurial-scm.org/release/mercurial-{{version.raw}}.tar.gz + strip-components: 1 +versions: + url: https://www.mercurial-scm.org/release + match: /mercurial-\d+\.\d+(\.\d+)?\.tar\.gz/ + strip: + - /^mercurial-/ + - /\.tar\.gz/ +dependencies: + python.org: ^3.11 +build: + dependencies: + tea.xyz/gx/cc: c99 + gnu.org/make: '*' + script: + - make install-bin PREFIX={{prefix}} + - make -C contrib/chg install PREFIX={{prefix}} HGPATH={{prefix}}/bin/hg HG={{prefix}}/bin/hg + - run: cat $PROP >hgrc + prop: | + [pager] + pager = less -FRX + working-directory: ${{prefix}}/etc/mercurial + - run: | + mkdir -p {{prefix}}/share/man/man{1,5} + install hg.1 {{prefix}}/share/man/man1/ + install hgignore.5 hgrc.5 {{prefix}}/share/man/man5/ + working-directory: doc + - run: | + sed -i.bak '1s|.*|#!/usr/bin/env python3|' hg + rm hg.bak + working-directory: ${{prefix}}/bin + env: + HGPYTHON3: 1 +provides: + - bin/hg + - bin/chg +test: + script: + - hg init + - hg --version | grep {{version.marketing}}