# %package part
/^%package/, (!/^%package/ && $0 ~ SECTIONS) {
+ # FIXME: this breaks \t indenting in preamble?
gsub(/\t/, " ")
}
$1 = "Requires:"
}
+ # deprecated. such deps are autogenerated in rpm5
+ if ($0 == "%{?ruby_mod_ver_requires_eq}") {
+ next
+ }
+
# F<16 had requires(hint)
if (/^Requires\(hint\):/) {
$1 = "Suggests:"
$0 = format_requires($1, value)
}
- # BR: tar (and others) is to common (rpm-build requires it)
+ # BR: tar (and others) are too common (rpm-build requires it)
if (field == "buildrequires:") {
l = substr($0, index($0, $2))
if (l == "awk" ||
if ($1 == "R:" ) {
$1 = "Requires:"
}
+ common_macros()
format_preamble()
# kill_preamble_macros(); # breaks tabbing
}
}
+# replace common macros
+function common_macros() {
+ gsub(/%name/, "%{name}")
+ gsub(/%version/, "%{version}")
+ gsub(/%release/, "%{release}")
+ gsub(/%epoch/, "%{epoch}")
+ gsub(/%_sysconfdir/, "%{_sysconfdir}")
+ gsub(/%_unitdir/, "%{systemdunitdir}")
+ gsub(/%_initdir/, "/etc/rc.d/init.d")
+ gsub(/%_man1dir/, "%{_mandir}/man1")
+ gsub(/%_man2dir/, "%{_mandir}/man2")
+ gsub(/%_man3dir/, "%{_mandir}/man3")
+ gsub(/%_man5dir/, "%{_mandir}/man5")
+ gsub(/%_man8dir/, "%{_mandir}/man8")
+
+}
+
# There should be one or two tabs after the colon.
function format_preamble()
{
return
}
+ common_macros()
+
sub("%{_defaultdocdir}", "%{_docdir}")
sub("%{_datadir}/doc", "%{_docdir}")
sub("%{_bindir}/perl", "%{__perl}")
group = replace(group, "System Tools", "Applications/System")
group = replace(group, "System", "Base")
group = replace(group, "System/Base", "Base")
+ group = replace(group, "System/Configuration/Networking", "Applications/Networking")
group = replace(group, "System/Kernel and hardware", "Base/Kernel")
group = replace(group, "System/Libraries", "Libraries")
group = replace(group, "System/Servers", "Daemons")
# bad package.xml, see http://pear.php.net/bugs/bug.php?id=17779
sub(/^php-php-gtk/, "php-gtk2", $2)
+ sub(/^rake/, "ruby-rake", $2)
+
# {{{ jpackages / fedora java packages
sub(/^antlr3$/, "java-antlr3", $2)
sub(/^aqute-bnd$/, "java-bnd", $2)