]> git.pld-linux.org Git - packages/rpm.git/blob - rpm.macros
- don't run remove-unneeded-elf-sections if don't exist/don't have right to run
[packages/rpm.git] / rpm.macros
1 #------------------------------------------------------------------------------
2 # The GNUconfigure macro does the following:
3 #       update config.guess and config.sub.
4 #       regenerate all autoconf/automake files
5 #       optionally change to a directory (make the directory if requested).
6 #       run configure with correct prefix, platform, and CFLAGS.
7 #       optionally restore current directory.
8 #
9 # Based on autogen.sh from GNOME and orginal GNUconfigure
10 #
11 %GNUconfigure(MCs:)      \
12   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
13   LDFLAGS="${LDFLAGS:-'%{-s:-s}'}"  ; export LDFLAGS; \
14   %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
15   dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
16     for coin in `echo ${dirs}` \
17 do \
18   dr=`dirname ${coin}`; \
19 if test -f ${dr}/NO-AUTO-GEN; then \
20  : \
21 else \
22      macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
23     ( cd ${dr}; \
24       aclocalinclude="${ACLOCAL_FLAGS}"; \
25       for k in ${macrodirs}; do \
26         if test -d ${k}; then \
27           aclocalinclude="${aclocalinclude} -I ${k}"; \
28         ##else \
29         ##  echo "**Warning**: No such directory \`${k}'.  Ignored." \
30         fi \
31       done \
32       if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
33         if grep "sed.*POTFILES" configure.in >/dev/null; then \
34           : do nothing -- we still have an old unmodified configure.in \
35         else \
36           test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
37           echo "no" | gettextize --force --copy; \
38           test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
39         fi \
40       fi \
41       if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
42         %{__libtoolize} --force --copy; \
43       fi \
44       aclocal ${aclocalinclude}; \
45       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
46         %{__autoheader}; \
47       fi \
48       echo "Running automake --gnu ${am_opt} ..."; \
49       %{__automake} --add-missing --gnu ${am_opt}; \
50       %{__autoconf}; \
51     ); \
52   fi \
53 done \
54   %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ; \
55   %{-C:cd ${_mydir}; unset _mydir}
56
57 #-----------------------------------------------------------------
58 %configure { \
59  LDFLAGS="${LDFLAGS}%{!?debug: -s}" ; export LDFLAGS ; \
60  CFLAGS="${CFLAGS:-%optflags}%{?debug: -g -O}" ; export CFLAGS ; \
61  CXXFLAGS="${CXXFLAGS:-%optflags}%{?debug: -g -O}" ; export CXXFLAGS ; \
62  FFLAGS="${FFLAGS:-%optflags}%{?debug: -g -O}" ; export FFLAGS ; \
63  unset LINGUAS || : ; \
64  ./configure %{_target_platform} \
65         --prefix=%{_prefix} \
66         --exec-prefix=%{_exec_prefix} \
67         --bindir=%{_bindir} \
68         --sbindir=%{_sbindir} \
69         --sysconfdir=%{_sysconfdir} \
70         --datadir=%{_datadir} \
71         --includedir=%{_includedir} \
72         --libdir=%{_libdir} \
73         --libexecdir=%{_libexecdir} \
74         --localstatedir=%{_localstatedir} \
75         --sharedstatedir=%{_sharedstatedir} \
76         --mandir=%{_mandir} \
77         --infodir=%{_infodir} }
78
79 # Location of autoconf macros
80 %_aclocaldir    %(aclocal --print-ac-dir)
81
82 # Fixed location of top applink dir
83 %_applnkdir      /usr/X11R6/share/applnk
84
85 # Current date
86 %date           %(LC_ALL="C" date +"%a %b %d %Y")
87
88 # tmp directory
89 %tmpdir         %(echo "${TMPDIR:-/tmp}")
90
91 # Example files, programs, scripts...
92 %_examplesdir   /usr/src/examples
93
94 # Find-requires and directories excluded from auto-req
95 %_noautoreqdir          %{_defaultdocdir} %{_examplesdir}
96 %_noautoreqdep          %{nil}
97 #%__find_requires_pre   /usr/lib/rpm/find-requires-pre %{_noautoreqdir}
98 #%__find_requires_core  /usr/lib/rpm/find-requires
99 #%__find_requires_post  /usr/lib/rpm/find-requires-post
100 #%__find_requires       %{__find_requires_pre} | %{__find_requires_core} | %{__find_requires_post}
101
102 # If non-empty "debug" macro defined, add "dbg" suffix to release number
103 %_rpmfilename           %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
104
105 # remove .comment and .note from ELFs 
106 %__spec_install_post   %{?debug:#}if [ -x /usr/lib/rpm/remove-unneeded-elf-sections ] ; then /usr/lib/rpm/remove-unneeded-elf-sections %{buildroot}; fi
This page took 0.034605 seconds and 4 git commands to generate.