File: autobuild.sh

package info (click to toggle)
libnet-dbus-glib-perl 0.33.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 152 kB
  • sloc: perl: 85; sh: 34; makefile: 3
file content (50 lines) | stat: -rwxr-xr-x 1,052 bytes parent folder | download | duplicates (4)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
#
# This script is used by Test::AutoBuild (http://www.autobuild.org)
# to perform automated builds of the DBus module

NAME=Net-DBus-GLib

set -e

make -k realclean ||:
rm -rf MANIFEST blib pm_to_blib

perl Makefile.PL  PREFIX=$AUTOBUILD_INSTALL_ROOT

# Build the RPM.
make
make manifest

if [ -z "$USE_COVER" ]; then
  perl -MDevel::Cover -e '' 1>/dev/null 2>&1 && USE_COVER=1 || USE_COVER=0
fi

if [ -z "$SKIP_TESTS" -o "$SKIP_TESTS" = "0" ]; then
  if [ "$USE_COVER" = "1" ]; then
    cover -delete
    HARNESS_PERL_SWITCHES=-MDevel::Cover make test
    cover
    mkdir blib/coverage
    cp -a cover_db/*.html cover_db/*.css blib/coverage
    mv blib/coverage/coverage.html blib/coverage/index.html
  else
    make test
  fi
fi

make install

rm -f $NAME-*.tar.gz
make dist

if [ -f /usr/bin/rpmbuild ]; then
  if [ -n "$AUTOBUILD_COUNTER" ]; then
    EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
  else
    NOW=`date +"%s"`
    EXTRA_RELEASE=".$USER$NOW"
  fi
  rpmbuild -ta --define "extra_release $EXTRA_RELEASE" --clean $NAME-*.tar.gz
fi