Skip to content

Commit

Permalink
Add ability to install man pages via make install (ioncoincore#27)
Browse files Browse the repository at this point in the history
* Add support for out-of-tree builds in gen-manpages.sh

This adds support for setting the environment variable `BUILDDIR`
to point to executables that are outside the source directory.

E.g. to invoke the tool when the build is in $PWD/build:

```bash
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
```

* Add autogenerated manpages for 3.0.4

* Add ability to install man pages via `make install`
  • Loading branch information
MitchellCash authored and cevap committed Feb 6, 2021
1 parent ea1308e commit 3045823
Show file tree
Hide file tree
Showing 8 changed files with 394 additions and 911 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1423,9 +1423,9 @@ AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS)
AC_SUBST(DSYMUTIL_FLAT)
AC_SUBST(USE_NUM_GMP)
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
AC_CONFIG_FILES([doc/Doxyfile])
AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
Expand Down
13 changes: 9 additions & 4 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ check-doc.py
Check if all command line args are documented. The return value indicates the
number of undocumented args.

clang-format-diff.py
===================

A script to format unified git diffs according to [.clang-format](../../src/.clang-format).

Expand Down Expand Up @@ -79,14 +77,13 @@ year rather than two hyphenated years.
If the file already has a copyright for `The Ion Core developers`, the
script will exit.

=======
gen-manpages.sh
===============

A small script to automatically create manpages in ../../doc/man by running the release binaries with the -help option.
This requires help2man which can be found at: https://www.gnu.org/software/help2man/

git-subtree-check.sh
====================

Run this script from the root of the repository to verify that a subtree matches the contents of
the commit it claims to have been updated to.
Expand All @@ -101,6 +98,14 @@ maintained:
Usage: `git-subtree-check.sh DIR (COMMIT)`

`COMMIT` may be omitted, in which case `HEAD` is used.
=======
With in-tree builds this tool can be run from any directory within the
repostitory. To use this tool with out-of-tree builds set `BUILDDIR`. For
example:

```bash
BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
```

github-merge.py
===============
Expand Down
18 changes: 10 additions & 8 deletions contrib/devtools/gen-manpages.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#!/bin/bash

TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)}
SRCDIR=${SRCDIR:-$TOPDIR/src}
BUILDDIR=${BUILDDIR:-$TOPDIR}

BINDIR=${BINDIR:-$BUILDDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}

BITCOIND=${BITCOIND:-$SRCDIR/iond}
BITCOINCLI=${BITCOINCLI:-$SRCDIR/ion-cli}
BITCOINTX=${BITCOINTX:-$SRCDIR/ion-tx}
BITCOINQT=${BITCOINQT:-$SRCDIR/qt/ion-qt}
IOND=${IOND:-$BINDIR/iond}
IONCLI=${IONCLI:-$BINDIR/ion-cli}
IONTX=${IONTX:-$BINDIR/ion-tx}
IONQT=${IONQT:-$BINDIR/qt/ion-qt}

[ ! -x $BITCOIND ] && echo "$BITCOIND not found or not executable." && exit 1

# The autodetected version git tag can screw up manpage output a little bit
BTCVER=($($BITCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))
IONVER=($($IONCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))

# Create a footer file with copyright content.
# This gets autodetected fine for dashd if --version-string is not set,
Expand All @@ -22,8 +24,8 @@ $BITCOIND --version | sed -n '1!p' >> footer.h2m

