]> git.pld-linux.org Git - packages/rpm.git/blame - macros.pld.in
- package rpmgraph, remove utils-perl package definition
[packages/rpm.git] / macros.pld.in
CommitLineData
e0cea210
ER
1# PLD Linux rpm macros
2# vim:ft=spec
08697680
JR
3
4%distribution PLD Linux
e0cea210 5%vendor pld
08697680
JR
6%bugurl http://bugs.pld-linux.org/
7%disturl http://www.pld-linux.org/
8%pld_release th
9
e0cea210 10#
08697680
JR
11# Per-platform rpm configuration file.
12
13#==============================================================================
14# ---- per-platform macros.
15#
16%_vendor pld
17%_os linux
d38aed81 18%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
08697680
JR
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
affe917d 28%_libexecdir %{_exec_prefix}/libexec
08697680
JR
29%_datadir %{_prefix}/share
30%_sysconfdir %{_prefix}/etc
31%_sharedstatedir /var/lib
32%_localstatedir /var
08697680
JR
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%{__spec_install_post_strip}\
50%{__spec_install_post_chrpath}\
41da1a46 51%{__spec_install_post_compress_modules}\
08697680
JR
52%{__spec_install_post_check_so}\
53%{__spec_install_post_check_tmpfiles}\
716fe3ca 54%{__spec_install_post_check_shebangs}\
08697680 55%{__spec_install_post_compress_docs}\
08697680
JR
56%{__spec_install_post_py_hardlink}\
57%{__spec_install_post_perl_clean}\
58%{__arch_install_post}\
59%{nil}
60
33c1e7b7
JR
61%__spec_install_post\
62%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
63%{__arch_install_post}\
64%{__os_install_post}\
65%{nil}
66
08697680
JR
67#---------------------------------------------------------------------
68# Template for debug information sub-package.
69%_enable_debug_packages 1
08697680
JR
70
71%debug_package \
72%ifnarch noarch\
73%global __debug_package 1\
74%package debuginfo\
75Summary: Debug information for package %{name}\
76Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\
77Group: Development/Debug\
78Requires: filesystem-debuginfo >= 3.0-16\
79AutoReqProv: 0\
80%description debuginfo\
81This package provides debug information for package %{name}.\
82Debug information is useful when developing applications that use this\
83package or when debugging this package.\
84%description debuginfo -l pl.UTF-8\
85Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
86Informacje te są przydatne przy rozwijaniu aplikacji używających tego\
87pakietu oraz przy odpluskwianiu samego pakietu.\
88%files debuginfo -f debugfiles.list\
89%defattr(-,root,root)\
90%endif\
91%{nil}
92
93#---------------------------------------------------------------------
94# Overwrite RPM macros with PLD specific one here.
95
38f68757
JR
96%__cp /bin/cp
97%__find /usr/bin/find
048d06f8
JR
98%__grep /bin/grep
99%__lua %{_bindir}/lua
100%__rc %{_bindir}/rc
101%__xar %{_bindir}/xar
102
08697680
JR
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
74f01095 111%_binary_payload w6.lzdio
08697680
JR
112
113%_rpmfc_magic_path /usr/share/file/magic
114
e0cea210 115# provides don't obsolete
08697680
JR
116%_upgrade_tag name
117
4ccaee6b 118# Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps)
f1d17da8 119%_check_symlink_deps 0
f1d17da8 120
76fbad18
JR
121# Do not generate executable() dependencies for scriptlets,
122# as it may give false positives, for example:
123# [ ! -x /bin/prog ] || /bin/prog
124# will generate R:/bin/prog and we don't want that as /bin/prog is optional in this case
125# 0 - Use external generator
126# 1 - Use internal generator if available
127# 2 - Use __scriptlet_requires to process scriptlet dependencies
128%_use_internal_dependency_generator 1
129
c73c5056
JR
130%_duplicate_files_terminate_build 1
131%_files_listed_twice_terminate_build 1
132%_unpackaged_subdirs_terminate_build 0
133
633315d5
JR
134#
135# Export package NEVRA (stamped with install tid) info for HRMIB on this path.
136#
137# XXX Note: escaped %% for use in headerSprintf()
138%_hrmib_path /var/cache/hrmib/%{___NVRA}
139
08697680
JR
140#-----------------------------------------------------------------
141# CFLAGS and LDFLAGS used to build
142
d38aed81 143%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}}
08697680
JR
144# -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
145
d38aed81
JR
146%debugcflags -O0 -g -Wall
147%debugcppflags %{nil}
148%debugldflags %{nil}
08697680 149
d38aed81
JR
150%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
151%optcppflags %{nil}
08697680
JR
152
153# Warning: those macros are overwritten by macros.build,
154# left here for compatibility
048d06f8
JR
155%rpmcflags %(awk 'BEGIN {
156 split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
157 split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
158 %{filter_out}
159}')
160%rpmcppflags %(awk 'BEGIN {
161 split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
162 split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
163 %{filter_out}
164}')
165%rpmcxxflags %(awk 'BEGIN {
166 split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
167 split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
168 %{filter_out}
169}')
170%rpmldflags %(awk 'BEGIN {
171 split("%{?optldflags}",I);
172 split("%{?filterout_ld}",F)
173 %{filter_out}
174}')
d38aed81
JR
175
176# common compilation flags
177%_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
178
179# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
180%Werror_cflags -Wformat -Werror=format-security
181
6507ff6c
AM
182# Use -Werror=trampolines to prevent GCC from generating code that require executable stack
183%_ssp_cflags -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines
86bde33d
JR
184%__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
185%__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags}
08697680
JR
186
187# arch macros
188%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
189%x8664 x86_64 amd64 ia32e
190%ppc ppc ppc7400 ppc7450
191
c978e4e0
JR
192# avoid fdatasync syscall flood during database operations.
193%__nofsync nofsync
194
08697680
JR
195#---------------------------------------------------------------------
196# Expanded at end of %prep
197#
198%__id_u %{__id} -u
199%__chown_Rhf %{__chown} -Rhf
200%__chgrp_Rhf %{__chgrp} -Rhf
201%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
202%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
203%_fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w
204
205%__id /bin/id
206
c978e4e0
JR
207#
208# DO NOT put anything after this %%{load:...} !
08697680
JR
209#
210# rpm5 prolog for loading the standard macro
211%{load:/etc/rpm/macros.d/*.macros}
This page took 0.089707 seconds and 4 git commands to generate.