]> git.ipfire.org Git - thirdparty/pdns.git/blob - build-scripts/functions.sh
Add support for dnsdist-15 to repo script.
[thirdparty/pdns.git] / build-scripts / functions.sh
1 startup() {
2 export DEBFULLNAME="PowerDNS.COM BV AutoBuilder"
3 export DEBEMAIL="noreply@powerdns.com"
4
5 if [ -z "$VERSION" ]; then
6 echo 'Please set $VERSION' >&2
7 exit 1
8 fi
9
10 if [ -z "$RELEASE" ];then
11 echo 'Please set $RELEASE' >&2
12 exit 1
13 fi
14
15 TARBALLVERSION=${TARBALLVERSION:-$VERSION}
16
17 TARBALLFILE=${TARBALLPREFIX}-${TARBALLVERSION}.tar.bz2
18
19 if [ ! -f ${TARBALLFILE} ]; then
20 echo "${TARBALLFILE} not found" >&2
21 exit 1
22 fi
23 }
24
25 cp_tarball_to_tmp() {
26 DIR=$(mktemp -d)
27
28 tar -xf ${TARBALLFILE} -C ${DIR}
29
30 SRCDIR=${DIR}/${TARBALLPREFIX}-${TARBALLVERSION}
31 if [ "${TARBALLPREFIX}" = "pdns" ]; then
32 cp -r build-scripts/debian-authoritative ${SRCDIR}/debian
33 elif [ "${TARBALLPREFIX}" = "pdns-recursor" ]; then
34 cp -r build-scripts/debian-recursor ${SRCDIR}/debian
35 else
36 cp -r build-scripts/debian-${TARBALLPREFIX} ${SRCDIR}/debian
37 fi
38 }
39
40 cp_tarball_to_rpm_sources() {
41 rpmdev-setuptree
42 cp ${TARBALLFILE} ${HOME}/rpmbuild/SOURCES
43 }
44
45 mv_debs_to_pwd() {
46 mv ${DIR}/*.deb .
47 }