SPECS: fonts-TTF-microsoft.spec - use shared license-installer.sh ...
glen
glen at pld-linux.org
Sun Aug 28 17:30:26 CEST 2005
Author: glen Date: Sun Aug 28 15:30:26 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use shared license-installer.sh script from SOURCES
---- Files affected:
SPECS:
fonts-TTF-microsoft.spec (1.25 -> 1.26)
---- Diffs:
================================================================
Index: SPECS/fonts-TTF-microsoft.spec
diff -u SPECS/fonts-TTF-microsoft.spec:1.25 SPECS/fonts-TTF-microsoft.spec:1.26
--- SPECS/fonts-TTF-microsoft.spec:1.25 Sun Aug 28 17:08:05 2005
+++ SPECS/fonts-TTF-microsoft.spec Sun Aug 28 17:30:21 2005
@@ -12,7 +12,7 @@
Name: %{base_name}-installer
%endif
Version: 20020525
-Release: 5%{?with_license_agreement:wla}
+Release: 6%{?with_license_agreement:wla}
License: Microsoft EULA (for non-commercial use)
Group: Fonts
%if %{with license_agreement}
@@ -39,6 +39,7 @@
Source10: http://dl.sourceforge.net/corefonts/webdin32.exe
# NoSource10-md5: 230a1d13a365b22815f502eb24d9149b
%else
+Source0: license-installer.sh
# extracted from one of the above
Source20: Microsoft-EULA.txt
%endif
@@ -91,58 +92,14 @@
%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_SPEC=0
- mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
- if [ -f \$SPECDIR/%{base_name}.spec ]; then
- BACKUP_SPEC=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 ) )
- if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
- exit 1
- fi
- else
- if ! cp -i "\$3" \$SPECDIR; then
- exit 1
- fi
- 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.noarch.rpm
- rpm -U \$RPMDIR/\$RPMNAME || \
- echo -e Install manually the file:\\\n \$RPMDIR/\$RPMNAME )
- if [ "\$BACKUP_SPEC" -eq 1 ]; then
- mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
- fi
-else
- cat %{_datadir}/%{base_name}/Microsot-EULA.txt
- echo "
-If you accept the above license rebuild the package using:
-
-\$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
+ s, at LICENSE@,%{_datadir}/%{base_name}/Microsoft-EULA.txt,
+' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
@@ -190,8 +147,13 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.26 2005/08/28 15:30:21 glen
+- use shared license-installer.sh script from SOURCES
+
Revision 1.25 2005/08/28 15:08:05 glen
-- removed ftp url, which is 1) pointing to src.rpm in RPMS dir, 2) the -installer src.rpm doesn't contain nothing more than pure .spec (ie no sourceX inside anyway)
+- removed ftp url from %description, because
+ 1) it's pointing to inexistent src.rpm in RPMS dir,
+ 2) the -installer .src.rpm doesn't contain sourceX-s inside anyway
Revision 1.24 2005/08/28 14:53:01 glen
- use without macro
@@ -200,7 +162,9 @@
- rel up to 5
Revision 1.22 2004/12/08 05:47:33 roman
-- added R: cabextract to the case of building without license agreement (rationale: cabextract will be needed to get the fonts anyway, which is the only possible use of the package)
+- added R: cabextract to the case of building without license
+ agreement (rationale: cabextract will be needed to get the fonts
+ anyway, which is the only possible use of the package)
Revision 1.21 2004/11/17 06:14:48 ankry
- message fixes
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/fonts-TTF-microsoft.spec?r1=1.25&r2=1.26&f=u
More information about the pld-cvs-commit
mailing list