]>
Commit | Line | Data |
---|---|---|
035f105f JR |
1 | # PLD Linux rpm macros |
2 | # vim:ft=spec | |
3 | ||
ee05dbcd JR |
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 | %disttag %{pld_release} | |
035f105f JR |
10 | |
11 | #============================================================================== | |
12 | # ---- configure macros. note that most of these are inherited | |
13 | # from the defaults. | |
14 | # | |
035f105f JR |
15 | %_sharedstatedir /var/lib |
16 | %_localstatedir /var | |
035f105f | 17 | %_initrddir %{_sysconfdir}/rc.d/init.d |
035f105f JR |
18 | |
19 | %_defaultdocdir %{_usr}/share/doc | |
20 | ||
21 | %_fmoddir %{_libdir}/gfortran/modules | |
22 | ||
23 | # Executed at after copying %doc to DOCDIR, with $DOCDIR set | |
24 | %__compress_doc %{_rpmconfigdir}/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'} | |
25 | ||
26 | %__os_install_post \ | |
27 | %{__spec_install_post_strip}\ | |
28 | %{__spec_install_post_chrpath}\ | |
29 | %{__spec_install_post_compress_modules}\ | |
30 | %{__spec_install_post_check_so}\ | |
31 | %{__spec_install_post_check_tmpfiles}\ | |
32 | %{__spec_install_post_check_shebangs}\ | |
33 | %{__spec_install_post_compress_docs}\ | |
34 | %{__spec_install_post_py_hardlink}\ | |
35 | %{__spec_install_post_perl_clean}\ | |
36 | %{__arch_install_post}\ | |
37 | %{nil} | |
38 | ||
39 | %__spec_install_post\ | |
40 | %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\ | |
41 | %{__arch_install_post}\ | |
42 | %{__os_install_post}\ | |
43 | %{nil} | |
44 | ||
45 | #--------------------------------------------------------------------- | |
46 | # Template for debug information sub-package. | |
47 | %_enable_debug_packages 1 | |
48 | ||
49 | %debug_package \ | |
50 | %ifnarch noarch\ | |
51 | %global __debug_package 1\ | |
52 | %package debuginfo\ | |
53 | Summary: Debug information for package %{name}\ | |
54 | Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\ | |
55 | Group: Development/Debug\ | |
56 | Requires: filesystem-debuginfo >= 3.0-16\ | |
57 | AutoReqProv: 0\ | |
58 | %description debuginfo\ | |
59 | This package provides debug information for package %{name}.\ | |
60 | Debug information is useful when developing applications that use this\ | |
61 | package or when debugging this package.\ | |
62 | %description debuginfo -l pl.UTF-8\ | |
63 | Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\ | |
64 | Informacje te są przydatne przy rozwijaniu aplikacji używających tego\ | |
65 | pakietu oraz przy odpluskwianiu samego pakietu.\ | |
66 | %files debuginfo -f debugfiles.list\ | |
67 | %defattr(-,root,root)\ | |
68 | %endif\ | |
69 | %{nil} | |
70 | ||
71 | #--------------------------------------------------------------------- | |
72 | # Overwrite RPM macros with PLD specific one here. | |
73 | ||
035f105f | 74 | %__find /usr/bin/find |
035f105f JR |
75 | %__lua %{_bindir}/lua |
76 | %__rc %{_bindir}/rc | |
77 | %__xar %{_bindir}/xar | |
78 | ||
79 | %_tmppath %(echo "${TMPDIR:-/var/tmp}") | |
80 | %tmpdir %{_tmppath} | |
81 | ||
82 | %_topdir %(echo $HOME)/rpm | |
83 | ||
84 | %buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n) | |
85 | ||
86 | %_source_payload w9.gzdio | |
ee05dbcd | 87 | %_binary_payload w6.xzdio |
035f105f JR |
88 | |
89 | %_rpmfc_magic_path /usr/share/file/magic | |
90 | ||
91 | # provides don't obsolete | |
92 | %_upgrade_tag name | |
93 | ||
94 | # Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps) | |
95 | %_check_symlink_deps 0 | |
96 | ||
97 | # Do not generate executable() dependencies for scriptlets, | |
98 | # as it may give false positives, for example: | |
99 | # [ ! -x /bin/prog ] || /bin/prog | |
100 | # will generate R:/bin/prog and we don't want that as /bin/prog is optional in this case | |
101 | # 0 - Use external generator | |
102 | # 1 - Use internal generator if available | |
103 | # 2 - Use __scriptlet_requires to process scriptlet dependencies | |
104 | %_use_internal_dependency_generator 1 | |
105 | ||
106 | %_duplicate_files_terminate_build 1 | |
107 | %_files_listed_twice_terminate_build 1 | |
ee05dbcd | 108 | %_unpackaged_files_terminate_build 0 |
035f105f JR |
109 | %_unpackaged_subdirs_terminate_build 0 |
110 | ||
111 | # | |
112 | # Export package NEVRA (stamped with install tid) info for HRMIB on this path. | |
113 | # | |
114 | # XXX Note: escaped %% for use in headerSprintf() | |
115 | %_hrmib_path /var/cache/hrmib/%{___NVRA} | |
116 | ||
117 | #----------------------------------------------------------------- | |
118 | # CFLAGS and LDFLAGS used to build | |
119 | ||
120 | %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}} | |
121 | # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed. | |
122 | ||
123 | %debugcflags -O0 -g -Wall | |
124 | %debugcppflags %{nil} | |
125 | %debugldflags %{nil} | |
126 | ||
127 | %optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc | |
128 | %optcppflags %{nil} | |
129 | ||
130 | # Warning: those macros are overwritten by macros.build, | |
131 | # left here for compatibility | |
132 | %rpmcflags %(awk 'BEGIN { | |
133 | split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I); | |
134 | split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F); | |
135 | %{filter_out} | |
136 | }') | |
137 | %rpmcppflags %(awk 'BEGIN { | |
138 | split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I); | |
139 | split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F); | |
140 | %{filter_out} | |
141 | }') | |
142 | %rpmcxxflags %(awk 'BEGIN { | |
143 | split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I); | |
144 | split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F); | |
145 | %{filter_out} | |
146 | }') | |
147 | %rpmldflags %(awk 'BEGIN { | |
148 | split("%{?optldflags}",I); | |
149 | split("%{?filterout_ld}",F) | |
150 | %{filter_out} | |
151 | }') | |
152 | ||
153 | # common compilation flags | |
154 | %_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2 | |
155 | ||
156 | # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments | |
157 | %Werror_cflags -Wformat -Werror=format-security | |
158 | ||
159 | # Use -Werror=trampolines to prevent GCC from generating code that require executable stack | |
160 | %_ssp_cflags -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines | |
161 | %__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}} | |
162 | %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} | |
163 | ||
164 | # arch macros | |
ee05dbcd | 165 | %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon geode |
035f105f JR |
166 | %x8664 x86_64 amd64 ia32e |
167 | %ppc ppc ppc7400 ppc7450 | |
168 | ||
169 | # avoid fdatasync syscall flood during database operations. | |
170 | %__nofsync nofsync | |
171 | ||
172 | #--------------------------------------------------------------------- | |
173 | # Expanded at end of %prep | |
174 | # | |
035f105f JR |
175 | %__chown_Rhf %{__chown} -Rhf |
176 | %__chgrp_Rhf %{__chgrp} -Rhf | |
177 | %_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root | |
178 | %_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root |