[packages/adapter: 29/631] - changed /%description/ to /^%description/ (to avoid bugs on lines like "added %description") - r
glen
glen at pld-linux.org
Mon Sep 12 19:36:54 CEST 2016
commit 1da2782395f680fb922cb7104de7ee31d4870ffd
Author: Sebastian Zagrodzki <sebek at zagrodzki.net>
Date: Thu Mar 30 07:45:08 2000 +0000
- changed /%description/ to /^%description/ (to avoid bugs on lines like
"added %description")
- removal of %define _applnkdir (included in RPM 3.0.4 macros)
Changed files:
adapter.awk -> 1.29
adapter.awk | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 39d4385..2413c15 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -47,8 +47,13 @@ defattr == 1 {
defattr = 0
}
+/^%define/ {
+ if ($2 == "_applnkdir")
+ next
+}
+
# descriptions:
-/%description/, (/^%[a-z]+/ && !/%description/) {
+/^%description/, (/^%[a-z]+/ && !/^%description/) {
preamble = 0
if (/^%description/)
@@ -63,13 +68,13 @@ defattr == 1 {
}
# Collect whole text of description
- if (description == 1 && !/^%[a-z]+/ && !/%description/) {
+ if (description == 1 && !/^%[a-z]+/ && !/^%description/) {
description_text = description_text $0 " "
next
}
# Formt description to the length of tw (default == 77)
- if (/^%[a-z]+/ && (!/%description/ || bod == 2)) {
+ if (/^%[a-z]+/ && (!/^%description/ || bod == 2)) {
n = split(description_text, dt, / /)
for (i = 1; i <= n; i++) {
if (length(line) + length(dt[i]) + 1 < tw)
@@ -99,23 +104,23 @@ defattr == 1 {
}
# %prep section:
-/%prep/, (/^%[a-z]+$/ && !/%prep/) {
+/^%prep/, (/^%[a-z]+$/ && !/^%prep/) {
preamble = 0
# Add '-q' to %setup
- if (/%setup/ && !/-q/)
- sub(/%setup/, "%setup -q")
+ if (/^%setup/ && !/-q/)
+ sub(/^%setup/, "%setup -q")
}
# %build section:
-/%build/, (/^%[a-z]+$/ && !/%build/) {
+/^%build/, (/^%[a-z]+$/ && !/^%build/) {
preamble = 0
use_macros()
}
# %install section:
-/%install/, (/^[a-z]+$/ && !/%install/) {
+/^%install/, (/^[a-z]+$/ && !/^%install/) {
preamble = 0
use_macros()
@@ -149,17 +154,17 @@ defattr == 1 {
}
# %files section:
-/%files/, (/^%[a-z \-]+$/ && !/%files/) {
+/^%files/, (/^%[a-z \-]+$/ && !/^%files/) {
preamble = 0
- if ($0 ~ /%files/)
+ if ($0 ~ /^%files/)
defattr = 1
use_macros()
}
# %changelog section:
-/%changelog/, (/^%[a-z]+$/ && !/%changelog/) {
+/^%changelog/, (/^%[a-z]+$/ && !/^%changelog/) {
preamble = 0
# There should be some CVS keywords on the first line of %changelog.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list