Changeset 724 for trunk/technical/common/build
- Timestamp:
- Oct 2, 2008, 6:19:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/svn_build_prepare.sh
r723 r724 4 4 5 5 # $Id$ 6 7 # Exitcodes: 8 # 0 normal end. Has created build directory 9 # 1 build directory already up-to-date. Nothing to do. 10 # 255 error 6 11 7 12 BUILDUSER=$USER … … 25 30 if [ -z "$PACKAGE" ]; then 26 31 echo "nothing to build found!" 27 exit 132 exit 255 28 33 fi 29 34 30 rm -rf ${BUILDTEMP}/src/${PACKAGE}31 mkdir -p ${BUILDTEMP}/src/${PACKAGE}32 35 33 36 … … 40 43 exit 1 41 44 else 45 rm -rf ${BUILDTEMP}/src/${PACKAGE} 46 mkdir -p ${BUILDTEMP}/src/${PACKAGE} 42 47 cp -a "$1" ${BUILDTEMP}/src/${PACKAGE} 43 48 cd ${BUILDTEMP}/src/${PACKAGE}; rpm2cpio $1 | cpio -i … … 64 69 REBUILD="yes" 65 70 else # check if RPM has been build already 66 # TODO: this che kcis broken for OpenSUSE build service,71 # TODO: this check is broken for OpenSUSE build service, 67 72 # because version is changed later on 68 73 EXPECTED_DEST_RPM_FILENAME=${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-${VERSION}-${SVN_BUILD_RELEASE}.*.rpm … … 115 120 if [ -r "SOURCES" ]; then 116 121 # create a tar file from the sources 117 printf "creating $PACKAGE-$VERSION.tar.bz2:\n" 118 tar cvjf ${BUILDTEMP}/src/${PACKAGE}/$PACKAGE-$VERSION.tar.bz2 --files-from SOURCES --exclude .svn --exclude "*~" 119 122 printf "creating $PACKAGE-$VERSION.tar.bz2: " 123 124 if [ "$REBUILD" -o ! -r ${BUILDTEMP}/src/${PACKAGE}/$PACKAGE-$VERSION.tar.bz2 ]; then 125 rm -rf ${BUILDTEMP}/src/${PACKAGE} 126 mkdir -p ${BUILDTEMP}/src/${PACKAGE} 127 tar cvjf ${BUILDTEMP}/src/${PACKAGE}/$PACKAGE-$VERSION.tar.bz2 --files-from SOURCES --exclude .svn --exclude "*~" 128 else 129 printf "already exists. Skipped\n" 130 exit 1 131 fi 120 132 elif [ -r "SPECSOURCES" ]; then 121 133 # SPECSOURCES has to list the files 122 134 # that are referenced in the .spec file 123 135 # these files are copied to the build environment 136 rm -rf ${BUILDTEMP}/src/${PACKAGE} 137 mkdir -p ${BUILDTEMP}/src/${PACKAGE} 124 138 cp -av `cat SPECSOURCES` ${BUILDTEMP}/src/${PACKAGE} 125 139 126 140 else 127 # legacy method: 128 # call the existing Makefile 129 # to generate a tar file 130 test -e Makefile && make 131 TARFILE=$(ls *.tar.[gb]z*| awk '{print $1}') 132 cp -av $TARFILE ${BUILDTEMP}/src/${PACKAGE} 141 printf "error: neither SOURCES nor SPECSOURCES file found. One of these is required. Exiting\n" 142 exit 255 133 143 fi 134 144 fi
Note:
See TracChangeset
for help on using the changeset viewer.