Ticket #230: brp-strip.os2.diff

File brp-strip.os2.diff, 2.1 KB (added by dmik, 7 years ago)
  • C:\usr\lib\rpm\brp-strip.os2

    old new  
    33#
    44# Strip debug info and compress OS/2 binaries and DLLs using emxomfstrip and lxlite tools.
    55#
    6 # Usage: brp-strip.os2 [--[no-]compress] [--[no-]debuginfo]
     6# Usage: brp-strip.os2 RPM_BUILD_SUBDIR [--[no-]compress] [--[no-]debuginfo]
    77#            [-n|--names <wildcard1[,wildcard2...]>]
    88#            [-i|--include <wildcard1[,wildcard2...]>]
    99#            [-x|--exclude <wildcard1[,wildcard2...]>]
    1010#
     11# RPM_BUILD_SUBDIR is a directory where the souce code of the package is
     12# unpacked to. A file `debugfiles.list` containing a list of files with debug
     13# info is created in this directory when the script is instructed to generate
     14# debug info (by default). This file is then used by the %debug_package macro to
     15# automatically generate a `debuginfo` sub-package for the given package.
     16#
    1117# The --no-compress and --no-debuginfo flags completely disable lxlite and emxomfstrip
    1218# invocation, respectively. The -n flag overrides the default list of files that will be
    1319# compressed and stripped (see FILENAMES below). The -i flag includes additional files
     
    2329# %debug_package macro to generate the debug package.
    2430#
    2531
     32die()
     33{
     34  (>&2 echo "$0: ERROR: $1")
     35  exit 1
     36}
     37
    2638# If using normal root, avoid changing anything.
    2739if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" -o "$RPM_BUILD_ROOT" = "/@unixroot" ]; then
    2840        exit 0
     
    4052DEBUGINFO_FILENAMES=
    4153DEBUGINFO_DFILENAMES_EXCLUDE=
    4254
     55RPM_BUILD_SUBDIR="$1"
     56[ -n "$RPM_BUILD_SUBDIR" ] || die "RPM_BUILD_SUBDIR is not set."
     57shift
     58
    4359dbgext="dbg"
    44 dbgfilelist=debugfiles.list
     60dbgfilelist="$RPM_BUILD_SUBDIR/debugfiles.list"
    4561
    4662var="FILENAMES"
    4763
     
    146162fi
    147163
    148164[ -z "$NO_DEBUGINFO" ] && \
    149     find "$RPM_BUILD_ROOT" -type f -name "*.$dbgext" | sed -e "s|^$RPM_BUILD_ROOT||" > "./$dbgfilelist"
     165    find "$RPM_BUILD_ROOT" -type f -name "*.$dbgext" | sed -e "s|^$RPM_BUILD_ROOT||" > "$dbgfilelist"
    150166
    151167exit 0