File: autobuild.sh

package info (click to toggle)
libvirt-php 0.5.2~30-g64dca6f-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,460 kB
  • ctags: 5,538
  • sloc: cpp: 11,159; ansic: 8,250; xml: 3,999; php: 1,604; sh: 580; makefile: 189; perl: 97
file content (39 lines) | stat: -rwxr-xr-x 780 bytes parent folder | download
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
#!/bin/sh

set -e
set -v

make distclean || :

aclocal
autoreconf -i -f
#phpize

PHPEDIR=`php-config --extension-dir | sed -s "s,/usr,$AUTOBUILD_INSTALL_ROOT,"`
PHPCDIR=`php-config --configure-options |
         sed -n 's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p' |
         sed -s "s,/etc,$AUTOBUILD_INSTALL_ROOT/etc,"`

./configure --prefix=$AUTOBUILD_INSTALL_ROOT

make
make install PHPEDIR=$PHPEDIR PHPCDIR=$PHPCDIR

rm -f *.tar.gz
make dist

if [ -n "$AUTOBUILD_COUNTER" ]; then
  EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
  NOW=`date +"%s"`
  EXTRA_RELEASE=".$USER$NOW"
fi

EXTRA_RELEASE=""
if [ -x /usr/bin/rpmbuild ]
then
  rpmbuild --nodeps \
     --define "extra_release $EXTRA_RELEASE" \
     --define "_sourcedir `pwd`" \
     -ba --clean libvirt-php.spec
fi