2 if [ "$1" = "--with" -a "$2" = "license_agreement" ]; then
3 TMPDIR=`rpm --eval "%{tmpdir}"`; export TMPDIR
4 SPECDIR=`rpm --eval "%{_specdir}"`; export SPECDIR
5 SRPMDIR=`rpm --eval "%{_srcrpmdir}"`; export SRPMDIR
6 SOURCEDIR=`rpm --eval "%{_sourcedir}"`; export SOURCEDIR
7 BUILDDIR=`rpm --eval "%{_builddir}"`; export BUILDDIR
8 RPMDIR=`rpm --eval "%{_rpmdir}"`; export RPMDIR
10 mkdir -p $TMPDIR $SPECDIR $SRPMDIR $RPMDIR $SRPMDIR $SOURCEDIR $BUILDDIR
11 if [ -f $SPECDIR/@BASE_NAME@.spec ]; then
13 mv -f $SPECDIR/@BASE_NAME@.spec $SPECDIR/@BASE_NAME@.spec.prev
15 if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then
16 for i in @COPYSOURCES@; do
17 if [ -f $SOURCEDIR/$i ]; then
18 mv -f $SOURCEDIR/$i $SOURCEDIR/$i.prev
23 if echo "$3" | grep '\.src\.rpm$' >/dev/null; then
25 if echo "$3" | grep '://' >/dev/null; then
27 wget --passive-ftp -t0 "$3"
32 rpm2cpio `basename "$3"` | ( cd $TMPDIR; cpio -i @BASE_NAME@.spec )
33 if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then
34 for i in @COPYSOURCES@; do
35 rpm2cpio `basename "$3"` | ( cd $TMPDIR; cpio -i $i )
39 cp -i $TMPDIR/@BASE_NAME@.spec $SPECDIR/@BASE_NAME@.spec || exit 1
40 if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then
41 for i in @COPYSOURCES@; do
42 cp -i $TMPDIR/$i $SOURCEDIR/$i || exit 1
46 cp -i "$3" $SPECDIR || exit 1
47 if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then
48 for i in @COPYSOURCES@; do
49 cp -i @DATADIR@/$i $SOURCEDIR/$i || exit 1
54 /usr/bin/builder -nm -nc -ncs --with license_agreement --opts --target=@TARGET_CPU@ @BASE_NAME@.spec
55 if [ "$?" -ne 0 ]; then
58 RPMNAMES="$RPMDIR/@BASE_NAME@-@VERSION@-@RELEASE@wla.@TARGET_CPU@.rpm"
59 rpm -Uhv $RPMNAMES || echo -e "Install manually the file(s):\n $RPMNAMES" )
60 if [ "$BACKUP" -eq 1 ]; then
61 if [ -f $SPECDIR/@BASE_NAME@.spec.prev ]; then
62 mv -f $SPECDIR/@BASE_NAME@.spec.prev $SPECDIR/@BASE_NAME@.spec
64 if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then
65 for i in @COPYSOURCES@; do
66 if [ -f $SOURCEDIR/$i ]; then
67 mv -f $SOURCEDIR/$i.prev $SOURCEDIR/$i
73 if [ "@LICENSE@" != '@'LICENSE'@' ]; then
76 If you accept the above license rebuild the package using:
80 License issues made us not to include inherent files into
81 this package by default. If you want to create full working
82 package please build it with the following command:
85 echo "$0 --with license_agreement @SPECFILE@"