]> git.pld-linux.org Git - packages/captive-drivers.git/blame - license-installer.sh
- @LICENSE@ expansions for fonts-microsoft packages
[packages/captive-drivers.git] / license-installer.sh
CommitLineData
0faa9619
ER
1#!/bin/sh
2if [ "$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
9 BACKUP=0
10 mkdir -p $TMPDIR $SPECDIR $SRPMDIR $RPMDIR $SRPMDIR $SOURCEDIR $BUILDDIR
11 if [ -f $SPECDIR/@BASE_NAME@.spec ]; then
12 BACKUP=1
13 mv -f $SPECDIR/@BASE_NAME@.spec $SPECDIR/@BASE_NAME@.spec.prev
14 fi
15 if echo "$3" | grep '\.src\.rpm$' >/dev/null; then
16 ( cd $SRPMDIR
17 if echo "$3" | grep '://' >/dev/null; then
18 wget --passive-ftp -t0 "$3"
19 else
20 cp -f "$3" .
21 fi
22 rpm2cpio `basename "$3"` | ( cd $TMPDIR; cpio -i @BASE_NAME@.spec )
23 )
24 cp -i $TMPDIR/@BASE_NAME@.spec $SPECDIR/@BASE_NAME@.spec || exit 1
25 else
26 cp -i "$3" $SPECDIR || exit 1
27 fi
28 ( cd $SPECDIR
45693284 29 /usr/bin/builder -nm -nc -ncs --with license_agreement --opts --target=@TARGET_CPU@ @BASE_NAME@.spec
0faa9619
ER
30 if [ "$?" -ne 0 ]; then
31 exit 2
32 fi
33 RPMNAMES="$RPMDIR/@BASE_NAME@-@VERSION@-@RELEASE@wla.@TARGET_CPU@.rpm"
8cd09c47 34 rpm -Uhv $RPMNAMES || echo -e "Install manually the file(s):\n $RPMNAMES" )
0faa9619
ER
35 if [ "$BACKUP" -eq 1 ]; then
36 if [ -f $SPECDIR/@BASE_NAME@.spec.prev ]; then
37 mv -f $SPECDIR/@BASE_NAME@.spec.prev $SPECDIR/@BASE_NAME@.spec
38 fi
39 fi
40else
30e3a54c
ER
41 if [ "@LICENSE@" != '@'LICENSE'@' ]; then
42 cat @LICENSE@
43 echo "
44If you accept the above license rebuild the package using:
45"
46 else
47 echo "
0faa9619
ER
48License issues made us not to include inherent files into
49this package by default. If you want to create full working
50package please build it with the following command:
0faa9619 51"
30e3a54c
ER
52 fi
53 echo "$0 --with license_agreement @SPECFILE@"
0faa9619 54fi
This page took 0.031544 seconds and 4 git commands to generate.