Handle noarch package tarball names

This commit is contained in:
Orion Poplawski 2016-12-09 14:40:15 -07:00
parent a9fb7eb79e
commit 5c42e75d55
2 changed files with 12 additions and 3 deletions

View File

@ -33,6 +33,12 @@
print(rpm.expand("octave -H -q --no-window-system --no-site-file --eval 'pkg build -verbose -nodeps %{_builddir}/%{buildsubdir}/build "..octpkg_tarfile).."'\\n")
-- Extract the source tarball for debuginfo generation
print(rpm.expand("tar xf "..octpkg_tarfile.." -C %{_builddir}/%{buildsubdir}/build\\n"))
-- Define %octave_tar_suffix for later use by install/check macros
if (rpm.expand("%{?buildarch}") ~= "noarch") then
rpm.define("octave_tar_suffix %{octave_host}-%{octave_api}")
else
rpm.define("octave_tar_suffix any-none")
end
}
# Install a package. We use the octave pkg install command to install the
@ -43,7 +49,7 @@
%octave_pkg_install \
mkdir -p %{buildroot}%{octprefix} \
mkdir -p %{buildroot}%{octarchprefix} \
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose","%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-%{octave_host}-%{octave_api}.tar.gz");unlink(pkg("local_list"));unlink(pkg("global_list")); \
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose","%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-%{octave_tar_suffix}.tar.gz");unlink(pkg("local_list"));unlink(pkg("global_list")); \
if [ -e %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m ] \
then \
mv %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m.orig \
@ -56,7 +62,7 @@ echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
# Run pkg tests - We need to reinstall to recreate 'octave_packages' so that
# octave can find the package, then remove 'octave_packages' again.
%octave_pkg_check \
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose","%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-%{octave_host}-%{octave_api}.tar.gz");pkg("load","%{octpkg}");runtests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list"));unlink(pkg("global_list")); \
%octave_cmd pkg("prefix","%{buildroot}%{octprefix}","%{buildroot}%{octarchprefix}");pkg("global_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("local_list",fullfile("%{buildroot}%{octshareprefix}","octave_packages"));pkg("install","-nodeps","-verbose","%{_builddir}/%{buildsubdir}/build/%{octpkg}-%{version}-%{octave_tar_suffix}.tar.gz");pkg("load","%{octpkg}");runtests("%{buildroot}%{octpkgdir}");unlink(pkg("local_list"));unlink(pkg("global_list")); \
%{nil}
# preun script - we need to remove our uninstall protection and perhaps

View File

@ -14,7 +14,7 @@
Name: octave
Epoch: 6
Version: 4.2.0
Release: 10%{?rcver:.rc%{rcver}}%{?dist}
Release: 11%{?rcver:.rc%{rcver}}%{?dist}
Summary: A high-level language for numerical computations
Group: Applications/Engineering
License: GPLv3+
@ -431,6 +431,9 @@ fi
%{_pkgdocdir}/refcard*.pdf
%changelog
* Fri Dec 09 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-11
- Handle noarch package tarball names
* Fri Dec 09 2016 Orion Poplawski <orion@cora.nwra.com> - 6:4.2.0-10
- Patch gzip from upstream bug report