--- /dev/null
+PROJECT=$1
+VERSION=$2
+TYPE=tar.gz
+
+if [ "$VERSION" == "" ] ; then
+ echo buildscript project version
+ exit 1
+fi
+# if (You need to have a rpmbuild directory - Adam has a script in git-tools )
+# (You need to have .rpmmacros - edit it to point to your rpmbuild)
+if cd ~/rpmbuild/SOURCES ; then
+ if tar xzf $PROJECT-$VERSION.$TYPE ; then
+ cd $PROJECT-$VERSION
+ if rpmbuild -ba $PROJECT.spec ; then
+ echo success. Do upload, and update repo
+ else
+ echo failed to rpmbuild $PROJECT
+ fi
+
+ else
+ echo failed tar xzf $PROJECT-$VERSION.tgz
+ fi
+else
+ echo "Unable to CD"
+ exit 1;
+fi
--- /dev/null
+PROJECT=$1
+TYPE=tar.gz
+RPMBUILD_HOST=centos5
+
+if ~/proj/git-tools/id-deb-build/check-for-dummy.sh ; then
+ echo "Version $VERSION OK"
+ . IDMETA
+else
+ echo "Mismatch in IDMETA and debian/changelog"
+fi
+
+if [ "$PROJECT" == "" ] ; then
+ echo buildscript project [TYPE]
+ exit 1
+fi
+
+if [ "$2" != ""]
+ TYPE=$2
+fi
+
+if ./buildconf.sh -d ; then
+ if make dist ; then
+ if scp ${PROJECT}-${VERSION}.${TYPE} ${RPMBUILD_HOST}:rpmbuild/SOURCES ; then
+ echo uploaded to ${RPMBUILD_HOST}. Run buildscript_rpm.sh $PROJECT $VERSION $TYPE from here
+ sleep 5
+ else
+ echo failed to upload to ${RPMBUILD_HOST}
+ exit 1
+ fi
+ # Now debian (p)build
+ if ~/proj/git-tools/id-deb-build/id-pbuild.sh ; then
+ echo Upload and update repo
+ else
+ echo "Failed to build $PROJECT $VERSION
+ exit
+ fi
+ else
+ echo failed to make dist
+ fi
+else
+ echo "buildconf -d failed"
+ exit 1;
+fi