1 %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires: %%{NAME} = %%{VERSION}' %1|grep -v "is not")
2 %perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
3 %perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)
4 # %%requires_pkg macro is obsoletes. Use %%requires_eq instead
5 #%requires_pkg() %(LC_ALL="C" rpm -q --queryformat 'Requires: %%{NAME} = %%{VERSION}' %1|grep -v "is not")
7 #------------------------------------------------------------------------------
8 # The GNUconfigure macro does the following:
9 # update config.guess and config.sub.
10 # regenerate all autoconf/automake files
11 # optionally change to a directory (make the directory if requested).
12 # run configure with correct prefix, platform, and CFLAGS.
13 # optionally restore current directory.
15 # Based on autogen.sh from GNOME and orginal GNUconfigure
18 %{-C:_mydir="`pwd`"; %{-M; %{__mkdirp} %{-C*};} cd %{-C*}} \
19 for coin in `find ${_mydir} -name configure.in -print` \
21 dr=`dirname ${coin}`; \
22 if test -f ${dr}/NO-AUTO-GEN; then \
25 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
27 aclocalinclude="${ACLOCAL_FLAGS}"; \
28 for k in ${macrodirs}; do \
29 if test -d ${k}; then \
30 aclocalinclude="${aclocalinclude} -I ${k}"; \
32 ## echo "**Warning**: No such directory \`${k}'. Ignored." \
35 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
36 if grep "sed.*POTFILES" configure.in >/dev/null; then \
37 : do nothing -- we still have an old unmodified configure.in \
39 test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
40 echo "no" | gettextize --force --copy; \
41 test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
44 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
45 %{__libtoolize} --force --copy; \
47 aclocal ${aclocalinclude}; \
48 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
51 echo "Running automake --gnu ${am_opt} ..."; \
52 %{__automake} --add-missing --gnu ${am_opt}; \
57 CFLAGS="${CFLAGS} %{optflags}" LDFLAGS="${LDFLAGS}" %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} %* \
58 %{-C:cd ${_mydir}; unset _mydir}
60 #------------------------------------------------------------------------------
61 # The GNUconfigureS macro does the following:
62 # update config.guess and config.sub.
63 # regenerate all autoconf/automake files
64 # optionally change to a directory (make the directory if requested).
65 # run configure with correct prefix, platform, CFLAGS and adds -s
67 # optionally restore current directory.
69 # Based on autogen.sh from GNOME and orginal GNUconfigure
72 %{-C:_mydir="`pwd`"; %{-M; %{__mkdirp} %{-C*};} cd %{-C*}} \
73 for coin in `find ${_mydir} -name configure.in -print` \
75 dr=`dirname ${coin}`; \
76 if test -f ${dr}/NO-AUTO-GEN; then \
79 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
81 aclocalinclude="${ACLOCAL_FLAGS}"; \
82 for k in ${macrodirs}; do \
83 if test -d ${k}; then \
84 aclocalinclude="${aclocalinclude} -I ${k}"; \
86 ## echo "**Warning**: No such directory \`${k}'. Ignored." \
89 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
90 if grep "sed.*POTFILES" configure.in >/dev/null; then \
91 : do nothing -- we still have an old unmodified configure.in \
93 test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
94 echo "no" | gettextize --force --copy; \
95 test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
98 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
99 %{__libtoolize} --force --copy; \
101 aclocal ${aclocalinclude}; \
102 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
105 echo "Running automake --gnu ${am_opt} ..."; \
106 %{__automake} --add-missing --gnu ${am_opt}; \
111 CFLAGS="${CFLAGS} %{optflags}" LDFLAGS="${LDFLAGS} -s" %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} %* \
112 %{-C:cd ${_mydir}; unset _mydir}
114 ##############################
115 # run ./configure with corect target, CFLAGS and LDFLAGS
118 CFLAGS="${CFLAGS} %{optflags}" LDFLAGS="${LDFLAGS} -s" %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix}
121 CFLAGS="${CFLAGS} %{optflags}" LDFLAGS="${LDFLAGS}" %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix}