From: David B. <ad...@us...> - 2006-09-14 19:30:08
|
Update of /cvsroot/octave/octave-forge/admin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20385/admin Modified Files: make_rpm rpm_template.in Log Message: working automatic RPM. Still lacking treatment of external dependencies Index: rpm_template.in =================================================================== RCS file: /cvsroot/octave/octave-forge/admin/rpm_template.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- rpm_template.in 14 Sep 2006 08:07:37 -0000 1.1 +++ rpm_template.in 14 Sep 2006 19:30:04 -0000 1.2 @@ -17,12 +17,13 @@ >>REQUIRES<< BuildRequires: gcc-c++ tetex gcc-gfortran libstdc++-devel BuildRequires: libstdc++-devel +BuildRequires: %(rpm -q --qf '%%{name}' %(rpm -q -f `which mkoctfile`)) >>BUILDREQUIRES<< ## FIXME Need to correctly define the %octave macro to treat multiple ## installed versions of octave. %define builtpackage @NAME@-@VERSION@.tar.gz -%define octave octave +%define octave octave-%{octave_ver} %description @DESCRIPTION@ @@ -34,7 +35,7 @@ cp %{_sourcedir}/@PACKAGE@ . chmod a+r @PACKAGE@ mkdir -p install/@NAME@ -mkdir install/inst +mkdir install/@NAME@/inst %build cd @NAME@-@VERSION@ @@ -49,7 +50,7 @@ if [ -e @NAME@-@VERSION@/PKG_ADD ]; then mv @NAME@-@VERSION@/PKG_ADD @NAME@; fi if [ -e @NAME@-@VERSION@/PKG_DEL ]; then mv @NAME@-@VERSION@/PKG_DEL @NAME@; fi mv @NAME@-@VERSION@/* @NAME@/inst -rm -fr @PACKAGE@ +rm -fr @PACKAGE@ tar czf ../%{builtpackage} @NAME@ %install @@ -59,7 +60,7 @@ cp %{builtpackage} %{buildroot}%{_datadir} %post -%{octave} -H -q --no-site-file --eval "pkg('install','%{builtpackage}')" +%{octave} -H -q --no-site-file --eval "warning('off','all');pkg('install','%{_datadir}/%{builtpackage}')" rm %{_datadir}/%{builtpackage} %postun Index: make_rpm =================================================================== RCS file: /cvsroot/octave/octave-forge/admin/make_rpm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- make_rpm 14 Sep 2006 08:07:37 -0000 1.2 +++ make_rpm 14 Sep 2006 19:30:04 -0000 1.3 @@ -31,7 +31,7 @@ system(sprintf("cp %s %s/SOURCES", $pkg, $rpmdir)); my %desc = parse_description ($rpmdesc, $pkg); -my $spec = sprintf("%s/SPECS/%s.spec", $rpmdir, $desc{"NAME"}); +my $spec = sprintf("%s/SPECS/octave_%s.spec", $rpmdir, $desc{"NAME"}); system ("rm -rf $tmpdir"); create_spec ($spec, $template, %desc); @@ -103,11 +103,6 @@ if ( /^>>BUILDREQUIRES<<$/ ) { # Write the additional build dependencies my $depstr = ""; - if ( system ("rpm -q octave-devel > /dev/null 2>&1") == 0) { - $depstr = "BuildRequires: octave-devel\n"; - } else { - $depstr = "BuildRequires: octave\n"; - } if (defined $desc{"SYSTEMREQUIREMENTS"}) { my @deps = cleanup_depends ($desc{"SYSTEMREQUIREMENTS"}); |