spec-create, templates: move part of package documemtation to the devel package or add a comment if the devel package is not provided by the template.

This commit is contained in:
Davide Madrisan 2011-12-16 22:00:51 +01:00
parent cc23a330ba
commit 1d2c39f52c
10 changed files with 47 additions and 9 deletions

View File

@ -29,6 +29,12 @@ Changes in version 1.8.1
Support source packages with a makefile but no configure script.
(Issue reported by Silvan Calarco)
+ update
* spec-create, templates/* - Davide Madrisan:
Move part of package documemtation to the devel package or add a comment
if the devel package is not provided by the template.
(Pointed out by Silvan Calarco)
--------------------------------------------------------------------------------
Changes in version 1.8.0

View File

@ -228,9 +228,9 @@ remember to modify the value for \`${NOTE}$id${NORM}'" ;;
function template.expand() {
local OPTIONS=`LANG=C getopt \
-o t:T:n:v:s:l:S:d:b: \
-o t:T:n:v:s:l:S:b: \
--long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\
source:,standard-docs:,build-technology:,\
source:,standard-docs:,standard-docs-devel:,build-technology:,\
i18n:,icons-mimetypes:,\
infopages:,manpages:,\
pck-apidocs:,pck-tools:,\
@ -247,6 +247,7 @@ shared-libraries:,\
local spec_summary="$spec_default_summary"
local spec_license="$spec_default_license"
local standard_docs
local standard_docs_devel
local build_technology
local i18n="0"
@ -275,8 +276,10 @@ shared-libraries:,\
spec_license="$2"; shift ;;
-S|--source)
spec_source="$2"; shift ;;
-d|--standard-docs)
--standard-docs)
standard_docs="$2"; shift ;;
--standard-docs-devel)
standard_docs_devel="$2"; shift ;;
-b|--build-technology)
build_technology="$2"; shift ;;
--i18n)
@ -378,6 +381,7 @@ s,^\([ \t]*Source[ \t]*:[ \t]*\).*,\1${spec_source},
s,@make@,$spec_cmd_make,
s,@makeinstall@,$spec_cmd_makeinstall,
s,@standard_docs@,${standard_docs:+%doc $standard_docs},
s,@standard_docs_devel@,${standard_docs_devel:+%doc $standard_docs_devel},
s,@spec_changelog_date@,$spec_changelog_date,
s,@spec_changelog_comment@,$spec_changelog_comment,
"
@ -658,21 +662,23 @@ looks like a python module (use \`-t python' if this is true)" ;;
# + some other documentation files commonly found in several packages
local standard_docs_list='
AUTHORS
BACKLOG
BUGS
CHANGES
COPYING
COPYING.DOC
COPYING.LESSER
COPYING.LIB
CREDITS
ChangeLog*
LICENCE
LICENSE
MANUAL
THANKS'
local standard_docs_devel_list='
BACKLOG
BUGS
CHANGES
ChangeLog*
NEWS
README*
THANKS
TODO
WHATSNEW
WHERE'
@ -684,9 +690,19 @@ looks like a python module (use \`-t python' if this is true)" ;;
for currdoc in $currdocs; do
# ignore empty documentation files
[ -s $tmpdir/$pck_rootdir/$currdoc ] &&
standard_docs="${standard_docs:+$standard_docs }$currdoc"
standard_docs="\
${standard_docs:+$standard_docs }$currdoc"
done
done
for doc in $standard_docs_devel_list; do
currdocs=$(cd $tmpdir/$pck_rootdir && ls $doc 2>/dev/null)
for currdoc in $currdocs; do
[ -s $tmpdir/$pck_rootdir/$currdoc ] &&
standard_docs_devel="\
${standard_docs_devel:+$standard_docs_devel }$currdoc"
done
done
# split the list of docs into multiple lines if necessary
#[ "$docs" ] && docs=`echo $docs | fmt -u -w 77 | sed 's,.*,%doc &,'`
@ -761,6 +777,7 @@ $spec_cmd_configure_autotools --enable-gtk-doc"
--license "$spec_license" \
--source "${spec_preamble_source:-$spec_preamble_tarball}" \
--standard-docs "$standard_docs" \
--standard-docs-devel "$standard_docs_devel" \
--build-technology "$build_techology" \
--i18n "$spec_i18n" \
--icons-mimetypes "1" \

View File

@ -56,6 +56,8 @@ Requires: gtk-doc
%files
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
@if:library_apidocs
%files apidocs

View File

@ -36,6 +36,8 @@ BuildRoot: @rpm_default_buildroot@
%files
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -107,6 +107,8 @@ exit 0
## note: "man3" pages normally goes to devel package if any
# %{_mandir}/man?/%{name}.*
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -115,6 +115,7 @@ exit 0
@if:infopages
# %{_infodir}/*.info.*
@fi:infopages
@standard_docs_devel@
@if:pck_tools
%files tools

View File

@ -52,6 +52,8 @@ done
%files -f .packlist
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -42,6 +42,8 @@ sed -i "\\,\\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist
%files -f %{name}.filelist
%defattr(-,root,root)
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
%changelog
* @spec_changelog_date@ @packager_fullname@ <@packager_email@> @pck_version@-@spec_first_release@@DISTRO_rpm@

View File

@ -82,6 +82,8 @@ exit 0
# %{_infodir}/*.info.*
@fi:infopages
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
@if:pck_apidocs
%files apidocs

View File

@ -106,6 +106,8 @@ exit 0
# %{_infodir}/*.info.*
@fi:infopages
@standard_docs@
## note: eventually add the remaining documents (if any)
# @standard_docs_devel@
@if:pck_apidocs
%files apidocs