From: Richard W.M. Jones Date: Fri, 13 Nov 2015 10:43:30 +0000 (+0000) Subject: Add a man page (RHBZ#1281250). X-Git-Tag: v1.2~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=1995154649a9897f7deea915e5a822197907552a;p=autobuildrequires.git Add a man page (RHBZ#1281250). --- diff --git a/.gitignore b/.gitignore index 89ce9ad..f80079f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ Makefile Makefile.in aclocal.m4 +autobuildrequires.1 auto-br auto-br.sh auto-br-analyze.pl diff --git a/Makefile.am b/Makefile.am index c2df41e..c6f2fd2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 --- 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 index 0000000..1db8095 --- /dev/null +++ b/auto-br-rpmbuild.1 @@ -0,0 +1 @@ +.so man1/autobuildrequires.1 diff --git a/auto-br.1 b/auto-br.1 new file mode 100644 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 index 0000000..a87d879 --- /dev/null +++ b/autobuildrequires.pod @@ -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, 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 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 module, +F, 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, 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, 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, +L + +=head1 AUTHORS + +Richard W.M. Jones L + +=head1 COPYRIGHT + +Copyright (C) 2008-2015 Red Hat Inc. diff --git a/configure.ac b/configure.ac index 09619cb..3525ea7 100644 --- a/configure.ac +++ b/configure.ac @@ -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])