Skip to content
Snippets Groups Projects
Select Git revision
  • 58b63c23176f276e471fa0c5cf618d571994f160
  • master default
  • labcomm2014_tc31
  • labcomm2014
  • js
  • java_dyn_msg_dec
  • anders.blomdell
  • typeref
  • pragma
  • compiler-refactoring
  • labcomm2013
  • v2014.1
  • v2014.0
  • v2013.0
14 results

labcomm_scheduler_private.h

Blame
  • Forked from Anders Blomdell / LabComm
    Source project has a limited visibility.
    rust-package.sh 1014 B
    #!/bin/bash
    
    set -e
    
    TARGET="-t plain"
    
    POSITIONAL=()
    while [ $# -gt 0 ] ; do
        case $1 in
            -p|--patch)
                PATCH="$1"
                shift
                ;;
            -t|--target)
                TARGET="$1 $2"
                shift
                shift
                ;;
            *)    # unknown option
                POSITIONAL+=("$1")
                shift # past argument
                ;;
        esac
    done
    set -- "${POSITIONAL[@]}" # restore positional parameters
    NAME=${POSITIONAL[0]}
    
    rust2rpm ${PATCH} ${TARGET} ${POSITIONAL[@]}
    sed -i -re 's/(BuildRequires:\s*)\((crate[\(][^\)]+\)).*/&\n\1\2/' \
        rust-${NAME}.spec
    DOWNLOAD=$(rpmspec -P rust-${NAME}.spec \
                   | grep Source0 \
                   | sed -re 's/^Source0:\s+(.*)$/\1/')
    curl -L ${DOWNLOAD} > ${HOME}/rpmbuild/SOURCES/$(basename ${DOWNLOAD})
    if [ -n "${PATCH}" ] ; then
        DIFF=$(basename ${DOWNLOAD} | sed -e 's/.crate//')-fix-metadata.diff
        cp ${DIFF} ${HOME}/rpmbuild/SOURCES/
    fi
    rpmbuild -bb rust-${NAME}.spec
    rpmbuild -bs rust-${NAME}.spec