"Fossies" - the Fresh Open Source Software Archive

Member "open-fcoe-3.19/fcoe-utils/build.sh" (15 Apr 2015, 897 Bytes) of package /linux/misc/open-fcoe-3.19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # This script parses the package name and version out of configure.ac,
    3 # uses them to assemble the names of the distribution tar.gz and source rpm,
    4 # then calls make to generate those files.
    5 # Any arguments will be passed on to configure when building the tarball.
    6 
    7 AC_INIT=`grep AC_INIT configure.ac`
    8 PACKAGE=`echo ${AC_INIT} | awk 'BEGIN { FS="[][]" }; { print $2 };'`
    9 VERSION=`echo ${AC_INIT} | awk 'BEGIN { FS="[][]" }; { print $4 };'`
   10 
   11 tgz=${PACKAGE}-${VERSION}.tar.gz
   12 srpm=${PACKAGE}-${VERSION}-1.src.rpm
   13 
   14 rm -f ${tgz} ${srpm}
   15 
   16 make -f - <<EOF
   17 .PHONY = all
   18 all: ${tgz} ${srpm}
   19 
   20 configure: configure.ac Makefile.am
   21     autoreconf --install -s
   22 
   23 ${tgz}: configure
   24     ./configure ${@}
   25     make dist
   26 
   27 ${srpm}: ${tgz} ${PACKAGE}.spec
   28     rpmbuild --eval "%undefine dist"    \
   29         --define "_sourcedir ${PWD}"    \
   30         --define "_specdir ${PWD}"  \
   31         --define "_srcrpmdir ${PWD}"    \
   32         -bs ${PACKAGE}.spec
   33 EOF
   34