for cmd in $BITCOIND $BITCOINCLI $BITCOINTX $BITCOINQT; do
cmdname="${cmd##*/}"
help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
sed -i "s/\\\-${BTCVER[1]}//g" ${MANDIR}/${cmdname}.1
help2man -N --version-string=${IONVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
sed -i "s/\\\-${IONVER[1]}//g" ${MANDIR}/${cmdname}.1
done

rm -f footer.h2m
12 changes: 0 additions & 12 deletions contrib/gitian-descriptors/gitian-win-signer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ remotes:
- "url": "https://github.com/cevap/ion-detached-sigs.git"
"dir": "signature"
files:
<<<<<<< HEAD
- "osslsigncode-1.7.1.tar.xz"
=======
- "v1.7.1.tar.gz"
>>>>>>> Change urls for osslsigncode v1.7.1 to use from sources from our repo, ref: #13
- "osslsigncode-Backports-to-1.7.1.patch"
- "ion-win-unsigned.tar.gz"
script: |
Expand All @@ -29,21 +25,13 @@ script: |
SIGDIR=${BUILD_DIR}/signature/win
UNSIGNED_DIR=${BUILD_DIR}/unsigned
<<<<<<< HEAD
echo "75cb7377106c423dd63843798b43fd4a7d697b3fb51a0202b1a808018283e5f3 osslsigncode-1.7.1.tar.xz" | sha256sum -c
=======
echo "f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 v1.7.1.tar.gz" | sha256sum -c
>>>>>>> Change urls for osslsigncode v1.7.1 to use from sources from our repo, ref: #13
echo "a8c4e9cafba922f89de0df1f2152e7be286aba73f78505169bc351a7938dd911 osslsigncode-Backports-to-1.7.1.patch" | sha256sum -c
mkdir -p ${UNSIGNED_DIR}
tar -C ${UNSIGNED_DIR} -xf ioncore-win-unsigned.tar.xz
<<<<<<< HEAD
tar xJf osslsigncode-1.7.1.tar.xz
=======
tar xf v1.7.1.tar.gz
>>>>>>> Change urls for osslsigncode v1.7.1 to use from sources from our repo, ref: #13
cd osslsigncode-1.7.1
patch -p1 < ${BUILD_DIR}/osslsigncode-Backports-to-1.7.1.patch
Expand Down
85 changes: 25 additions & 60 deletions doc/man/ion-cli.1
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
.TH ION-CLI "1" "June 2019" "ion-cli v5.0.99.0" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH ION-CLI "1" "April 2018" "ion-cli v3.0.4.0" "User Commands"
.SH NAME
ion-cli \- manual page for ion-cli v5.0.99.0
ion-cli \- manual page for ion-cli v3.0.4.0
.SH DESCRIPTION
Ion Core RPC client version v5.0.99.0
Ion Core RPC client version v3.0.4.0\-CEVAP
.SS "Usage:"
.TP
ion\-cli [options] <command> [params]
Send command to Ion Core
.IP
ion\-cli [options] \fB\-named\fR <command> [name=value] ... Send command to Ion Core (with named arguments)
ion\-cli [options] help List commands
ion\-cli [options] help <command> Get help for a command
.TP
ion\-cli [options] help
List commands
.TP
ion\-cli [options] help <command>
Get help for a command
.SH OPTIONS
.HP
\-?
Expand All @@ -26,41 +28,23 @@ Specify configuration file (default: ioncoin.conf)
.IP
Specify data directory
.HP
\fB\-getinfo\fR
.IP
Get general information from the remote server. Note that unlike
server\-side RPC calls, the results of \fB\-getinfo\fR is the result of
multiple non\-atomic requests. Some entries in the result may
represent results from different states (e.g. wallet balance may
be as of a different block from the chain state reported)
.PP
Chain selection options:
.HP
\fB\-testnet\fR
.IP
Use the test chain
.HP
\fB\-devnet=\fR<name>
.IP
Use devnet chain with provided name
Use the test network
.HP
\fB\-regtest\fR
.IP
Enter regression test mode, which uses a special chain in which blocks
can be solved instantly. This is intended for regression testing
tools and app development.
.HP
\fB\-named\fR
.IP
Pass named instead of positional arguments (default: false)
can be solved instantly. This is intended for regression testing tools
and app development.
.HP
\fB\-rpcconnect=\fR<ip>
.IP
Send commands to node running on <ip> (default: 127.0.0.1)
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 12705 or testnet: 27171)
Connect to JSON\-RPC on <port> (default: 51473 or testnet: 51475)
.HP
\fB\-rpcwait\fR
.IP
Expand All @@ -76,40 +60,21 @@ Password for JSON\-RPC connections
.HP
\fB\-rpcclienttimeout=\fR<n>
.IP
Timeout in seconds during HTTP requests, or 0 for no timeout. (default:
900)
.HP
\fB\-stdinrpcpass\fR
.TP
Read RPC password from standard input as a single line.
When combined
.IP
with \fB\-stdin\fR, the first line from standard input is used for the
RPC password.
.HP
\fB\-stdin\fR
.IP
Read extra arguments from standard input, one per line until EOF/Ctrl\-D
(recommended for sensitive information such as passphrases).
When combined with \fB\-stdinrpcpass\fR, the first line from standard
input is used for the RPC password.
.HP
\fB\-rpcwallet=\fR<walletname>
.IP
Send RPC for non\-default wallet on RPC server (needs to exactly match
corresponding \fB\-wallet\fR option passed to dashd)
Timeout during HTTP requests (default: 900)
.SH COPYRIGHT
Copyright (C) 2014-2020 The Dash Core developers
Copyright (C) 2009-2020 The Bitcoin Core developers
Copyright (C) 2009-2018 The Bitcoin Core Developers

Copyright (C) 2014-2018 The Dash Core Developers

Please contribute if you find Ion Core useful. Visit <https://ionomy.com> for
further information about the software.
The source code is available from <https://bitbucket.org/ioncoin/ion>.
Copyright (C) 2015-2018 The PIVX Core Developers

Copyright (C) 2018 The Ion Core Developers

This is experimental software.

Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>
or <http://www.opensource.org/licenses/mit-license.php>.

This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit <https://www.openssl.org> and cryptographic software written by
Eric Young and UPnP software written by Thomas Bernard.
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
by Eric Young and UPnP software written by Thomas Bernard.
Loading

0 comments on commit 3045823

Please sign in to comment.