Add rpm macros
Rebuild should pick up fixed suitesparse
This commit is contained in:
parent
582974b374
commit
cf6b5f2a23
28
macros.octave
Normal file
28
macros.octave
Normal file
@ -0,0 +1,28 @@
|
||||
%octave_api %(octave-config -p API_VERSION || echo 0)}
|
||||
%_octshareprefix %{buildroot}%{_datadir}/octave
|
||||
%_octprefix %{_octshareprefix}/packages
|
||||
%_octarchprefix %{buildroot}%{_libexecdir}/octave/packages
|
||||
%octave_cmd() octave -H -q --no-site-file --eval "%*";
|
||||
%octave_pkg_build %octave_cmd pkg build '-verbose' %{_tmppath}/%{name}-%{version}-%{release}.%{_arch} %SOURCE0
|
||||
%octave_pkg_install \
|
||||
mkdir -p %{_octprefix} \
|
||||
mkdir -p %{_octarchprefix} \
|
||||
%octave_cmd warning('off','all');pkg('prefix','%{_octprefix}','%{_octarchprefix}');pkg('global_list',fullfile('%{_octshareprefix}','octave_packages'));pkg('local_list',fullfile('%{_octshareprefix}','octave_packages'));pkg('install','-nodeps','-verbose','%{_tmppath}/%{name}-%{version}-%{release}.%{_arch}/%{octpkg}-%{version}.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 \
|
||||
fi \
|
||||
echo "function on_uninstall (desc)" > %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
||||
echo " error ('Can not uninstall %s installed by the redhat package manager', desc.name);" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
||||
echo "endfunction" >> %{buildroot}%{octpkgdir}/packinfo/on_uninstall.m \
|
||||
%{nil}
|
||||
%_octave_pkg_preun \
|
||||
rm %{octpkgdir}/packinfo/on_uninstall.m \
|
||||
if [ -e %{octpkgdir}/packinfo/on_uninstall.m.orig ]; then \
|
||||
mv %{octpkgdir}/packinfo/on_uninstall.m.orig %{octpkgdir}/packinfo/on_uninstall.m \
|
||||
cd %{octpkgdir}/packinfo \
|
||||
%octave_cmd l=pkg('list');on_uninstall(l{cellfun(@(x)strcmp(x.name,'%{octpkg}'),l)}); \
|
||||
fi \
|
||||
%{nil}
|
||||
%octpkgdir %{_datadir}/octave/packages/%{octpkg}-%{version}
|
||||
%octpkglibdir %{_libexecdir}/octave/packages/%{octpkg}-%{version}
|
14
octave.spec
14
octave.spec
@ -3,12 +3,13 @@
|
||||
|
||||
Name: octave
|
||||
Version: 3.4.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: A high-level language for numerical computations
|
||||
Epoch: 6
|
||||
Group: Applications/Engineering
|
||||
License: GPLv3+
|
||||
Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2
|
||||
Source1: macros.octave
|
||||
# Add missing cstddef for gcc 4.6
|
||||
Patch0: octave-3.4.0-gcc46.patch
|
||||
URL: http://www.octave.org
|
||||
@ -123,6 +124,10 @@ touch %{buildroot}%{_datadir}/%{name}/octave_packages
|
||||
install -d %{buildroot}%{_sysconfdir}/prelink.conf.d
|
||||
echo "-b %{_bindir}/octave-%{version}" > %{buildroot}%{_sysconfdir}/prelink.conf.d/octave.conf
|
||||
|
||||
# rpm macros
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
cp -p %SOURCE1 %{buildroot}%{_sysconfdir}/rpm/
|
||||
|
||||
|
||||
# TODO - Fix this:
|
||||
# src/DLD-FUNCTIONS/md5sum.cc ............................*** stack smashing detected ***: /builddir/build/BUILD/octave-3.3.54/src/.libs/lt-octave terminated
|
||||
@ -150,7 +155,8 @@ fi
|
||||
%doc AUTHORS BUGS ChangeLog* COPYING NEWS* PROJECTS README README.Linux
|
||||
%doc README.kpathsea
|
||||
# FIXME: Create an -emacs package that has the emacs addon
|
||||
%config %{_sysconfdir}/ld.so.conf.d/octave-*.conf
|
||||
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/octave-*.conf
|
||||
%config(noreplace) %{_sysconfdir}/rpm/macros.octave
|
||||
%{_bindir}/octave*
|
||||
%{_libdir}/octave-%{version}/
|
||||
%{_libexecdir}/octave/
|
||||
@ -183,6 +189,10 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Feb 14 2011 Orion Poplawski <orion[AT]cora.nwra com> - 6:3.4.0-3
|
||||
- Add rpm macros
|
||||
- Rebuild should pick up fixed suitesparse
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6:3.4.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user