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