Skip to content

Commit

Permalink
Add a basic manpage
Browse files Browse the repository at this point in the history
Commonly required for packaging.

Closes: #19
Approved by: cgwalters
  • Loading branch information
cgwalters authored and cgwalters-bot committed Apr 12, 2016
1 parent 7e38801 commit 2fdbf51
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ typelibdir = $(pkglibdir)/girepository-1.0
typelib_DATA = $(gir_DATA:.gir=.typelib)

include src/Makefile-git-evtag.am
include man/Makefile-man.am
include rust/Makefile-inc.am
include tests/Makefile-tests.am

Expand Down
18 changes: 18 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ LIBS=$BUILDDEP_LIBGIT_GLIB_LIBS
AC_CHECK_FUNCS(git_libgit2_init)
LIBS=$save_LIBS

AC_ARG_ENABLE(man,
[AS_HELP_STRING([--enable-man],
[generate man pages [default=auto]])],,
enable_man=maybe)

AS_IF([test "$enable_man" != no], [
AC_PATH_PROG([XSLTPROC], [xsltproc])
AS_IF([test -z "$XSLTPROC"], [
AS_IF([test "$enable_man" = yes], [
AC_MSG_ERROR([xsltproc is required for --enable-man])
])
enable_man=no
])
enable_man=yes
])
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)

AC_ARG_ENABLE(rust,
[AS_HELP_STRING([--enable-rust],
[Compile Rust version [default=no]])],,
Expand Down Expand Up @@ -66,6 +83,7 @@ AC_OUTPUT
echo "
$PACKAGE $VERSION

man pages (xsltproc): $enable_man
installed tests: $enable_installed_tests
Rust implementation: $enable_rust
"
47 changes: 47 additions & 0 deletions man/Makefile-man.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Makefile for man/
#
# Copyright (C) 2016 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

if ENABLE_MAN

man1_files = git-evtag.1

man1_MANS = $(addprefix man/,$(man1_files))

EXTRA_DIST += $(man1_MANS) $(man5_MANS)

XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl

XSLTPROC_FLAGS = \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0

XSLTPROC_MAN = $(XSLTPROC) $(XSLTPROC_FLAGS)

%.1: %.xml
$(AM_V_GEN) $(XSLTPROC_MAN) --output $@ $(XSLT_STYLESHEET) $<

CLEANFILES += \
$(man1_MANS) \
$(NULL)

endif
77 changes: 77 additions & 0 deletions man/git-evtag.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<!--
Copyright 2016 Colin Walters <walters@verbum.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->

<refentry id="git-evtag">

<refentryinfo>
<title>git-evtag</title>
<productname>git-evtag</productname>

<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Colin</firstname>
<surname>Walters</surname>
<email>walters@verbum.org</email>
</author>
</authorgroup>
</refentryinfo>

<refmeta>
<refentrytitle>git-evtag</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>git-evtag</refname>
<refpurpose>Sign a git commit with extended checksums</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>git evtag sign</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">TAGNAME</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>git evtag verify</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">TAGNAME</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
<title>Description</title>

<para>
While git can use GPG to sign tags and commits, it only
covers a commit object, which is subject to SHA1 weaknesses.
This tool uses SHA512 across the entire content of a tag,
creating a stronger level of assurance.
</para>
</refsect1>

<refsect1>
<title>Options</title>

<para>
See the subcommand help, e.g. <command>git-evtag sign --help</command>.
</para>
</refsect1>
</refentry>

0 comments on commit 2fdbf51

Please sign in to comment.