Changeset 17


Ignore:
Timestamp:
11/11/05 16:18:44 (18 years ago)
Author:
kdeugau
Message:

/trunk

Tweak %configure/%make+%makeinstall "FHSification".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r16 r17  
    647647  my $prefix = '';
    648648
    649 # %configure, %make, and %makeinstall all share quite a pile.
    650 # I call it the FHS block, so it gets pushed forward as %{fhs}.
     649# %configure, %make, and %makeinstall all share quite a pile - almost.  GRR.
     650# I call it the FHS block, so it gets pushed forward as %{fhs}.  Note that
     651# %configure doesn't use this because of the -- bits.
    651652  if ($section =~ /c/) {
    652653    # %configure macro
    653     $macrostring =~ s'%configure'./configure %{fhs}';
    654   } # done %configure
    655 
    656   if ($section =~ /m/) {
    657     $macrostring =~ s'%make'make %{fhs}';
    658     $macrostring =~ s'%{__make}'make ';
    659   } # done %make
    660 
    661   if ($section =~ /i/) {
    662     # This is where we need to mangle $prefix.
    663     $macrostring =~ s'%makeinstall'make %{fhs}
    664         install';
    665     $prefix = $buildroot;
    666   } # done %install and/or %makeinstall
    667 
    668   # Build data
    669   # Note that these are processed in reverse order to get the substitution order right
    670   if ($section =~ /b/) {
    671654# Don't know what it's for, don't have a useful default replacement
    672655#       --program-prefix=%{_program_prefix} \
    673     $macrostring =~ s'%{fhs}'--host=$DEB_HOST_GNU_TYPE \
     656    $macrostring =~ s'%configure'./configure --host=$DEB_HOST_GNU_TYPE \
    674657        --build=$DEB_BUILD_GNU_TYPE \
    675658        --prefix=%{_prefix} \
     
    686669        --mandir=%{_mandir} \
    687670        --infodir=%{_infodir} ';
     671  } # done %configure
     672
     673  if ($section =~ /m/) {
     674    $macrostring =~ s'%make'make %{fhs}';
     675    $macrostring =~ s'%{__make}'make ';
     676  } # done %make
     677
     678  if ($section =~ /i/) {
     679    # This is where we need to mangle $prefix.
     680    $macrostring =~ s'%makeinstall'make %{fhs}
     681        install';
     682    $prefix = $buildroot;
     683  } # done %install and/or %makeinstall
     684
     685  # Build data
     686  # Note that these are processed in reverse order to get the substitution order right
     687  if ($section =~ /b/) {
     688    $macrostring =~ s'%{fhs}'host=$DEB_HOST_GNU_TYPE \
     689        build=$DEB_BUILD_GNU_TYPE \
     690        prefix=%{_prefix} \
     691        exec-prefix=%{_exec_prefix} \
     692        bindir=%{_bindir} \
     693        sbindir=%{_sbindir} \
     694        sysconfdir=%{_sysconfdir} \
     695        datadir=%{_datadir} \
     696        includedir=%{_includedir} \
     697        libdir=%{_libdir} \
     698        libexecdir=%{_libexecdir} \
     699        localstatedir=%{_localstatedir} \
     700        sharedstatedir=%{_sharedstatedir} \
     701        mandir=%{_mandir} \
     702        infodir=%{_infodir} \
     703';
    688704
    689705    # Note that the above regex terminates with the extra space
Note: See TracChangeset for help on using the changeset viewer.