Add a man page (RHBZ#1281250).
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 13 Nov 2015 10:43:30 +0000 (10:43 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 13 Nov 2015 10:54:56 +0000 (10:54 +0000)
.gitignore
Makefile.am
README
auto-br-rpmbuild.1 [new file with mode: 0644]
auto-br.1 [new file with mode: 0644]
autobuildrequires.pod [new file with mode: 0644]
configure.ac

index 89ce9ad..f80079f 100644 (file)
@@ -6,6 +6,7 @@
 Makefile
 Makefile.in
 aclocal.m4
+autobuildrequires.1
 auto-br
 auto-br.sh
 auto-br-analyze.pl
index c2df41e..c6f2fd2 100644 (file)
@@ -35,9 +35,23 @@ auto-br-rpmbuild: auto-br-rpmbuild.sh
        cp $< $@
        chmod +x $@
 
+man_MANS = autobuildrequires.1 auto-br.1 auto-br-rpmbuild.1
+
+autobuildrequires.1: autobuildrequires.pod
+       rm -f $@-t
+       pod2man --section 1 $< > $@-t
+       mv $@-t $@
+
 CLEANFILES = $(bin_SCRIPTS)
 
 libexec_SCRIPTS = auto-br-analyze.pl
 
-EXTRA_DIST = auto-br-analyze.pl.in auto-br.sh.in auto-br-rpmbuild.sh \
-       auto-buildrequires.spec auto-buildrequires.spec.in
+EXTRA_DIST = \
+       autobuildrequires.pod \
+       auto-br-analyze.pl.in \
+       auto-br.1 \
+       auto-br.sh.in \
+       auto-br-rpmbuild.sh \
+       auto-br-rpmbuild.1 \
+       auto-buildrequires.spec \
+       auto-buildrequires.spec.in
diff --git a/README b/README
index 4be546c..c492ed7 100644 (file)
--- a/README
+++ b/README
@@ -5,24 +5,4 @@ Written by Richard W.M. Jones, rjones@redhat.com,
 http://et.redhat.com/~rjones/
 http://et.redhat.com/~rjones/auto-buildrequires/
 
-Usage:
-
-  auto-br-rpmbuild -ba foo.spec
-
-If your build command is more complex, try:
-
-  auto-br [command ...]
-
-
-Developers
-----------------------------------------------------------------------
-
-The basic "magic" is a C LD_PRELOAD module, auto-buildrequires-preload.c,
-which intercepts some system calls to determine which files the build
-is looking at.  Those get logged to a simple text file.
-
-The Perl analysis script, auto-br-analyze.pl.in, runs afterwards on
-the logfile, and uses rpm to find out which packages those files
-belong to.  Those are printed out as the list of BuildRequires.
-
-A shell script, auto-br.sh.in, holds the whole thing together.
+For how to use it, see "autobuildrequires.pod" or autobuildrequires(1).
diff --git a/auto-br-rpmbuild.1 b/auto-br-rpmbuild.1
new file mode 100644 (file)
index 0000000..1db8095
--- /dev/null
@@ -0,0 +1 @@
+.so man1/autobuildrequires.1
diff --git a/auto-br.1 b/auto-br.1
new file mode 100644 (file)
index 0000000..1db8095
--- /dev/null
+++ b/auto-br.1
@@ -0,0 +1 @@
+.so man1/autobuildrequires.1
diff --git a/autobuildrequires.pod b/autobuildrequires.pod
new file mode 100644 (file)
index 0000000..a87d879
--- /dev/null
@@ -0,0 +1,62 @@
+=head1 NAME
+
+autobuildrequires - Work out the BuildRequires of an RPM build automatically
+
+=head1 SYNOPSIS
+
+  auto-br-rpmbuild -ba foo.spec
+
+  auto-br [build-command ...]
+
+=head1 DESCRIPTION
+
+Autobuildrequires analyzes an RPM package build to find out what
+BuildRequires lines it needs.
+
+Instead of using C<rpmbuild>, use this command:
+
+ auto-br-rpmbuild -ba foo.spec
+
+(all the usual rpmbuild flags are supported).  The command will build
+your package and then output a list of C<BuildRequires> lines that it
+thinks your package needs.
+
+If your build command is more complex and/or doesn't use rpmbuild,
+then use:
+
+ auto-br [build-command ...]
+
+For example:
+
+ auto-br make
+
+=head1 HOW IT WORKS
+
+The basic "magic" is a C C<LD_PRELOAD> module,
+F<auto-buildrequires-preload.c>, which intercepts some system calls to
+determine which files the build is looking at.  Those get logged to a
+simple text file.
+
+The Perl analysis script, F<auto-br-analyze.pl>, runs afterwards on
+the logfile, and uses rpm to find out which packages those files
+belong to.  Those are printed out as the list of BuildRequires.
+
+A shell script, F<auto-br>, brings the whole thing together.
+
+=head1 EXIT STATUS
+
+This program returns 0 if successful, or non-zero if there was an
+error.
+
+=head1 SEE ALSO
+
+L<rpmbuild(8)>,
+L<http://www.rpm.org/max-rpm/>
+
+=head1 AUTHORS
+
+Richard W.M. Jones L<http://people.redhat.com/~rjones/>
+
+=head1 COPYRIGHT
+
+Copyright (C) 2008-2015 Red Hat Inc.
index 09619cb..3525ea7 100644 (file)
@@ -26,7 +26,7 @@ AM_PROG_CC_C_O
 AC_CHECK_PROG([RPM],[rpm],[rpm])
 AC_CHECK_PROG([RPMBUILD],[rpmbuild],[rpmbuild])
 
-# XXX Should check for String::ShellQuote and File::Temp modules.
+# XXX Should check for String::ShellQuote and File::Temp modules, and pod2man.
 AC_PATH_PROG([PERL],[perl],[/usr/bin/perl])
 
 AC_CONFIG_HEADERS([config.h])