- Timestamp:
- Oct 10, 2002, 7:33:42 PM (22 years ago)
- Location:
- trunk/technical/common/build
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/build.sh
r619 r620 1 1 #!/bin/bash 2 2 # Remote build script (iboernig@suse.de) 3 # $Id: build.sh,v 1.1 1 2002/10/10 15:01:08joergs Exp $3 # $Id: build.sh,v 1.12 2002/10/10 17:33:42 joergs Exp $ 4 4 # 5 5 # Kurze Featuritis: … … 35 35 36 36 # Hier gehts los: 37 make38 37 39 SPECFILE=$(ls *.spec | awk '{print $1}') 40 TARFILE=$(ls *.tar.[gb]z*| awk '{print $1}') 41 DIFFILES=$(ls *.dif* 2>/dev/null | awk '{print $1}') 42 PATCHFILES=$(ls *.patch 2>/dev/null | awk '{print $1}') 38 #DIFFILES=$(ls *.dif* 2>/dev/null | awk '{print $1}') 39 #PATCHFILES=$(ls *.patch 2>/dev/null | awk '{print $1}') 43 40 44 41 # sonstige files die gebraucht werden 45 RESTFILES=$(ls *.init *.html 2>/dev/null | awk '{print $1}') # fuer srpm inetd 46 47 PACKAGE=$(awk '/^Name:/ {print $2}' <$SPECFILE) 48 VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE) 42 #RESTFILES=$(ls *.init *.html 2>/dev/null | awk '{print $1}') # fuer srpm inetd 49 43 50 44 ERROR=0 45 46 47 if [ -z "$1" ]; then 48 # without parameter, we are in source directory 49 test -e Makefile && make 50 SPECFILE=$(ls *.spec | awk '{print $1}') 51 TARFILE=$(ls *.tar.[gb]z*| awk '{print $1}') 52 PACKAGE=$(awk '/^Name:/ {print $2}' <$SPECFILE) 53 VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE) 54 SRC_FILES="$SPECFILE $TARFILE" 55 else 56 # parameter is src.rpm file 57 PACKAGE=`echo $1 | sed 's/-[0-9]*\..*.src.rpm//'` 58 VERSION=`echo $1 | sed 's/.*-\([0-9]*\..*\)-.*.src.rpm/\1/'` 59 SRC_FILES="$1" 60 fi 51 61 52 62 echo $PACKAGE $VERSION $BUILD_DIST 53 63 54 64 # Cleaning up and install tempdir 55 ssh -${SSH_VERSION} ${FQBUILDHOST} "rm -r ${BUILDTEMP}/src/${PACKAGE} -${VERSION}; \56 mkdir -p ${BUILDTEMP}/src/${PACKAGE} -${VERSION}${BUILDTEMP}/${BUILD_DIST}";65 ssh -${SSH_VERSION} ${FQBUILDHOST} "rm -r ${BUILDTEMP}/src/${PACKAGE}; \ 66 mkdir -p ${BUILDTEMP}/src/${PACKAGE} ${BUILDTEMP}/${BUILD_DIST}"; 57 67 58 scp -oProtocol=$SSH_VERSION $TARFILE $SPECFILE $DIFFILES $PATCHFILES $RESTFILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}-${VERSION} 68 scp -oProtocol=$SSH_VERSION $SRC_FILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE} 69 70 if [ "$1" ]; then 71 ssh -${SSH_VERSION} ${FQBUILDHOST} "\ 72 cd ${BUILDTEMP}/src/${PACKAGE}; rpm2cpio $1 | cpio -i"; 73 fi 59 74 60 75 # create buildscript … … 70 85 #echo "BUILD_PREPARE_SPEC ist $BUILD_PREPARE_SPEC"; 71 86 72 73 cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE}-${VERSION} 87 cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE} 74 88 build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/${BUILD_DIST} 75 89 EOF … … 77 91 cat /tmp/tmpscript.$$ 78 92 79 scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE} -${VERSION}/buildscript93 scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}/buildscript 80 94 rm /tmp/tmpscript.$$ 81 95 82 96 # build and file rpms 83 97 ssh -oProtocol=$SSH_VERSION root@${FQBUILDHOST} \ 84 . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE} -${VERSION}/buildscript98 . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}/buildscript 85 99 ssh -oProtocol=$SSH_VERSION ${FQBUILDHOST} \ 86 cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/ 100 "rm -f ${BUILDTEMP}/${BUILD_DIST}/${PACKAGE}-*.*.rpm;\ 101 cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/" 87 102 88 103 mkdir -p ${DEST_DIR}/src 104 # delete all old versions of this package 105 rm -f ${DEST_DIR}/src/${PACKAGE}-*.src.rpm 89 106 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src ); then 90 107 ERROR=1 … … 92 109 93 110 mkdir -p ${DEST_DIR}/${BUILD_DIST} 111 # delete all old versions of this package 112 rm -f ${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-*.rpm 94 113 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then 95 114 ERROR=2 -
trunk/technical/common/build/buildlist_8.1
r618 r620 1 1 # Steuerdatei für autobuildskript 2 # $Id: buildlist_8.1,v 1. 1 2002/10/10 15:00:37joergs Exp $2 # $Id: buildlist_8.1,v 1.2 2002/10/10 17:33:42 joergs Exp $ 3 3 # Format: 4 4 # … … 19 19 client/sc_hardware/ :8.1-i386 :--no-init 20 20 21 external/cpan/perl-Net-IP :8.1-i386 21 external/cpan/perl-Net-IP :8.1-i386 :--no-init
Note:
See TracChangeset
for help on using the changeset viewer.