Changeset 153


Ignore:
Timestamp:
06/11/10 16:50:20 (14 years ago)
Author:
kdeugau
Message:

/trunk

Misc bugfixes and don't-cut-the-corner-case-ing

  • Expand package data macros as well as 'globals' at a couple of points (may prove simpler to merge these two)
  • gzip info pages as well as man pages
  • expand manpage-directory references in %files so that we properly gzip them without having to specify Every. Last. Bloody. Page. when there are "many" in the set. NB: applies only to .../man/man<n>/, not .../man/
  • make sure to expand %{_infodir} as "global data"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r151 r153  
    599599      $subname = "main";
    600600      if ($1) {       # Magic to add entries to the right package
    601         my $tmp = expandmacros("$1", 'g');
     601        my $tmp = expandmacros("$1", 'gp');
    602602        if (/-n/) { $subname = $tmp; } else { $subname = "$pkgdata{main}{name}-$tmp"; }
    603603      }
     
    608608      $stage = 'package';
    609609      if ($1) {       # Magic to add entries to the right package
    610         my $tmp = expandmacros("$1", 'g');
     610        my $tmp = expandmacros("$1", 'gp');
    611611        if (/-n/) { $subname = $tmp; } else { $subname = "$pkgdata{main}{name}-$tmp"; }
    612612      }
     
    663663      $subname = 'main';
    664664      if ($1) {       # Magic to add entries to the right list of files
    665         my $tmp = expandmacros("$1", 'g');
     665        my $tmp = expandmacros("$1", 'gp');
    666666        if (/-n/) { $subname = $tmp; } else { $subname = "$pkgdata{main}{name}-$tmp"; }
    667667      }
     
    10981098
    10991099      # Feh.  Manpages don't **NEED** to be gzipped, but rpmbuild does, and so shall we.
    1100       if ($pkgfile =~ m|/usr/share/man/man|) {
     1100      # ... and your little info page too!
     1101      if ($pkgfile =~ m{/usr/share/(?:man/man|info)}) {
    11011102        # need to check to see if manpage is gzipped
    11021103        if (-e "$specglobals{buildroot}$pkgfile") {
    1103           if ($pkgfile !~ m|\.gz$|) {
    1104             qx { gzip $specglobals{buildroot}$pkgfile };
    1105             $pkgfile .= ".gz";
     1104          # if we've just been pointed to a manpage section with "many" pages,
     1105          # we need to gzip them all.
     1106          # fortunately, we do NOT need to explicitly track each file for the
     1107          # purpose of stuffing them in the package...  the original %files
     1108          # entry will do just fine.
     1109          if ( -d "$specglobals{buildroot}$pkgfile") {
     1110            foreach my $globfile (glob("$specglobals{buildroot}$pkgfile/*")) {
     1111              gzip $globfile if $globfile !~ m|\.gz$|;
     1112            }
     1113          } else {
     1114            if ($pkgfile !~ m|\.gz$|) {
     1115              qx { gzip $specglobals{buildroot}$pkgfile };
     1116              $pkgfile .= ".gz";
     1117            }
    11061118          }
    11071119        } else {
     
    16361648    $macrostring =~ s'%{_sbindir}'/usr/sbin'g;
    16371649    $macrostring =~ s'%{_mandir}'%{_datadir}/man'g;
     1650    $macrostring =~ s'%{_infodir}'%{_datadir}/info'g;
    16381651    $macrostring =~ s'%{_includedir}'/usr/include'g;
    16391652    $macrostring =~ s'%{_libdir}'/usr/lib'g;
Note: See TracChangeset for help on using the changeset viewer.