File: buildbot_pdebuilder

package info (click to toggle)
solarpowerlog 0.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,724 kB
  • sloc: cpp: 11,856; ansic: 1,044; php: 728; sh: 188; xml: 166; makefile: 166
file content (31 lines) | stat: -rwxr-xr-x 803 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
#!/bin/bash

# buildpackge using pbuilder.

# Prerequesite:
# builbot_make_orig_source run
# pbuilder setup.

# you need to setup sudo to allow the buildbot user to running pdebuild.
# you also need to allow sudo pbuilder update


# Result:
# hopfully a debian package...

set -e

VERSION=$(grep "PACKAGE_VERSION=" configure | cut -d"=" -f 2- | tr --delete "\'")

# check if we can skip pbuilder update -- we do it only once after an apt-get update
# for this we compare the time against the last modification of /var/lib/apt/lists
LAST_UPDATE=$(stat -c %Y /var/cache/pbuilder/base.tgz)
LISTS_TIMESTAMP=$(stat -c %Y /var/lib/apt/lists)
if [[ $LAST_UPDATE -lt $LISTS_TIMESTAMP ]]
then
	sudo /usr/sbin/pbuilder update
fi

( cd stagedir_debbuild/solarpowerlog-$VERSION && pdebuild --debbuildopts "-j2" )