]> git.pld-linux.org Git - packages/fonts-TTF-Bitstream-Cyberfonts.git/commitdiff
- shared installer, extracted from macromedia-flash.spec
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 23 Aug 2005 17:56:16 +0000 (17:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    license-installer.sh -> 1.1

license-installer.sh [new file with mode: 0644]

diff --git a/license-installer.sh b/license-installer.sh
new file mode 100644 (file)
index 0000000..7dcd443
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+if [ "$1" = "--with" -a "$2" = "license_agreement" ]; then
+       TMPDIR=`rpm --eval "%{tmpdir}"`; export TMPDIR
+       SPECDIR=`rpm --eval "%{_specdir}"`; export SPECDIR
+       SRPMDIR=`rpm --eval "%{_srcrpmdir}"`; export SRPMDIR
+       SOURCEDIR=`rpm --eval "%{_sourcedir}"`; export SOURCEDIR
+       BUILDDIR=`rpm --eval "%{_builddir}"`; export BUILDDIR
+       RPMDIR=`rpm --eval "%{_rpmdir}"`; export RPMDIR
+       BACKUP=0
+       mkdir -p $TMPDIR $SPECDIR $SRPMDIR $RPMDIR $SRPMDIR $SOURCEDIR $BUILDDIR
+       if [ -f $SPECDIR/@BASE_NAME@.spec ]; then
+               BACKUP=1
+               mv -f $SPECDIR/@BASE_NAME@.spec $SPECDIR/@BASE_NAME@.spec.prev
+       fi
+       if echo "$3" | grep '\.src\.rpm$' >/dev/null; then
+               ( cd $SRPMDIR
+               if echo "$3" | grep '://' >/dev/null; then
+                       wget --passive-ftp -t0 "$3"
+               else
+                       cp -f "$3" .
+               fi
+               rpm2cpio `basename "$3"` | ( cd $TMPDIR; cpio -i @BASE_NAME@.spec )
+               )
+               cp -i $TMPDIR/@BASE_NAME@.spec $SPECDIR/@BASE_NAME@.spec || exit 1
+       else
+               cp -i "$3" $SPECDIR || exit 1
+       fi
+       ( cd $SPECDIR
+       /usr/bin/builder -nc -ncs --with license_agreement --opts --target=@TARGET_CPU@ @BASE_NAME@.spec
+       if [ "$?" -ne 0 ]; then
+               exit 2
+       fi
+       RPMNAMES="$RPMDIR/@BASE_NAME@-@VERSION@-@RELEASE@wla.@TARGET_CPU@.rpm"
+       rpm -U $RPMNAMES || echo -e "Install manually the file(s):\n   $RPMNAMES" )
+       if [ "$BACKUP" -eq 1 ]; then
+               if [ -f $SPECDIR/@BASE_NAME@.spec.prev ]; then
+                       mv -f $SPECDIR/@BASE_NAME@.spec.prev $SPECDIR/@BASE_NAME@.spec
+               fi
+       fi
+else
+       echo "
+License issues made us not to include inherent files into
+this package by default. If you want to create full working
+package please build it with the following command:
+
+$0 --with license_agreement @SPECFILE@
+"
+fi
This page took 0.056307 seconds and 4 git commands to generate.