mercurial-scm.org (#2755)

* mercurial-scm.org

* sed

* simplify some file management

* install -d

* install is picky

---------

Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
Andrew 2023-08-07 01:46:54 +03:00 committed by GitHub
parent 796b1a8d6c
commit 74730a1eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}}