mod_name = $3
if ($2 ~ /^_?pearname$/)
pearname = $3
+ if ($2 ~ /^_class$/)
+ pear_class = $3
+ if ($2 ~ /^_subclass$/)
+ pear_subclass = $3
+
+ # kill the _class and _subclass pear macros
+ if ($2 == "_pearname" || $2 == "pearname") {
+ if (pear_class) {
+ gsub("%{_class}", pear_class, $3);
+ }
+ if (pear_subclass) {
+ gsub("%{_subclass}", pear_subclass, $3);
+ }
+ }
sub(/[ \t]+$/, "");
# do nothing further, otherwise adapter thinks we're at preamble
$1 = "Suggests:"
}
- if ($3 == "==") {
+ if ($3 == "==" && $1 !~ /%/) {
$3 = "="
}
gsub("%{_libdir}/pkgconfig", "%{_pkgconfigdir}")
gsub(pkgconfigdir, "%{_pkgconfigdir}")
+ gsub("%{_datadir}/pkgconfig", "%{_npkgconfigdir}")
+ gsub(npkgconfigdir, "%{_npkgconfigdir}")
+
gsub(libdir, "%{_libdir}")
gsub(javadir, "%{_javadir}")
$0 = fixedsub("%(%{__cc} -dumpversion)", "%{cc_version}", $0);
$0 = fixedsub("%(%{__cxx} -dumpversion)", "%{cxx_version}", $0);
+
+ # kill the _class and _subclass pear macros
+ if (pear_class) {
+ gsub("%{_class}", pear_class);
+ }
+ if (pear_subclass) {
+ gsub("%{_subclass}", pear_subclass);
+ }
+
}
function format_configure(line, n, a, s) {
}
}
- if (/lib.+\.so/ && !/\.so$/ && !/^%attr.*/ && !/%exclude/) {
+ if (/lib.+\.so\b/ && !/\.so$/ && !/^%attr.*/ && !/%exclude/) {
$0 = "%attr(755,root,root) " $0
}
# sourceforge urls
# Docs about sourceforge mirror system: http://sourceforge.net/apps/trac/sourceforge/wiki/Mirrors
+ # TODO: SF unify: http://downloads.sourceforge.net/PROJECT/TARBALL
+
+ # 1. unify domains
sub("^http://prdownloads\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
sub("^http://download\.sf\.net/", "http://downloads.sourceforge.net/", url)
sub("^http://download\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
sub("^http://.*\.dl\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
sub("^http://dl\.sf\.net/", "http://downloads.sourceforge.net/", url)
sub("^http://downloads\.sourceforge\.net/sourceforge/", "http://downloads.sourceforge.net/", url)
+
+ # 2. special hacks
# new style urls, strip "files/" between and prepend dl.
if (match(url, "^http://sourceforge.net/projects/[^/]+/files/")) {
url = substr(url, 1, RLENGTH - length("files/")) substr(url, RSTART + RLENGTH);
sub("^http://sourceforge.net/projects/", "http://downloads.sourceforge.net/project/", url);
}
+
+ # 3. unify urls
if (url ~ /sourceforge.net/) {
sub("[?&]big_mirror=.*$", "", url);
sub("[?&]modtime=.*$", "", url);
exit(rc = 1);
}
- if (!ENVIRON["ADAPTER_REVISION"] || ENVIRON["ADAPTER_REVISION"] < 1.44) {
+ if (!ENVIRON["ADAPTER_REVISION"] || ENVIRON["ADAPTER_REVISION"] < 1.46) {
print "adapter shell script is outdated, please cvs up it" > "/dev/stderr"
do_not_touch_anything = 1
exit(rc = 1);
pixmapsdir = ENVIRON["_pixmapsdir"]
javadir = ENVIRON["_javadir"]
pkgconfigdir = ENVIRON["_pkgconfigdir"]
+ npkgconfigdir = ENVIRON["_npkgconfigdir"]
perl_sitearch = ENVIRON["perl_sitearch"]
perl_archlib = ENVIRON["perl_archlib"]
# fedora / redhat
sub(/^Django$/, "python-django", $2);
sub(/^GitPython$/, "python-git", $2);
- sub(/^freetype2-devel$/, "freetype-devel", $2);
+ sub(/^PyQt4-devel$/, "python-PyQt4-devel", $2);
+ sub(/^PyQwt-devel$/, "python-PyQwt-devel", $2);
sub(/^chkconfig$/, "/sbin/chkconfig", $2);
sub(/^db4-devel$/, "db-devel", $2);
sub(/^dbus-python$/, "python-dbus", $2);
sub(/^file-devel$/, "libmagic-devel", $2);
+ sub(/^freetype2-devel$/, "freetype-devel", $2);
sub(/^fuse-devel$/, "libfuse-devel", $2);
sub(/^gamin-python$/, "python-gamin", $2);
sub(/^gcc-c\+\+$/, "libstdc++-devel", $2);
sub(/^gnome-python2-extras$/, "python-gnome-extras", $2);
sub(/^gnome-python2-gtkspell$/, "python-gnome-extras-gtkspell", $2);
+ sub(/^gtk-sharp2-devel$/, "dotnet-gtk-sharp2-devel", $2);
sub(/^gtk2$/, "gtk+2", $2);
sub(/^gtk2-devel$/, "gtk+2-devel", $2);
sub(/^initscripts$/, "rc-scripts", $2);
+ sub(/^iproute$/, "iproute2", $2);
sub(/^iscsi-initiator-utils$/, "open-iscsi", $2);
sub(/^libXft-devel$/, "xorg-lib-libXft-devel", $2);
sub(/^libXrandr-devel$/, "xorg-lib-libXrandr-devel", $2);
+ sub(/^libcurl-devel$/, "curl-devel", $2);
sub(/^mod_wsgi$/, "apache-mod_wsgi", $2);
sub(/^notify-python$/, "python-pynotify", $2);
+ sub(/^pulseaudio-libs-devel$/, "pulseaudio-devel", $2);
sub(/^pyOpenSSL$/, "python-pyOpenSSL", $2);
sub(/^pygobject2$/, "python-pygobject", $2);
sub(/^pygtk2$/, "python-pygtk", $2);
sub(/^python-imaging$/, "python-PIL", $2);
sub(/^python-imaging-tk$/, "python-PIL-tk", $2);
sub(/^python-pygtk$/, "python-pygtk-gtk", $2);
+ sub(/^python-twisted-core$/, "python-TwistedCore", $2);
+ sub(/^python-twisted-names$/, "python-TwistedNames", $2);
sub(/^python2-devel$/, "python-devel", $2);
sub(/^qt4-devel$/, "qt4-build", $2);
+ sub(/^qt4-webkit-devel$/, "QtWebKit-devel", $2);
sub(/^qtlockedfile-devel$/, "QtLockedFile-devel", $2);
+ sub(/^rpm-python$/, "python-rpm", $2);
+ sub(/^sip-devel$/, "python-sip-devel", $2);
sub(/^tftp-server$/, "tftpdaemon", $2);
sub(/^tkinter$/, "python-tkinter", $2);
sub(/^xapian-bindings-python$/, "python-xapian", $2);
group = replace(group, "Applications/Internet", "Applications/Networking");
group = replace(group, "Applications/Internet/Peer to Peer", "Applications/Networking");
group = replace(group, "Applications/Productivity", "X11/Applications");
+ group = replace(group, "Applications/Security", "Applications/System");
group = replace(group, "Applications/Web", "Applications/WWW");
group = replace(group, "Database", "Applications/Databases");
group = replace(group, "Development/C", "Development/Libraries");
group = replace(group, "Games", "Applications/Games");
group = replace(group, "Library/Development", "Development/Libraries");
group = replace(group, "Networking/Deamons", "Networking/Daemons");
+ group = replace(group, "Networking/Other", "Networking");
group = replace(group, "Productivity/Databases/Servers", "Applications/Databases");
group = replace(group, "Productivity/Multimedia/Other", "X11/Applications/Multimedia");
group = replace(group, "Productivity/Networking/Web/Servers", "Networking/Daemons/HTTP");;