--- /dev/null
+# Overwrite RPM macros with PLD specific one here.
+
+%_defaultdocdir %{_usr}/share/doc
+
+%_tmppath %(echo "${TMPDIR:-/tmp}")
+%tmpdir %{_tmppath}
+
+%_topdir %(echo $HOME)/rpm
+
+%buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
+
+%_source_payload w9.gzdio
+%_binary_payload w9.lzdio
+
+%_rpmfc_magic_path /usr/share/file/magic
+
+%_libexecdir %{_exec_prefix}/lib
+%_sysconfdir /etc
+%_sharedstatedir /var/lib
+%_localstatedir /var
+
+
+%_infodir %{_prefix}/share/info
+%_mandir %{_prefix}/share/man
+
+%undefine __scriptlet_requires
+
+%_enable_debug_packages 1
+
+# provides don't obsolete
+%_upgrade_tag name
+
+#-----------------------------------------------------------------
+# CFLAGS and LDFLAGS used to build
+
+%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-2 -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
+# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
+
+%debugcflags -O0 -g -Wall
+%optldflags -Wl,--as-needed
+
+# Warning: those macros are overwritten by macros.build,
+# left here for compatibility
+%rpmcflags %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
+%rpmcxxflags %{rpmcflags}
+%rpmldflags %{!?no_build_with_as_needed:-Wl,--as-needed}
+
+# arch macros
+%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
+%x8664 x86_64 amd64 ia32e
+%ppc ppc ppc7400 ppc7450
+