diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-11-29 14:49:46 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2013-11-29 14:49:46 +0100 |
commit | 482cc782982aad63627d96af98a603f714a103d1 (patch) | |
tree | 867d9f0f3a9acc324d32a1afe353f53e06abf777 /bin | |
parent | ec037998ae38d2544a7a26f7f095d4b314f4498e (diff) | |
download | buildscripts-482cc782982aad63627d96af98a603f714a103d1.tar.gz buildscripts-482cc782982aad63627d96af98a603f714a103d1.tar.bz2 buildscripts-482cc782982aad63627d96af98a603f714a103d1.zip |
more work on tarballing
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-rpm-package | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package index c9f4e10..6edd039 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -185,11 +185,15 @@ build_packages() { git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" cd $TEMP_DIR rm -Rf "$PROJECT/.git" + cp $PROJECT/$PROJECT.spec . + UPSTREAM_VERSION=$(cat $PROJECT.spec | egrep "^Version:.*" | awk '{ print $2 }') + GITREV=$(cd $PROJECT && gitrevno && cd - 1>/dev/null) + mv $TEMP_DIR/$PROJECT $TEMP_DIR/$PROJECT-$UPSTREAM_VERSION - tar -czf ~/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $TEMP_DIR/$PROJECT-$UPSTREAM_VERSION - cp $PROJECT/$PROJECT.spec .. + tar -czf ~/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $PROJECT-$UPSTREAM_VERSION cd && rm $TEMP_DIR/$PROJECT -Rf + cat "$PROJECT_DIR/RPM_BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do l_DIST="$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])" l_CODENAMES="${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])}" @@ -198,18 +202,6 @@ build_packages() { test -z $CODENAMES || echo $line | grep $CODENAMES || break - TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)" - mkdir -p "$TEMP_DIR/$PROJECT" - chmod 2770 "$TEMP_DIR" -Rf - - cd "$PROJECT_DIR" - git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" - cd "$TEMP_DIR/$PROJECT" - git checkout $CHECKOUT || git checkout master - - GITREV=$(gitrevno) - UPSTREAM_VERSION=$(cat $PROJECT.spec | egrep "^Version:.*" | awk '{ print $2 }') - # modify the section for non-main package builds ### TODO: How to host different builds (releases / nightlies in the same repository???) |