ruby/rubygemsdeps.sh
Stephan Kulow 96685ceb06 Accepting request 127027 from home:coolo:branches:openSUSE:Factory
- Provide the following new RPM macros:
  + %gem_unpack
  + %gem_build
  + %gem_install (retaining the old behavior)

- add automatic provides and requires for rubygems

OBS-URL: https://build.opensuse.org/request/show/127027
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=32
2012-07-04 05:08:42 +00:00

34 lines
533 B
Bash

#!/bin/bash
[ $# -ge 1 ] || {
cat > /dev/null
exit 0
}
case $1 in
-P|--provides)
shift
RPM_BUILD_ROOT="$1"
while read possible
do
case "$possible" in
*.gemspec)
possible=${possible##*/}
possible=${possible%.gemspec}
echo "$possible" | sed -e 's,^\(.*\)-,rubygem(\1) = ,'
;;
esac
done
;;
-R|--requires)
while read possible ; do
case "$possible" in
*.gemspec)
echo "$possible" | sed -ne 's,.*/gems/,ruby(abi) = ,; s,/.*,,p'
;;
esac
done
;;
esac
exit 0