#18 adding manpage support
Closed 3 years ago by carlwgeorge. Opened 3 years ago by lrossett.
centos/ lrossett/centpkg manpage  into  develop

file modified
+10 -2
@@ -10,7 +10,7 @@ 

  

  Name:           centpkg

  Version:        0.5.1

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        CentOS utility for working with dist-git

  License:        GPLv2+

  URL:            https://git.centos.org/centos/centpkg
@@ -28,9 +28,9 @@ 

  %else

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

+ BuildRequires:  python3-gitdb

  %endif

  

- 

  %description

  Provides the centpkg command for working with dist-git.

  
@@ -50,10 +50,15 @@ 

  

  %build

  %py_build

+ %{__python} doc/centpkg_man_page.py > centpkg.1

  

  

  %install

  %py_install

+ %if %{undefined el7}

+ %{__install} -d %{buildroot}%{_mandir}/man1

+ %{__install} -p -m 0644 centpkg.1 %{buildroot}%{_mandir}/man1

+ %endif

  install -D -p -m 0644 src/centpkg.conf     %{buildroot}%{_sysconfdir}/rpkg/centpkg.conf

  install -D -p -m 0644 src/centpkg-sig.conf %{buildroot}%{_sysconfdir}/rpkg/centpkg-sig.conf

  
@@ -73,6 +78,9 @@ 

  

  

  %changelog

+ * Thur Apr 08 2021 Leonardo Rossetti <lrossett@redhat.com> - 0.5.1-3

+ - Add manpage support

+ 

  * Thu Mar 25 2021 Carl George <carl@george.computer> - 0.5.1-2

  - Add missing el7 requirements

  

@@ -0,0 +1,28 @@ 

+ # Print a man page from the help texts.

+ import os

+ import sys

+ 

+ from six.moves.configparser import ConfigParser

+ 

+ if __name__ == '__main__':

+   module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

+   sys.path.insert(0, module_path)

+ 

+   config = ConfigParser()

+   config.read(

+       os.path.join(module_path, 'src', 'centpkg.conf'))

+ 

+   import pyrpkg.man_gen

+   try:

+     import centpkg

+     from centpkg import cli as centpkg_cli

+   except ImportError:

+     sys.path.append('src/')

+     import centpkg

+     from centpkg import cli as centpkg_cli

+   

+   client = centpkg_cli.centpkgClient(config=config, name='centpkg')

+   pyrpkg.man_gen.generate(client.parser,

+     client.subparsers,

+     identity='centpkg',

+     sourceurl='https://git.centos.org/centos/centpkg') 

\ No newline at end of file

Adding manpage support.

rebased onto 64a69657ecff37275ca85c8c957c17783b6623c1

3 years ago

rebased onto bf3d8e2bbdd44a3b30030f1fd3dd41b44c26af30

3 years ago

rebased onto 65468b4

3 years ago

Pull-Request has been closed by carlwgeorge

3 years ago
Metadata