SPECS: macromedia-flash.spec (HEAD)
glen
glen at pld-linux.org
Tue Aug 23 19:56:52 CEST 2005
Module name: SPECS
Changes by: glen 05/08/23 19:56:48
Modified files:
macromedia-flash.spec
Log message:
- use shared installer script from SOURCES
Index: macromedia-flash.spec
===================================================================
RCS file: /cvsroot/SPECS/macromedia-flash.spec,v
diff -d -u -r1.27 -r1.28
--- macromedia-flash.spec 23 Aug 2005 17:22:40 -0000 1.27
+++ macromedia-flash.spec 23 Aug 2005 17:56:48 -0000 1.28
@@ -12,12 +12,14 @@
Name: %{base_name}-installer
%endif
Version: 7.0r25
-Release: 2.13%{?with_license_agreement:wla}
+Release: 2.17%{?with_license_agreement:wla}
License: Free to use, non-distributable
Group: X11/Applications/Multimedia
%if %{with license_agreement}
Source0: http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/%{version}/install_flash_player_7_linux.tar.gz
# NoSource0-md5: 79c59a5ea29347e01c8e6575dd054cd1
+%else
+Source0: license-installer.sh
%endif
URL: http://www.macromedia.com/software/flash/
BuildRequires: rpmbuild(macros) >= 1.224
@@ -58,57 +60,13 @@
%if %{without license_agreement}
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
-cat <<'EOF' >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
-#!/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
- %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
- if [ "$?" -ne 0 ]; then
- exit 2
- fi
- RPMNAME=%{base_name}-%{version}-%{release}wla.%{_target_cpu}.rpm
- RPMNAMES="$RPMNAMES $RPMDIR/$RPMNAME"
- 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 %{_datadir}/%{base_name}/%{base_name}.spec
-"
-fi
-EOF
+sed -e '
+ s/@BASE_NAME@/%{base_name}/g
+ s/@TARGET_CPU@/%{_target_cpu}/g
+ s- at VERSION@-%{version}-g
+ s- at RELEASE@-%{release}-g
+ s, at SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
+' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
@@ -124,13 +82,8 @@
%if %{without license_agreement}
%pre
-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:
+%{_bindir}/%{base_name}.install
-%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
-"
%else
%triggerin -- mozilla-firefox
@@ -181,6 +134,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.28 2005/08/23 17:56:48 glen
+- use shared installer script from SOURCES
+
Revision 1.27 2005/08/23 17:22:40 glen
- single package with triggers on browser packages
More information about the pld-cvs-commit
mailing list