]> git.pld-linux.org Git - packages/rpm.git/blob - macros.pld.in
Cleanup arch specific macros and {c,ld,*}flags
[packages/rpm.git] / macros.pld.in
1 # PLD rpm macros
2
3 %distribution           PLD Linux
4 %vendor                 pld 
5 %bugurl                 http://bugs.pld-linux.org/
6 %disturl                http://www.pld-linux.org/
7 %pld_release            th
8
9
10 # Per-platform rpm configuration file.
11
12 #==============================================================================
13 # ---- per-platform macros.
14 #
15 %_vendor                pld
16 %_os                    linux
17 %_target_platform       %{_target_cpu}-%{_vendor}-%{_target_os}
18
19 #==============================================================================
20 # ---- configure macros.  note that most of these are inherited
21 #      from the defaults.
22 #
23 %_prefix                /usr
24 %_exec_prefix           %{_prefix}
25 %_bindir                %{_exec_prefix}/bin
26 %_sbindir               %{_exec_prefix}/sbin
27 %_libexecdir            %{_exec_prefix}/%{_lib}
28 %_datadir               %{_prefix}/share
29 %_sysconfdir            %{_prefix}/etc
30 %_sharedstatedir        /var/lib
31 %_localstatedir         /var
32 %_lib                   lib
33 %_libdir                %{_exec_prefix}/%{_lib}
34 %_includedir            %{_prefix}/include
35 %_oldincludedir         /usr/include
36 %_infodir               %{_prefix}/share/info
37 %_mandir                %{_prefix}/share/man
38 %_initrddir             %{_sysconfdir}/rc.d/init.d
39 %_sysconfdir            /etc
40
41 %_defaultdocdir         %{_usr}/share/doc
42
43 %_fmoddir               %{_libdir}/gfortran/modules
44
45 # Executed at after copying %doc to DOCDIR, with $DOCDIR set
46 %__compress_doc         @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
47
48 %__os_install_post \
49 %ifnarch noarch\
50 %{__spec_install_post_strip}\
51 %{__spec_install_post_chrpath}\
52 %{__spec_install_post_compress_modules}\
53 %endif\
54 %{__spec_install_post_check_so}\
55 %{__spec_install_post_check_tmpfiles}\
56 %{__spec_install_post_compress_docs}\
57 %{__spec_install_post_py_hardlink}\
58 %{__spec_install_post_perl_clean}\
59 %{__arch_install_post}\
60 %{nil}
61
62 #---------------------------------------------------------------------
63 #       Template for debug information sub-package.
64 %_enable_debug_packages         1
65 %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
66
67 %debug_package \
68 %ifnarch noarch\
69 %global __debug_package 1\
70 %package debuginfo\
71 Summary: Debug information for package %{name}\
72 Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\
73 Group: Development/Debug\
74 Requires: filesystem-debuginfo >= 3.0-16\
75 AutoReqProv: 0\
76 %description debuginfo\
77 This package provides debug information for package %{name}.\
78 Debug information is useful when developing applications that use this\
79 package or when debugging this package.\
80 %description debuginfo -l pl.UTF-8\
81 Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
82 Informacje te są przydatne przy rozwijaniu aplikacji używających tego\
83 pakietu oraz przy odpluskwianiu samego pakietu.\
84 %files debuginfo -f debugfiles.list\
85 %defattr(-,root,root)\
86 %endif\
87 %{nil}
88
89 #---------------------------------------------------------------------
90 # Overwrite RPM macros with PLD specific one here.
91
92 %_tmppath               %(echo "${TMPDIR:-/var/tmp}")
93 %tmpdir                 %{_tmppath}
94
95 %_topdir                %(echo $HOME)/rpm
96
97 %buildroot              %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
98
99 %_source_payload        w9.gzdio
100 %_binary_payload        w9.lzdio
101
102 %_rpmfc_magic_path      /usr/share/file/magic
103
104 %undefine               __scriptlet_requires
105
106 # provides dont obsolete
107 %_upgrade_tag           name
108
109 #-----------------------------------------------------------------
110 # CFLAGS and LDFLAGS used to build
111
112 %debuginfocflags        %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
113 # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
114
115 %debugcflags    -O0 -g -Wall
116 %debugcppflags  %{nil}
117 %debugldflags   %{nil}
118
119 %optldflags     -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
120 %optcppflags    %{nil}
121
122 # Warning: those macros are overwritten by macros.build,
123 #          left here for compatibility
124 %rpmcflags      %{nil}
125 %rpmcxxflags    %{nil}
126 %rpmldflags     %{nil}
127 %rpmcppflags    %{nil}
128
129 # common compilation flags
130 %_fortify_cflags        -Wp,-D_FORTIFY_SOURCE=2
131
132 # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
133 %Werror_cflags          -Wformat -Werror=format-security
134
135 %_ssp_cflags            -fstack-protector --param=ssp-buffer-size=4
136 %__common_cflags        -O2 -fwrapv %{debuginfocflags} -pipe %{Werror_cflags} %{?_fortify_cflags}
137 %__common_cflags_with_ssp       %{__common_cflags} %{?_ssp_cflags} %{!?nospecflags:%{?specflags}}}
138
139 # arch macros
140 %ix86  i386 i486 i586 i686 pentium3 pentium4 athlon
141 %x8664 x86_64 amd64 ia32e
142 %ppc   ppc ppc7400 ppc7450
143
144
145 #---------------------------------------------------------------------
146 #       Expanded at end of %prep
147 #
148 %__id_u         %{__id} -u
149 %__chown_Rhf    %{__chown} -Rhf
150 %__chgrp_Rhf    %{__chgrp} -Rhf
151 %_fixowner      [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
152 %_fixgroup      [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
153 %_fixperms      %{__chmod} -Rf a+rX,u+w,g-w,o-w
154
155 %__id           /bin/id
156
157 #
158 # rpm5 prolog for loading the standard macro
159 %{load:/etc/rpm/macros.d/*.macros}
This page took 0.04683 seconds and 4 git commands to generate.