Ticket #134: brp-strip.os2.diff

File brp-strip.os2.diff, 1.1 KB (added by dmik, 10 years ago)
  • brp-strip.os2

    old new  
    1 #!/usr/bin/sh
     1#!/bin/sh
    22# If using normal root, avoid changing anything.
    33if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
    44        exit 0
    55fi
    66
    7 # Strip and pack OS/2 binaries
    8 for f in `find $RPM_BUILD_ROOT -type f -name "*.exe"`; do
    9         emxomfstrip -D "${f%.*}.dbg" $f
    10         lxlite /ml1 /mf2 /ydd /yxd /b- "$f" ;
     7NO_COMPRESS=
     8NO_DEBUGINFO=
     9
     10while test "$1" != "" ; do
     11    case "$1" in
     12    --no-compress)
     13        NO_COMPRESS=1
     14    ;;
     15    --no-debuginfo)
     16        NO_DEBUGINFO=1
     17    ;;
     18    esac
     19    shift
    1120done
    12 for f in `find $RPM_BUILD_ROOT -type f -name "*.dll"`; do
    13         emxomfstrip -D "${f%.*}.dbg" $f
    14         lxlite /ml1 /mf2 /ydd /yxd /b- "$f" ;
     21
     22# Exit early if nothing to do
     23[ -n "$NO_COMPRESS" -a -n "$NO_DEBUGINFO" ] && exit
     24
     25# Strip and pack OS/2 binaries and DLLs
     26for f in `find $RPM_BUILD_ROOT -type f -name "*.exe" -o -name "*.dll"`; do
     27        [ -z "$NO_DEBUGINFO" ] && emxomfstrip -D "${f%.*}.dbg" $f
     28        [ -z "$NO_COMPRESS" ] && lxlite /ml1 /mf2 /ydd /yxd /b- "$f"
    1529done