3 # This is adapter v0.27. Adapter adapts .spec files for PLD.
5 # Copyright (C) 1999-2003 PLD-Team <feedback@pld-linux.org>
7 # Micha³ Kuratczyk <kura@pld.org.pl>
8 # Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
9 # Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
10 # Artur Frysiak <wiget@pld-linux.org>
11 # Michal Kochanowicz <mkochano@pld.org.pl>
12 # Elan Ruusamäe <glen@pld-linux.org>
13 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
16 # - parse ../PLD-doc/BuildRequires.txt and setup proper BR epoches?
17 # - add "-nc" option to skip CVS interaction
19 # - sort Requires, BuildRequires
22 preamble = 1 # Is it part of preamble? Default - yes
23 boc = 4 # Beggining of %changelog
24 bod = 0 # Beggining of %description
25 tw = 70 # Descriptions width
27 b_idx = 0 # index of BR/R arrays
29 # If variable removed, then 1 (for removing it from export)
30 removed["LDFLAGS"] = 0
32 removed["CXXFLAGS"] = 0
34 # If 1, we are inside of comment block (started with /^#%/)
37 # File with rpm groups
38 "rpm --eval %_sourcedir" | getline groups_file
39 groups_file = groups_file "/rpm.groups"
40 system("cd `rpm --eval %_sourcedir`; cvs up rpm.groups >/dev/null")
42 # Temporary file for changelog section
43 changelog_file = ENVIRON["HOME"] "/tmp/adapter.changelog"
46 "rpm --eval %_prefix" | getline prefix
47 "rpm --eval %_bindir" | getline bindir
48 "rpm --eval %_sbindir" | getline sbindir
49 "rpm --eval %_libdir" | getline libdir
50 "rpm --eval %_sysconfdir" | getline sysconfdir
51 "rpm --eval %_datadir" | getline datadir
52 "rpm --eval %_includedir" | getline includedir
53 "rpm --eval %_mandir" | getline mandir
54 "rpm --eval %_infodir" | getline infodir
55 "rpm --eval %_examplesdir" | getline examplesdir
57 "rpm --eval %perl_sitearch" | getline perl_sitearch
58 "rpm --eval %perl_archlib" | getline perl_archlib
59 "rpm --eval %perl_privlib" | getline perl_privlib
60 "rpm --eval %perl_vendorlib" | getline perl_vendorlib
61 "rpm --eval %perl_vendorarch" | getline perl_vendorarch
62 "rpm --eval %perl_sitelib" | getline perl_sitelib
64 "rpm --eval %py_sitescriptdir" | getline py_sitescriptdir
67 # There should be a comment with CVS keywords on the first line of file.
69 if (!/# \$Revision:/) # If this line is already OK?
70 print "# $" "Revision:$, " "$" "Date:$" # No
73 next # It is enough for first line
77 # If the latest line matched /%files/
79 if ($0 !~ /defattr/) # If no %defattr
80 print "%defattr(644,root,root,755)" # Add it
82 $0 = "%defattr(644,root,root,755)" # Correct mistakes (if any)
86 function b_makekey(a, b, s) {
89 gsub("%{\\?[_a-zA-Z0-9]+:", "", s);
96 # - mixing BR/R and anything else confuses this (all will be sorted together)
98 # - comments leading the BR/R can not be associated,
99 # so don't adapterize when the BR/R are mixed with comments
100 ENVIRON["SORTBR"] == 1 && preamble == 1 && /(Build)?Requires/, /(Build)?Requires/ { # && !/^%/) {
102 b_ktmp = b_makekey($1, $2);
103 b_key[b_idx] = b_ktmp;
112 for (i = 1; i <= b_idx; i++) {
113 print "" b_val[b_key[i]];
120 /^#/ && (description == 0) {
121 if (/This file does not like to be adapterized!/) {
122 print # print this message
123 while (getline) # print the rest of spec as it is
125 do_not_touch_anything = 1 # do not touch anything in END()
129 # Generally, comments are printed without touching
135 # Remove defining _applnkdir (this macro has been included in rpm-3.0.4)
137 if ($2 == "_applnkdir")
144 /^%include.*\/usr\/lib\/rpm\/macros\.python$/ {
151 /^%description/, (/^%[a-z]+/ && !/^%description/ && !/^%((end)?if|else)/) {
154 if (/^%description/) {
161 if (description == 1 && !/^%[a-z]+/ && !/^%description/) {
163 format_flush(format_line, format_indent)
167 } else if (/^[ \t]*[-\*][ \t]*/) {
168 format_flush(format_line, format_indent)
170 format_indent = RLENGTH
171 match($0, /^[ \t]*[-\*][ \t]/)
172 format_line = substr($0, RLENGTH)
174 format_line = format_line " " $0
178 if (/^%[a-z]+/ && (!/^%description/ || bod == 2)) {
179 if (NF > 3 && $2 == "-l") {
181 for (i = 4; i <= NF; i++)
185 format_flush(format_line, format_indent)
200 /^%prep/, (/^%[a-z]+$/ && !/^%prep/ && !/^%((end)?if|else)/) {
206 if (/^%setup/ && !/-q/) {
207 sub(/^%setup/, "%setup -q")
211 gsub(name, "%{name}");
212 gsub(version, "%{version}");
215 if (/^%setup/ && /-n %{name}-%{version}( |$)/) {
216 sub(/ -n %{name}-%{version}/, "")
220 sub("^rm -rf \$RPM_BUILD_ROOT.*", "");
226 /^%build/, (/^%[a-z]+$/ && !/^%build/ && !/^%((end)?if|else)/) {
235 if (/LDFLAGS="-s"/) {
236 removed["LDFLAGS"] = 1
239 split($0, tmp, "LDFLAGS=")
240 count = split(tmp[2], flags, "\"")
241 if (flags[1] != "" && flags[1] !~ "!?debug") {
242 sub(/-s[" ]?/, "%{rpmldflags} ", flags[1])
243 $0 = tmp[1] line[1] "LDFLAGS=" flags[1] "\""
244 for (i = 2; i < count; i++)
245 $0 = $0 flags[i] "\""
251 if (cflags("CFLAGS") == 0)
255 if (cflags("CXXFLAGS") == 0)
259 if (removed["LDFLAGS"])
261 if (removed["CFLAGS"])
263 if (removed["CXXFLAGS"])
265 # Is there still something?
275 /^%clean/, (/^%[a-z]+$/ && !/^%clean/ && !/^%((end)?if|else)/) {
283 /^%install/, (/^%[a-z]+$/ && !/^%install/ && !/^%((end)?if|else)/) {
287 if (/^[ \t]*rm([ \t]+-[rf]+)*[ \t]+\${?RPM_BUILD_ROOT}?/ && did_rmroot==0) {
289 print "rm -rf $RPM_BUILD_ROOT"
293 if (!/^(#?[ \t]*)$/ && !/^%install/ && did_rmroot==0) {
294 print "rm -rf $RPM_BUILD_ROOT"
300 # 'install -d' instead 'mkdir -p'
302 sub(/mkdir -p/, "install -d")
304 # 'install' instead 'cp -p'
306 sub(/cp -p/, "install")
308 # No '-u root' or '-g root' for 'install'
309 if (/^install/ && /-[ug][ \t]*root/)
310 gsub(/-[ug][ \t]*root /, "")
312 if (/^install/ && /-m[ \t]*[0-9]+/)
313 gsub(/-m[ \t]*[0-9]+ /, "")
315 # No lines contain 'chown' or 'chgrp' if owner/group is 'root'
316 if (($1 ~ /chown/ && $2 ~ /root\.root/) || ($1 ~ /chgrp/ && $2 ~ /root/))
319 # No lines contain 'chmod' if it sets the modes to '644'
320 if ($1 ~ /chmod/ && $2 ~ /644/)
327 /^%files/, (/^%[a-z \-]+$/ && !/^%files/ && !/^%((end)?if|else)/) {
340 /^%changelog/, (/^%[a-z]+$/ && !/^%changelog/) {
344 # There should be some CVS keywords on the first line of %changelog.
347 print "* %{date} PLD Team <feedback@pld-linux.org>" > changelog_file
352 if (boc == 2 && !skip) {
353 if (!/All persons listed below/) {
354 printf "All persons listed below can be reached at " > changelog_file
355 print "<cvs_login>@pld-linux.org\n" > changelog_file
360 if (boc == 1 && !skip) {
363 print "$" "Log:$" > changelog_file
370 printf "%%define date\t%%(echo `LC_ALL=\"C\"" > changelog_file
371 print " date +\"%a %b %d %Y\"`)" > changelog_file
378 if (!/^%[a-z]+$/ || /changelog/)
379 print > changelog_file
388 /^%pre/, (/^%[a-z]+$/ && !/^%pre/) {
391 /^%post/, (/^%[a-z]+$/ && !/^%post/) {
394 /^%preun/, (/^%[a-z]+$/ && !/^%preun/) {
397 /^%postun/, (/^%[a-z]+$/ && !/^%postun/) {
400 /^%triggerin/, (/^%[a-z]+$/ && !/^%triggerin/) {
403 /^%triggerun/, (/^%[a-z]+$/ && !/^%triggerun/) {
406 /^%triggerpostun/, (/^%[a-z]+$/ && !/^%triggerpostun/) {
409 /^%pretrans/, (/^%[a-z]+$/ && !/^%pretrans/) {
412 /^%posttrans/, (/^%[a-z]+$/ && !/^%posttrans/) {
420 # There should not be a space after the name of field
421 # and before the colon.
424 if (/^%perl_module_wo_prefix/) {
427 release = "0." fixedsub(".%{disttag}.at", "", $4)
432 if (field ~ /group(\([^)]+\)):/)
434 if (field ~ /group:/) {
436 sub(/^Utilities\//,"Applications/",$2)
437 sub(/^Games/,"Applications/Games",$2)
438 sub(/^X11\/Games/,"X11/Applications/Games",$2)
439 sub(/^X11\/GNOME\/Development\/Libraries/,"X11/Development/Libraries",$2)
440 sub(/^X11\/GNOME\/Applications/,"X11/Applications",$2)
441 sub(/^X11\/GNOME/,"X11/Applications",$2)
442 sub(/^X11\/Utilities/,"X11/Applications",$2)
443 sub(/^X11\/Games\/Strategy/,"X11/Applications/Games/Strategy",$2)
444 sub(/^Shells/,"Applications/Shells",$2)
446 sub(/^[^ \t]*[ \t]*/,"")
449 print "Group:\t\t" Grupa
450 if (Grupa ~ /^X11/ && x11 == 0) # Is it X11 application?
453 byl_plik_z_grupami = 0
455 while ((getline linia_grup < groups_file) > 0) {
456 byl_plik_z_grupami = 1
457 if (linia_grup == Grupa) {
463 if (!byl_plik_z_grupami)
464 print "######\t\t" groups_file ": no such file"
465 else if (!byl_opis_grupy)
466 print "######\t\t" "Unknown group!"
472 if (field ~ /prereq:/) {
474 $(NF + 1) = " # FIXME add Requires(scriptlet) -adapter.awk"
477 if (field ~ /packager:|distribution:|docdir:|prefix:/)
480 if (field ~ /buildroot:/)
481 $0 = $1 "%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
483 # Use "License" instead of "Copyright" if it is (L)GPL or BSD
484 if (field ~ /copyright:/ && $2 ~ /GPL|BSD/)
487 if (field ~ /name:/) {
492 if (field ~ /version:/) {
497 if (field ~ /release:/) {
502 if (field ~ /serial:/)
505 # Use %{name} and %{version} in the filenames in "Source:"
506 if (field ~ /^source/ || field ~ /patch/) {
507 n = split($2, url, /\//)
508 if (url[n] ~ /\.gz$/) {
509 url[n+1] = ".gz" url[n+1]
510 sub(/\.gz$/,"",url[n])
512 if (url[n] ~ /\.zip$/) {
513 url[n+1] = ".zip" url[n+1]
514 sub(/\.zip$/,"",url[n])
516 if (url[n] ~ /\.tar$/) {
517 url[n+1] = ".tar" url[n+1]
518 sub(/\.tar$/,"",url[n])
520 if (url[n] ~ /\.patch$/) {
521 url[n+1] = ".patch" url[n+1]
522 sub(/\.patch$/,"",url[n])
524 if (url[n] ~ /\.bz2$/) {
525 url[n+1] = ".bz2" url[n+1]
526 sub(/\.bz2$/,"",url[n])
528 if (url[n] ~ /\.logrotate$/) {
529 url[n+1] = ".logrotate" url[n+1]
530 sub(/\.logrotate$/,"",url[n])
532 if (url[n] ~ /\.pamd$/) {
533 url[n+1] = ".pamd" url[n+1]
534 sub(/\.pamd$/,"",url[n])
537 # allow %{name} just in last url component
539 for (i = 1; i <= n; i++) {
540 url[i] = fixedsub("%{name}", name, url[i])
551 url[n] = fixedsub(name, "%{name}", url[n])
553 if (field ~ /source/) {
555 url[n] = fixedsub(version, "%{version}", url[n])
558 url[n] = fixedsub(_beta, "%{_beta}", url[n])
561 url[n] = fixedsub(_rc, "%{_rc}", url[n])
564 url[n] = fixedsub(_snap, "%{_snap}", url[n])
567 $2 = fixedsub(filename, url[n], $2)
570 sub("[?]use_mirror=.*$", "", $2);
571 sub("[?]download$", "", $2);
572 sub("^http://prdownloads\.sourceforge\.net/", "http://dl.sourceforge.net/", $2)
574 sub("^http://.*\.dl\.sourceforge\.net/", "http://dl.sourceforge.net/", $2)
575 sub("^http://dl\.sourceforge\.net/sourceforge/", "http://dl.sourceforge.net/", $2)
579 if (field ~ /^source:/)
582 if (field ~ /patch:/)
587 if ($1 ~ /%define/) {
588 # Do not add %define of _prefix if it already is.
589 if ($2 ~ /^_prefix/) {
590 sub("^"prefix, $3, bindir)
591 sub("^"prefix, $3, sbindir)
592 sub("^"prefix, $3, libdir)
593 sub("^"prefix, $3, datadir)
594 sub("^"prefix, $3, includedir)
597 if ($2 ~ /_bindir/ && !/_sbindir/)
603 if ($2 ~ /_sysconfdir/ && $3 !~ /^%\(/)
607 if ($2 ~ /_includedir/)
622 if (field ~ /requires/) {
624 $0 = fixedsub("%{eversion}", "%{epoch}:%{version}-%{release}", $0);
635 if (name_seen == 0 && name) {
640 if (version_seen == 0 && version) {
641 print "Version:\t" version
645 if (release_seen == 0 && release) {
646 print "Release:\t" release
653 if (do_not_touch_anything)
656 close(changelog_file)
657 while ((getline < changelog_file) > 0)
659 system("rm -f " changelog_file)
663 if (did_clean == 0) {
666 print "rm -rf $RPM_BUILD_ROOT"
671 print "%define date\t%(echo `LC_ALL=\"C\" date +\"%a %b %d %Y\"`)"
674 if (has_changelog == 0)
678 print "* %{date} PLD Team <feedback@pld-linux.org>"
680 printf "All persons listed below can be reached at "
681 print "<cvs_login>@pld-linux.org\n"
687 function fixedsub(s1,s2,t, ind) {
688 # substitutes fixed strings (not regexps)
689 if (ind = index(t,s1))
690 t = substr(t, 1, ind-1) s2 substr(t, ind+length(s1))
694 # There should be one or two tabs after the colon.
695 function format_preamble()
698 if (match($0, /[A-Za-z0-9(),#_ \t]+[ \t]*:[ \t]*/) == 1) {
706 # Replace directly specified directories with macros
707 function use_macros()
709 gsub(perl_sitearch, "%{perl_sitearch}")
710 gsub(perl_archlib, "%{perl_archlib}")
711 gsub(perl_privlib, "%{perl_privlib}")
712 gsub(perl_vendorlib, "%{perl_vendorlib}")
713 gsub(perl_vendorarch, "%{perl_vendorarch}")
714 gsub(perl_sitelib, "%{perl_sitelib}")
716 gsub(py_sitescriptdir, "%{py_sitescriptdir}")
718 gsub(bindir, "%{_bindir}")
719 gsub("%{prefix}/bin", "%{_bindir}")
720 if(prefix"/bin" == bindir)
721 gsub("%{_prefix}/bin", "%{_bindir}")
723 for (c = 1; c <= NF; c++) {
724 if ($c ~ sbindir "/fix-info-dir")
726 gsub(sbindir, "%{_sbindir}", $c)
729 gsub("%{prefix}/sbin", "%{_sbindir}")
730 if (prefix"/sbin" == sbindir)
731 gsub("%{_prefix}/sbin", "%{_sbindir}")
733 for (c = 1; c <= NF; c++) {
734 if ($c ~ sysconfdir "/{?cron.")
736 if ($c ~ sysconfdir "/{?crontab.d")
738 if ($c ~ sysconfdir "/{?logrotate.d")
740 if ($c ~ sysconfdir "/{?pam.d")
742 if ($c ~ sysconfdir "/{?profile.d")
744 if ($c ~ sysconfdir "/{?rc.d")
746 if ($c ~ sysconfdir "/{?security")
748 if ($c ~ sysconfdir "/{?skel")
750 if ($c ~ sysconfdir "/{?sysconfig")
752 if ($c ~ sysconfdir "/{?certs")
754 gsub(sysconfdir, "%{_sysconfdir}", $c)
757 for (c = 1; c <= NF; c++) {
758 if ($c ~ datadir "/automake")
760 if ($c ~ datadir "/unsermake")
762 gsub(datadir, "%{_datadir}", $c)
766 gsub("%{prefix}/share", "%{_datadir}")
767 if (prefix"/share" == datadir)
768 gsub("%{_prefix}/share", "%{_datadir}")
770 gsub(includedir, "%{_includedir}")
771 gsub("%{prefix}/include", "%{_includedir}")
772 if (prefix"/include" == includedir)
773 gsub("%{_prefix}/include", "%{_includedir}")
775 gsub(mandir, "%{_mandir}")
776 if ($0 !~ "%{_datadir}/manual")
777 gsub("%{_datadir}/man", "%{_mandir}")
778 gsub("%{_prefix}/share/man", "%{_mandir}")
779 gsub("%{prefix}/share/man", "%{_mandir}")
780 gsub("%{prefix}/man", "%{_mandir}")
781 gsub("%{_prefix}/man", "%{_mandir}")
783 gsub(infodir, "%{_infodir}")
784 gsub("%{prefix}/info", "%{_infodir}")
785 gsub("%{_prefix}/info", "%{_infodir}")
787 if (prefix !~ "/X11R6") {
788 gsub("%{_datadir}/aclocal", "%{_aclocaldir}")
791 gsub(examplesdir, "%{_examplesdir}")
794 for (c = 1; c <= NF; c++) {
795 if ($c ~ prefix "/sbin/fix-info-dir")
797 if ($c ~ prefix "/share/automake")
799 if ($c ~ prefix "/share/unsermake")
801 gsub(prefix, "%{_prefix}", $c)
803 gsub("%{prefix}", "%{_prefix}")
806 gsub("%{PACKAGE_VERSION}", "%{version}")
807 gsub("%{PACKAGE_NAME}", "%{name}")
809 # we can move files between the dirs below
810 if ($0 !~ "%{_applnkdir}") {
811 gsub("%{_datadir}/gnome/apps", "%{_applnkdir}")
814 gsub("^make$", "%{__make}")
815 gsub("^make ", "%{__make} ")
818 gsub("^%make$", "%{__make}")
819 gsub("^%make ", "%{__make} ")
820 gsub("^%makeinstall_std", "%{__make} install \\\n\tDESTDIR=$RPM_BUILD_ROOT")
821 gsub("^%{__rm} -rf %{buildroot}", "rm -rf $RPM_BUILD_ROOT")
822 gsub("%optflags", "%{rpmcflags}")
823 gsub("%{compat_perl_vendorarch}", "%{perl_vendorarch}")
825 gsub("^%{__make} install DESTDIR=\$RPM_BUILD_ROOT", "%{__make} install \\\n\tDESTDIR=$RPM_BUILD_ROOT")
826 gsub("^fix-info-dir$", "[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>\&1")
827 gsub("%buildroot", "$RPM_BUILD_ROOT")
828 gsub("%_bindir", "%{_bindir}")
829 gsub("%_datadir", "%{_datadir}")
830 gsub("%_iconsdir", "%{_iconsdir}")
832 gsub("/usr/src/linux", "%{_kernelsrcdir}")
833 gsub("%{_prefix}/src/linux", "%{_kernelsrcdir}")
837 # insertion sort of A[1..n]
838 # copied from mawk manual
839 function isort(A,n, i,j,hold) {
840 for (i = 2; i <= n; i++) {
842 while (A[j-1] > hold) {
847 # sentinel A[0] = "" will be created if needed
851 function use_files_macros( i, n, t, a)
853 gsub("^%{_sbindir}", "%attr(755,root,root) %{_sbindir}")
854 gsub("^%{_bindir}", "%attr(755,root,root) %{_bindir}")
857 gsub("%{_sysconfdir}/cron\.d", "/etc/cron.d")
858 gsub("%{_sysconfdir}/crontab\.d", "/etc/cron.d")
859 gsub("%{_sysconfdir}/logrotate\.d", "/etc/logrotate.d")
860 gsub("%{_sysconfdir}/pam\.d", "/etc/pam.d")
861 gsub("%{_sysconfdir}/profile\.d", "/etc/profile.d")
862 gsub("%{_sysconfdir}/rc\.d", "/etc/rc.d")
863 gsub("%{_sysconfdir}/security", "/etc/security")
864 gsub("%{_sysconfdir}/skel", "/etc/skel")
865 gsub("%{_sysconfdir}/sysconfig", "/etc/sysconfig")
866 gsub("%{_sysconfdir}/certs", "/etc/certs")
867 gsub("%{_sysconfdir}/init.d", "/etc/init.d")
869 # /etc/init.d -> /etc/rc.d/init.d
870 if (!/^\/etc\/init\.d$/) {
871 gsub("/etc/init.d", "/etc/rc.d/init.d")
874 if (/\/etc\/rc\.d\/init\.d\// && !/functions/) {
875 if (!/%attr.*\/etc\/rc\.d\/init\.d/) {
876 $0 = "%attr(754,root,root) " $0
878 if (/^%attr.*\/etc\/rc\.d\/init\.d/ && !/^%attr\(754 *,/) {
879 gsub("^%attr\\(... *,", "%attr(754,");
883 if (/lib.+\.so/ && !/^%attr.*/) {
884 $0 = "%attr(755,root,root) " $0
887 # /etc/sysconfig files
888 # %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
889 # attr not required, allow default 644 attr
890 if (!/network-scripts/) {
891 if (/\/etc\/sysconfig\// && /%config/ && !/%config\(noreplace\)/) {
892 gsub("%config", "%config(noreplace)")
895 if (/\/etc\/sysconfig\// && !/%config\(noreplace\)/) {
896 $NF = "%config(noreplace) " $NF
899 if (/\/etc\/sysconfig\// && /%attr\(755/) {
900 gsub("^%attr\\(... *,", "%attr(640,");
903 if (/\/etc\/sysconfig\// && !/%verify/) {
904 gsub("/etc/sysconfig", "%verify(not size mtime md5) /etc/sysconfig");
910 gsub("%attr\\(0", "%attr(")
913 if (match($0, /%verify\(not([^)]+)\)/)) {
914 t = substr($0, RSTART, RLENGTH)
915 gsub(/^%verify\(not |\)$/, "", t)
920 for (i = 1 ; i <= n; i++) {
925 gsub(/%verify\(not[^)]+\)/, s)
933 function fill(ch, n, i) {
934 for (i = 0; i < n; i++)
938 function format_flush(line, indent, newline, word, first_word) {
940 if (format_indent == -1)
943 newline = fill(" ", format_indent) "- "
945 while (match(line, /[^\t ]+/)) {
946 word = substr(line, RSTART, RLENGTH)
947 if (length(newline) + length(word) + 1 > tw) {
950 if (format_indent == -1)
953 newline = fill(" ", format_indent + 2)
958 newline = newline word
961 newline = newline " " word
963 line = substr(line, RSTART + RLENGTH)
965 if (newline ~ /[^\t ]/) {
972 if ($0 == var "=\"$RPM_OPT_FLAGS\"") {
978 sub("\$RPM_OPT_FLAGS", "%{rpmcflags}")