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