Skip to content

Commit

Permalink
Perl Tidy the final executable, add additional standard doc files, cl…
Browse files Browse the repository at this point in the history
…ean-up %doc dirs.
  • Loading branch information
bdperkin committed Mar 22, 2013
1 parent 347de53 commit c82ea1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ nytprof.out
pm_to_blib
*~
*.pl.tdy
*.pl.bak
*.pyc
scratch/
7 changes: 4 additions & 3 deletions inspectorates.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ BuildRequires: docbook-style-xsl
BuildRequires: /usr/bin/groff
BuildRequires: libxslt
BuildRequires: pandoc
BuildRequires: /usr/bin/perltidy
BuildRequires: /usr/bin/podchecker
BuildRequires: w3m
Requires: /usr/bin/perl
Expand All @@ -36,7 +37,7 @@ Requires: perl(warnings)
%define NameMixed %{expand:%%(echo %{name} | %{__sed} -e "s/\\([a-z]\\)\\([a-zA-Z0-9]*\\)/\\u\\1\\2/g")}
%define NameLower %{expand:%%(echo %{name} | tr [:upper:] [:lower:])}
%define Year %{expand:%%(date "+%Y")}
%define DocFiles AUTHORS BUGS COPYING DESCRIPTION LICENSE NAME NOTES OPTIONS OUTPUT README.md RESOURCES SYNOPSIS
%define DocFiles ACKNOWLEDGEMENTS AUTHOR AUTHORS AVAILABILITY BUGS CAVEATS COPYING COPYRIGHT DESCRIPTION LICENSE NAME NOTES OPTIONS OUTPUT README.md RESOURCES SYNOPSIS
%define SubFiles %{name} %{name}.8.asciidoc %{DocFiles} man.asciidoc
%define DocFormats chunked htmlhelp manpage text xhtml

Expand Down Expand Up @@ -64,6 +65,7 @@ groff -e -mandoc -Tascii manpage/%{name}.8 > manpage/%{name}.8.groff
./groff2pod.pl manpage/%{name}.8.groff pod/%{name}.8.pod
podchecker pod/%{name}.8.pod
cat pod/%{name}.8.pod >> %{name}
perltidy -b %{name}
podchecker %{name}
pandoc -f html -t markdown -s -o README.md.pandoc xhtml/%{name}.8.html
cat README.md.pandoc | %{__grep} -v ^% | %{__sed} -e 's/\*\*/\*/g' | %{__sed} -e 's/^\ \*/\n\ \*/g' | %{__sed} -e 's/\[\*/\[\ \*/g' | %{__sed} -e 's/\*\]/\*\ \]/g' | %{__sed} -e 's/{\*/{\ \*/g' | %{__sed} -e 's/\*}/\*\ }/g' | %{__sed} -e 's/|\*/|\ \*/g' | %{__sed} -e 's/\*|/\*\ |/g' | %{__sed} -e 's/=\*/=\ \*/g' | %{__sed} -e 's/\*=/\*\ =/g' > README.md
Expand All @@ -79,8 +81,7 @@ cat README.md.pandoc | %{__grep} -v ^% | %{__sed} -e 's/\*\*/\*/g' | %{__sed} -e
%defattr(-,root,root,-)
%{_bindir}/%{name}
%doc %{DocFiles}
%doc %{DocFormats}
%doc pod
%doc %{DocFormats} pod
%doc %{_mandir}/man8/%{name}.8.gz


Expand Down

0 comments on commit c82ea1b

Please sign in to comment.