4 # We launch this script inside the home directory of the "nigthly build user"
7 # Shall we build or not ?
8 links -dump "http://alternc.org/svn/" | head -1 >new
9 if [ "`cat new`" == "`cat old`" ]
11 echo "No need to build : no change in the source since last launch"
16 DATE="`date +%Y%m%d%H%M`"
20 echo "BuildRoot cleanup"
21 cd ~/buildroot/ && rm -rf *
23 echo "Building AlternC"
24 svn export -q http://alternc.org/svn/alternc/trunk/ alternc
26 mv debian/changelog debian/changelog.orig
27 cat >debian/changelog <<EOF
28 alternc (${VERSION}~nightly${DATE}) stable; urgency=low
29 * Automatic Nightly build of AlternC
32 -- Nightly Build <nightly@alternc.org> `date -R`
35 cat debian/changelog.orig >>debian/changelog
36 debuild -k0x1994905A >/dev/null
39 mv *.deb *.dsc *.build *.changes *.tar.gz ~/www/$DATE
41 for module in awstats mailman changepass procmail
43 echo "Building AlternC-${module}"
44 svn export -q http://alternc.org/svn/alternc-${module}/trunk/ alternc-${module}
46 mv debian/changelog debian/changelog.orig
47 cat >debian/changelog <<EOF
48 alternc-${module} (${VERSION}~nightly${DATE}) stable; urgency=low
49 * Automatic Nightly build of AlternC-${module}
52 -- Nightly Build <nightly@alternc.org> `date -R`
55 cat debian/changelog.orig >>debian/changelog
56 debuild -k0x1994905A >/dev/null
58 rm -rf alternc-${module}
59 mv *.deb *.dsc *.build *.changes *.tar.gz ~/www/$DATE
63 ln -sf ~/www/$DATE ~/www/latest
66 apt-ftparchive packages $DATE/ | tee $DATE/Packages | gzip -c9 >$DATE/Packages.gz
68 echo "Codename: latest"
69 echo "Components: main"
70 echo "Origin: AlternC"
71 echo "Label: AlternC Nightly Build dated $DATE"
72 echo "Architectures: i386 amd64"
73 echo "Description: This repository contains a nightly build of all AlternC packages"
74 apt-ftparchive release $DATE/ ) >$DATE/Release
77 mv $DATE/Release.asc $DATE/Release.gpg