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