SPECS: adapter.awk - random fixes
glen
glen at pld-linux.org
Sat Mar 4 13:02:52 CET 2006
Author: glen Date: Sat Mar 4 12:02:52 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- random fixes
---- Files affected:
SPECS:
adapter.awk (1.287 -> 1.288)
---- Diffs:
================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.287 SPECS/adapter.awk:1.288
--- SPECS/adapter.awk:1.287 Sat Mar 4 11:30:14 2006
+++ SPECS/adapter.awk Sat Mar 4 13:02:47 2006
@@ -80,6 +80,7 @@
"rpm --eval %perl_sitelib" | getline perl_sitelib
"rpm --eval %py_sitescriptdir" | getline py_sitescriptdir
+ "rpm --eval %py_sitedir" | getline py_sitedir
"rpm --eval %py_scriptdir " | getline py_scriptdir
"rpm --eval %php_pear_dir" | getline php_pear_dir
}
@@ -164,6 +165,11 @@
}
if ($2 == "date") {
date = 1
+ if (did_files == 0) {
+ print "%files"
+ print ""
+ did_files = 1
+ }
}
# Do not add %define of _prefix if it already is.
@@ -285,6 +291,7 @@
#########
/^%prep/, (!/^%prep/ && $0 ~ SECTIONS) {
preamble = 0
+ did_prep = 1
use_macros()
@@ -321,6 +328,12 @@
/^%build/, (!/^%build/ && $0 ~ SECTIONS) {
preamble = 0
+ if (did_prep == 0) {
+ print "%prep"
+ print ""
+ did_prep = 1
+ }
+
use_macros()
if (/^automake$/)
@@ -454,6 +467,7 @@
##########
/^%files/, (!/^%files/ && $0 ~ SECTIONS) {
preamble = 0
+ did_files = 1
if ($0 ~ /^%files/)
defattr = 1
@@ -625,6 +639,7 @@
print "######\t\t" "Unknown group!"
close(groups_file)
+ did_groups = 1
}
if (field ~ /prereq:/) {
@@ -642,8 +657,10 @@
next
}
- if (field ~ /buildroot:/)
+ if (field ~ /buildroot:/) {
$0 = $1 "%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
+ did_build_root = 1
+ }
# Use "License" instead of "Copyright" if it is (L)GPL or BSD
if (field ~ /copyright:/ && $2 ~ /GPL|BSD/) {
@@ -670,13 +687,11 @@
if ($2 == "%{release}" && release) {
$2 = release
}
+ sub(/%atrelease /, "0.", $0)
release = $2
release_seen = 1;
}
- if (field ~ /buildroot:/) {
- did_build_root = 1
- }
if (field ~ /serial:/)
$1 = "Epoch:"
@@ -847,9 +862,13 @@
}
if (did_build_root == 0) {
- print "BuildRoot:\t%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
+# print "BuildRoot:\t%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
did_build_root = 1
}
+ if (did_groups == 0) {
+# print "Group:\t\tunknown"
+ did_groups = 1
+ }
}
@@ -929,6 +948,8 @@
gsub(perl_sitelib, "%{perl_sitelib}")
gsub(py_sitescriptdir, "%{py_sitescriptdir}")
+ gsub("%{_libdir}/python2.4/site-packages", "%{py_sitedir}")
+ gsub(py_sitedir, "%{py_sitedir}")
gsub(py_scriptdir, "%{py_scriptdir}")
gsub(bindir, "%{_bindir}")
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/adapter.awk?r1=1.287&r2=1.288&f=u
More information about the pld-cvs-commit
mailing list