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