spec-create, templates/library: support library packages with a name not starting by lib
This commit is contained in:
parent
7ee4298afd
commit
0f71f389e3
@ -43,6 +43,11 @@ Changes in version 1.8.1
|
|||||||
Devel package does not exist: move code for infopages installation/removal
|
Devel package does not exist: move code for infopages installation/removal
|
||||||
to the main package scriplets.
|
to the main package scriplets.
|
||||||
|
|
||||||
|
+ update
|
||||||
|
* spec-create, templates/library - Davide Madrisan:
|
||||||
|
Support library packages with a name not starting by 'lib'.
|
||||||
|
(Feature asked by Silvan Calarco)
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.8.0
|
Changes in version 1.8.0
|
||||||
|
3
NEWS
3
NEWS
@ -16,7 +16,8 @@ List of user visible changes in the release 1.8.1 - Christmas Release
|
|||||||
Improve searching in sourceforge sites.
|
Improve searching in sourceforge sites.
|
||||||
|
|
||||||
* spec-create, templates - Davide Madrisan:
|
* spec-create, templates - Davide Madrisan:
|
||||||
Several improvements and fixes.
|
Several improvements and fixes, notably for library packages with a name
|
||||||
|
not starting by 'lib'.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ function template.expand() {
|
|||||||
source:,standard-docs:,standard-docs-devel:,build-technology:,\
|
source:,standard-docs:,standard-docs-devel:,build-technology:,\
|
||||||
i18n:,icons-mimetypes:,\
|
i18n:,icons-mimetypes:,\
|
||||||
infopages:,manpages:,\
|
infopages:,manpages:,\
|
||||||
pck-apidocs:,pck-tools:,\
|
pck-devel:,pck-library:,pck-apidocs:,pck-tools:,\
|
||||||
shared-libraries:,\
|
shared-libraries:,\
|
||||||
-n "${0}" -- "$@"`
|
-n "${0}" -- "$@"`
|
||||||
[ $? = 0 ] || exit 1
|
[ $? = 0 ] || exit 1
|
||||||
@ -243,6 +243,9 @@ shared-libraries:,\
|
|||||||
|
|
||||||
local templatefile spec_type
|
local templatefile spec_type
|
||||||
local pck_name pck_version
|
local pck_name pck_version
|
||||||
|
local pck_name_devel
|
||||||
|
local pck_name_tools
|
||||||
|
local pck_name_apidocs
|
||||||
local spec_setup_macro
|
local spec_setup_macro
|
||||||
local spec_summary="$spec_default_summary"
|
local spec_summary="$spec_default_summary"
|
||||||
local spec_license="$spec_default_license"
|
local spec_license="$spec_default_license"
|
||||||
@ -254,6 +257,8 @@ shared-libraries:,\
|
|||||||
local icons_mimetypes="0"
|
local icons_mimetypes="0"
|
||||||
local infopages="0"
|
local infopages="0"
|
||||||
local manpages="0"
|
local manpages="0"
|
||||||
|
local pck_devel="0"
|
||||||
|
local pck_library="0"
|
||||||
local pck_apidocs="0"
|
local pck_apidocs="0"
|
||||||
local pck_tools="0"
|
local pck_tools="0"
|
||||||
local shared_libraries="0"
|
local shared_libraries="0"
|
||||||
@ -290,6 +295,10 @@ shared-libraries:,\
|
|||||||
infopages="$2"; shift ;;
|
infopages="$2"; shift ;;
|
||||||
--manpages)
|
--manpages)
|
||||||
manpages="$2"; shift ;;
|
manpages="$2"; shift ;;
|
||||||
|
--pck-devel)
|
||||||
|
pck_devel="$2"; shift ;;
|
||||||
|
--pck-library)
|
||||||
|
pck_library="$2"; shift ;;
|
||||||
--pck-apidocs)
|
--pck-apidocs)
|
||||||
pck_apidocs="$2"; shift ;;
|
pck_apidocs="$2"; shift ;;
|
||||||
--pck-tools)
|
--pck-tools)
|
||||||
@ -374,7 +383,7 @@ $FUNCNAME: @fi:$currvar lev:$if_level val:${if_value[$if_level]})"
|
|||||||
@configure@)
|
@configure@)
|
||||||
[ "$spec_cmd_configure" ] && echo "$line" | \
|
[ "$spec_cmd_configure" ] && echo "$line" | \
|
||||||
sed "s,@configure@,$spec_cmd_configure,"
|
sed "s,@configure@,$spec_cmd_configure,"
|
||||||
;;
|
;;
|
||||||
*) [ "${if_value[1]}" = '1' -a ${if_value[2]} = '1' ] &&
|
*) [ "${if_value[1]}" = '1' -a ${if_value[2]} = '1' ] &&
|
||||||
echo "$line" | sed "\
|
echo "$line" | sed "\
|
||||||
s,@DISTRO@,${DISTRO:-?DISTRO?},
|
s,@DISTRO@,${DISTRO:-?DISTRO?},
|
||||||
@ -777,6 +786,13 @@ grep -e "enable-gtk-doc")" ] && {
|
|||||||
$spec_cmd_configure_autotools --enable-gtk-doc"
|
$spec_cmd_configure_autotools --enable-gtk-doc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 11. check for library packages
|
||||||
|
local pck_library="0"
|
||||||
|
local pck_tools="1"
|
||||||
|
case "$spec_type" in library)
|
||||||
|
[[ "$pck_name" =~ ^lib* ]] ||
|
||||||
|
{ pck_library="1"; pck_tools="0"; }
|
||||||
|
esac
|
||||||
|
|
||||||
# FIXME: missing support for:
|
# FIXME: missing support for:
|
||||||
# pkgconfig files
|
# pkgconfig files
|
||||||
@ -799,7 +815,9 @@ $spec_cmd_configure_autotools --enable-gtk-doc"
|
|||||||
--infopages "$spec_infopages" \
|
--infopages "$spec_infopages" \
|
||||||
--manpages "$spec_manpages" \
|
--manpages "$spec_manpages" \
|
||||||
--pck-apidocs "$spec_gtk_doc" \
|
--pck-apidocs "$spec_gtk_doc" \
|
||||||
--pck-tools "1" \
|
--pck-devel "1" \
|
||||||
|
--pck-library "$pck_library" \
|
||||||
|
--pck-tools "$pck_tools" \
|
||||||
--shared-libraries "1"
|
--shared-libraries "1"
|
||||||
|
|
||||||
[ "$outfile" ] && specfile.ckeck_defvalues "$outfile"
|
[ "$outfile" ] && specfile.ckeck_defvalues "$outfile"
|
||||||
|
@ -2,7 +2,11 @@ Name: @pck_name@
|
|||||||
Version: @pck_version@
|
Version: @pck_version@
|
||||||
Release: @spec_first_release@@DISTRO_rpm@
|
Release: @spec_first_release@@DISTRO_rpm@
|
||||||
Summary: ...
|
Summary: ...
|
||||||
|
@if:pck_library
|
||||||
|
Group: ...
|
||||||
|
@else:pck_library
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
|
@fi:pck_library
|
||||||
Vendor: @VENDOR@
|
Vendor: @VENDOR@
|
||||||
Distribution: @DISTRO@
|
Distribution: @DISTRO@
|
||||||
Packager: @packager_fullname@ <@packager_email@>
|
Packager: @packager_fullname@ <@packager_email@>
|
||||||
@ -21,14 +25,37 @@ BuildRoot: @rpm_default_buildroot@
|
|||||||
%description
|
%description
|
||||||
...
|
...
|
||||||
|
|
||||||
%package devel
|
@if:pck_library
|
||||||
Group: Development/Libraries
|
%package -n lib%{name}
|
||||||
Summary: Static libraries and headers for %{name}
|
Group: System/Libraries
|
||||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
Summary: Shared libraries for %{name}
|
||||||
|
|
||||||
|
%description -n lib%{name}
|
||||||
|
This package contains shared libraries for %{name}.
|
||||||
|
@fi:pck_library
|
||||||
|
|
||||||
|
@if:pck_devel
|
||||||
|
@if:pck_library
|
||||||
|
%package -n lib%{name}-devel
|
||||||
|
@else:pck_library
|
||||||
|
%package devel
|
||||||
|
@fi:pck_library
|
||||||
|
Group: Development/Libraries
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
@if:pck_library
|
||||||
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
@else:pck_library
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
@fi:pck_library
|
||||||
|
|
||||||
|
@if:pck_library
|
||||||
|
%description -n lib%{name}-devel
|
||||||
|
@else:pck_library
|
||||||
%description devel
|
%description devel
|
||||||
|
@fi:pck_library
|
||||||
...
|
...
|
||||||
This package contains static libraries and header files need for development.
|
This package contains libraries and header files for developing applications that use %{name}.
|
||||||
|
@fi:pck_devel
|
||||||
|
|
||||||
@if:pck_tools
|
@if:pck_tools
|
||||||
%package tools
|
%package tools
|
||||||
@ -37,7 +64,7 @@ Summary: Utility applications for %{name}
|
|||||||
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
The %{name}-tools package contains utility applications for %{name}.
|
This package contains utility applications for %{name}.
|
||||||
@fi:pck_tools
|
@fi:pck_tools
|
||||||
|
|
||||||
@if:pck_apidocs
|
@if:pck_apidocs
|
||||||
@ -74,16 +101,29 @@ This package includes the %{name} API documentation.
|
|||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
@if:pck_library
|
||||||
|
%post -n lib%{name} -p /sbin/ldconfig
|
||||||
|
%postun -n lib%{name} -p /sbin/ldconfig
|
||||||
|
@else:pck_library
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
@fi:pck_library
|
||||||
|
|
||||||
@if:infopages
|
@if:infopages
|
||||||
|
@if:pck_library
|
||||||
|
%post -n lib%{name}-devel
|
||||||
|
@else:pck_library
|
||||||
%post devel
|
%post devel
|
||||||
|
@fi:pck_library
|
||||||
## modify the infopage name as required
|
## modify the infopage name as required
|
||||||
%install_info %{name}.info
|
%install_info %{name}.info
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
@if:pck_library
|
||||||
|
%preun -n lib%{name}-devel
|
||||||
|
@else:pck_library
|
||||||
%preun devel
|
%preun devel
|
||||||
|
@fi:pck_library
|
||||||
## modify the infopage name as required
|
## modify the infopage name as required
|
||||||
%uninstall_info %{name}.info
|
%uninstall_info %{name}.info
|
||||||
exit 0
|
exit 0
|
||||||
@ -96,11 +136,26 @@ exit 0
|
|||||||
@fi:i18n
|
@fi:i18n
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
## note: this list is just an example; modify as required
|
## note: this list is just an example; modify as required
|
||||||
|
@if:pck_library
|
||||||
|
@else:pck_library
|
||||||
# %{_libdir}/*.so.*
|
# %{_libdir}/*.so.*
|
||||||
|
@fi:pck_library
|
||||||
# %{_mandir}/man1/*
|
# %{_mandir}/man1/*
|
||||||
@standard_docs@
|
@standard_docs@
|
||||||
|
|
||||||
|
@if:pck_library
|
||||||
|
%files -n lib%{name}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
## note: this list is just an example; modify as required
|
||||||
|
# %{_libdir}/*.so.*
|
||||||
|
@fi:pck_library
|
||||||
|
|
||||||
|
@if:pck_devel
|
||||||
|
@if:pck_library
|
||||||
|
%files -n lib%{name}-devel
|
||||||
|
@else:pck_library
|
||||||
%files devel
|
%files devel
|
||||||
|
@fi:pck_library
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
## note: this list is just an example; modify as required
|
## note: this list is just an example; modify as required
|
||||||
# %{_bindir}/%{name}-config
|
# %{_bindir}/%{name}-config
|
||||||
@ -116,6 +171,7 @@ exit 0
|
|||||||
# %{_infodir}/*.info.*
|
# %{_infodir}/*.info.*
|
||||||
@fi:infopages
|
@fi:infopages
|
||||||
@standard_docs_devel@
|
@standard_docs_devel@
|
||||||
|
@fi:pck_devel
|
||||||
|
|
||||||
@if:pck_tools
|
@if:pck_tools
|
||||||
%files tools
|
%files tools
|
||||||
|
Loading…
Reference in New Issue
Block a user