File: build

package info (click to toggle)
ruby-gnome2 3.1.0-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,072 kB
  • ctags: 17,433
  • sloc: ansic: 93,621; ruby: 62,273; xml: 335; sh: 246; makefile: 25
file content (35 lines) | stat: -rwxr-xr-x 679 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

set -e
set -x

if [ $# -ne 1 ]; then
  echo "usage: $0 RUBY"
  exit 1
fi

ruby="$1"

libdir=$($ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendordir"]')
archdir=$($ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"]')
curdir=$(pwd)
pkgdir="$curdir/debian/tmp"

echo "I: Building with $ruby"
echo "I: libdir  = $libdir"
echo "I: archdir = $archdir"
echo "I: DESTDIR = $pkgdir"

RUBYOPT='-Ku' $ruby extconf.rb

make

if [ "$ruby" = 'ruby2.0' ]; then
  make install DESTDIR="$pkgdir" \
    sitelibdir="$libdir" sitearchdir="$archdir"
else
  make install DESTDIR="$pkgdir" \
    sitelibdir='$(DESTDIR)'"$libdir" sitearchdir='$(DESTDIR)'"$archdir"
fi

make distclean