]> granicus.if.org Git - pdns/commitdiff
auto build script
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 14 Jan 2006 21:13:12 +0000 (21:13 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 14 Jan 2006 21:13:12 +0000 (21:13 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@557 d19b8d6e-7fed-0310-83ef-9ca221ded41b

build-scripts/auto-build [new file with mode: 0755]

diff --git a/build-scripts/auto-build b/build-scripts/auto-build
new file mode 100755 (executable)
index 0000000..fce76ba
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh 
+
+# Internal script used to build daily snapshots (if there is a change in svn, that is)
+
+export PATH=/opt/gcc-4.0.2/bin:$PATH
+export LD_LIBRARY_PATH=/opt/gcc-4.0.2/lib
+
+cd /home/ahu/auto-build
+if [ -e pdns ] 
+then
+       cd pdns
+       LATEST=$(svn info svn://svn.powerdns.com/pdns/ | awk  '/^Revision/ { print $2 }'  )
+       CO=$(svn info . | awk  '/^Revision/ { print $2 }'  )
+       if [ "$LATEST" -eq "$CO" -a -e ../pdns*$CO-1.i386.rpm ]
+       then
+               echo nothing to do
+               exit
+       fi
+       cd ..
+fi
+
+# start out with virgin repo anyhow
+rm -rf pdns
+svn co svn://svn.powerdns.com/pdns/trunk/pdns
+cd pdns
+DATE=$(date +%Y%m%d).$LATEST
+ssed -r "s/Version: (.*)/Version: \\1.$DATE/" -i *.spec
+ssed -r "s/AM_INIT_AUTOMAKE\\(pdns, (.*)\\)/AM_INIT_AUTOMAKE\(pdns, \\1.$DATE\)/" -i configure.in
+ssed -r "s/^pdns \\(([^-]*)-[0-9]*\\)/pdns \\(\\1.$DATE-1\\)/" -i debian-pdns/changelog
+
+./bootstrap
+fakeroot debian-pdns/rules binary-static
+rm -rf debian-pdns/tmp/
+fakeroot ./build-scripts/rpm-build-instruction
+build-scripts/tar-gz-build-instruction
+cd ..
+mv pdns/*.tar.gz .
+
+