]>
Commit | Line | Data |
---|---|---|
627d81b5 ER |
1 | #!/bin/sh |
2 | if [ "$1" = "--with" -a "$2" = "license_agreement" ]; then | |
8945c147 | 3 | tmp=$(mktemp -d) |
8945c147 | 4 | SRPMDIR=`rpm --define "_topdir $tmp" --eval "%{_srcrpmdir}"` |
8945c147 ER |
5 | BUILDDIR=`rpm --define "_topdir $tmp" --eval "%{_builddir}"` |
6 | RPMDIR=`rpm --define "_topdir $tmp" --eval "%{_rpmdir}"` | |
b7aaaa16 | 7 | PACKAGEDIR="$tmp/packages/@BASE_NAME@" |
1d9c4a3e | 8 | mkdir -p $SRPMDIR $RPMDIR $BUILDDIR $PACKAGEDIR |
8945c147 | 9 | |
627d81b5 | 10 | if echo "$3" | grep '\.src\.rpm$' >/dev/null; then |
2e949a2d | 11 | ( |
627d81b5 | 12 | if echo "$3" | grep '://' >/dev/null; then |
2e949a2d | 13 | cd $SRPMDIR |
627d81b5 ER |
14 | wget --passive-ftp -t0 "$3" |
15 | else | |
2e949a2d | 16 | cp -f "$3" $SRPMDIR |
627d81b5 | 17 | fi |
1d9c4a3e | 18 | rpm2cpio `basename "$3"` | ( cd $PACKAGEDIR; cpio -i @BASE_NAME@.spec ) |
f8f36cf9 | 19 | if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then |
1d9c4a3e | 20 | rpm2cpio `basename "$3"` | ( cd $PACKAGEDIR; cpio -i @COPYSOURCES@ ) |
f8f36cf9 ER |
21 | fi |
22 | ) | |
627d81b5 | 23 | else |
1d9c4a3e | 24 | cp -i "$3" $PACKAGEDIR || exit 1 |
f8f36cf9 ER |
25 | if [ '@COPYSOURCES@' != '@'COPYSOURCES'@' ]; then |
26 | for i in @COPYSOURCES@; do | |
1d9c4a3e | 27 | cp -i @DATADIR@/$i $PACKAGEDIR/$i || exit 1 |
f8f36cf9 ER |
28 | done |
29 | fi | |
627d81b5 | 30 | fi |
1d9c4a3e | 31 | ( cd $PACKAGEDIR |
e1beb3c9 ER |
32 | nd= |
33 | if [ '@USE_DISTFILES@' = 'no' ]; then | |
34 | nd=-nd | |
35 | fi | |
adb916ba | 36 | /usr/bin/builder --define _topdir $tmp --define _binary_payload w1.gzdio $nd -nm -nc -ncs --with license_agreement --target @TARGET_CPU@ @BASE_NAME@.spec |
627d81b5 ER |
37 | if [ "$?" -ne 0 ]; then |
38 | exit 2 | |
39 | fi | |
40 | RPMNAMES="$RPMDIR/@BASE_NAME@-@VERSION@-@RELEASE@wla.@TARGET_CPU@.rpm" | |
f063ac86 | 41 | rpm -Uhv $RPMNAMES || echo -e "Install manually the file(s):\n $RPMNAMES" ) |
627d81b5 | 42 | else |
a665fc52 ER |
43 | if [ "@LICENSE@" != '@'LICENSE'@' ]; then |
44 | cat @LICENSE@ | |
45 | echo " | |
46 | If you accept the above license rebuild the package using: | |
47 | " | |
48 | else | |
49 | echo " | |
627d81b5 ER |
50 | License issues made us not to include inherent files into |
51 | this package by default. If you want to create full working | |
52 | package please build it with the following command: | |
627d81b5 | 53 | " |
a665fc52 ER |
54 | fi |
55 | echo "$0 --with license_agreement @SPECFILE@" | |
627d81b5 | 56 | fi |