]> git.pld-linux.org Git - packages/rpm-build-macros.git/blame - rpm.macros
- added "if [ -n "$LINGUAS" ]; then unset LINGUAS; fi;" on top %configure.
[packages/rpm-build-macros.git] / rpm.macros
CommitLineData
42dc0d85
AF
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:) \
1cdea5d6 12 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
48733a0c 13 LDFLAGS="${LDFLAGS:-'%{-s:-s}'}" ; export LDFLAGS; \
8dec30a1
AF
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}` \
42dc0d85
AF
17do \
18 dr=`dirname ${coin}`; \
19if test -f ${dr}/NO-AUTO-GEN; then \
20 : \
21else \
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 \
53done \
1d2b3165
AF
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#-----------------------------------------------------------------
ddee0a8f 58%configure { \
371fb7eb 59 if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
ddee0a8f 60 LDFLAGS="${LDFLAGS}%{!?debug: -s}" ; export LDFLAGS ; \
61 CFLAGS="${CFLAGS:-%optflags}%{?debug: -g -O}" ; export CFLAGS ; \
62 CXXFLAGS="${CXXFLAGS:-%optflags}%{?debug: -g -O}" ; export CXXFLAGS ; \
63 FFLAGS="${FFLAGS:-%optflags}%{?debug: -g -O}" ; export FFLAGS ; \
18be048d 64 unset LINGUAS || : ; \
ac348cd7
AF
65 ./configure %{_target_platform} \
66 --prefix=%{_prefix} \
67 --exec-prefix=%{_exec_prefix} \
68 --bindir=%{_bindir} \
69 --sbindir=%{_sbindir} \
70 --sysconfdir=%{_sysconfdir} \
71 --datadir=%{_datadir} \
72 --includedir=%{_includedir} \
73 --libdir=%{_libdir} \
74 --libexecdir=%{_libexecdir} \
75 --localstatedir=%{_localstatedir} \
76 --sharedstatedir=%{_sharedstatedir} \
77 --mandir=%{_mandir} \
78 --infodir=%{_infodir} }
1b129f75 79
7f97bd68
AF
80# Location of autoconf macros
81%_aclocaldir %(aclocal --print-ac-dir)
82
83# Fixed location of top applink dir
84%_applnkdir /usr/X11R6/share/applnk
85
86# Current date
87%date %(LC_ALL="C" date +"%a %b %d %Y")
1b129f75 88
7f97bd68
AF
89# tmp directory
90%tmpdir %(echo "${TMPDIR:-/tmp}")
b7cc3986
SZ
91
92# Example files, programs, scripts...
93%_examplesdir /usr/src/examples
94
95# Find-requires and directories excluded from auto-req
96%_noautoreqdir %{_defaultdocdir} %{_examplesdir}
97%_noautoreqdep %{nil}
61036537
SZ
98#%__find_requires_pre /usr/lib/rpm/find-requires-pre %{_noautoreqdir}
99#%__find_requires_core /usr/lib/rpm/find-requires
100#%__find_requires_post /usr/lib/rpm/find-requires-post
101#%__find_requires %{__find_requires_pre} | %{__find_requires_core} | %{__find_requires_post}
b7cc3986 102
ddee0a8f 103# If non-empty "debug" macro defined, add "dbg" suffix to release number
104%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
33befaf9 105
106# remove .comment and .note from ELFs
81cd429e 107%__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.047115 seconds and 4 git commands to generate.