]> TLD Linux GIT Repositories - packages/rpm.git/blob - rpm-tld-macros.patch
- package /usr/lib/rpm/macros.d dir
[packages/rpm.git] / rpm-tld-macros.patch
1 diff -ur rpm-4.5.orig/macros.in rpm-4.5/macros.in
2 --- rpm-4.5.orig/macros.in      2020-04-19 16:30:03.450641000 +0200
3 +++ rpm-4.5/macros.in   2020-04-29 16:30:36.671641000 +0200
4 @@ -328,12 +328,6 @@
5  #      
6  #%_javaclasspath       all
7  
8 -#      Import packaging conventions from jpackage.org (prefixed with _
9 -#      to avoid name collisions).
10 -#      
11 -%_javadir      %{_datadir}/java
12 -%_javadocdir   %{_datadir}/javadoc
13 -
14  #
15  #      Deprecated.
16  #
17 @@ -1361,44 +1355,9 @@
18  #
19  # Note: Used iff _use_internal_dependency_generator is non-zero. The
20  # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
21 -#%__perl_provides      %{_rpmhome}/perldeps.pl --provides
22 -#%__perl_requires      %{_rpmhome}/perldeps.pl --requires
23  %__perl_provides       %{_rpmhome}/perl.prov
24  %__perl_requires       %{_rpmhome}/perl.req
25  
26 -# Useful macros for building *.rpm perl packages.
27 -#      (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
28 -#
29 -# For example, these can be used as (from ImageMagick.spec from PLD site)
30 -#      [...]
31 -#      BuildPrereq: perl
32 -#      [...]
33 -#      %package perl
34 -#      Summary: libraries and modules for access to ImageMagick from perl
35 -#      Group: Development/Languages/Perl
36 -#      Requires: %{name} = %{version}
37 -#      %requires_eq    perl
38 -#      [...]
39 -#      %install
40 -#      rm -fr $RPM_BUILD_ROOT
41 -#      install -d $RPM_BUILD_ROOT/%{perl_sitearch}
42 -#      [...]
43 -#      %files perl
44 -#      %defattr(644,root,root,755)
45 -#      %{perl_sitearch}/Image
46 -#      %dir %{perl_sitearch}/auto/Image
47 -#
48 -
49 -%requires_eq() %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
50 -
51 -%perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
52 -%perl_sitelib  %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
53 -%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
54 -%perl_vendorlib  %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
55 -%perl_archlib  %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
56 -%perl_privlib  %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
57 -%perl_version  %(eval "`%{__perl} -V:version`"; echo $version)
58 -
59  #------------------------------------------------------------------------
60  # python(...) configuration.
61  #
62 @@ -1408,107 +1367,11 @@
63  # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
64  %__python_provides      %{_rpmhome}/pythoneggs.py --provides
65  %__python_requires      %{_rpmhome}/pythoneggs.py --requires
66 -#
67 -%python_sitearch %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(1); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
68 -%python_sitelib %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
69 -%python_version %(%{__python} -c "import sys; print(sys.version[0:3])")
70 -
71 -# python main version
72 -%py_ver                 %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
73 -%py_prefix              %(%{__python} -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
74 -%py_platlibdir          %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
75 -%py_purelibdir          %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=0)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
76 -# backward compatibility
77 -%py_libdir              %py_purelibdir
78 -
79 -%py_platsitedir         %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
80 -%py_puresitedir         %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()' 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND)
81 -%py_sitedir             %py_puresitedir
82 -
83 -%py_dyndir              %{py_platlibdir}/lib-dynload
84 -
85 -%py_incdir              %(%{__python} -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND)
86 -
87 -%py_compile(O)  \
88 -find %1 -name '*.pyc' -exec rm -f {} \\; \
89 -%{__python} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
90 -%{-O: \
91 -find %1 -name '*.pyo' -exec rm -f {} \\; \
92 -%{__python} -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
93 -}
94 -
95 -# pure python modules compilation
96 -%py_comp        %{__python} -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])"
97 -
98 -%py_ocomp       %{__python} -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])"
99 -
100 -%py_requires(d) \
101 -BuildRequires: %{__python} %{-d:python-devel}
102 -
103 -#------------------------------------------------------------------------
104 -# php(...) configuration.
105 -#
106 -# Path to scripts to autogenerate php package dependencies,
107 -#
108 -# Note: Used iff _use_internal_dependency_generator is non-zero. The
109 -# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
110 -#%__php_provides       %{_rpmhome}/phpdeps.sh --provides
111 -#%__php_requires       %{_rpmhome}/phpdeps.sh --requires
112 -#%__php_provides               %{_rpmhome}/php.prov
113 -#%__php_requires               %{_rpmhome}/php.req
114  
115  %__mono_provides       %{nil}
116  %__mono_requires       %{nil}
117  
118  #------------------------------------------------------------------------
119 -# java(...) configuration.
120 -#
121 -# Path to scripts to autogenerate java package dependencies,
122 -#
123 -# Note: Used iff _use_internal_dependency_generator is non-zero. The
124 -# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
125 -#%__java_provides      %{_rpmhome}/javadeps.sh --provides
126 -#%__java_requires      %{_rpmhome}/javadeps.sh --requires
127 -
128 -#------------------------------------------------------------------------
129 -# ruby(...) configuration.
130 -#
131 -# Path to scripts to autogenerate ruby package dependencies,
132 -
133 -# Note: Used if _use_internal_dependency_generator is non-zero. The
134 -# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
135 -%__ruby_provides       %{_rpmhome}/rubygems.rb --provides
136 -%__ruby_requires       %{_rpmhome}/rubygems.rb --requires
137 -
138 -%ruby_version          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["ruby_version"]')
139 -
140 -%ruby_archdir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["archdir"]')
141 -%ruby_libdir           %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"]')
142 -%ruby_sitedir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitedir"]')
143 -%ruby_sitearchdir      %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
144 -%ruby_sitelibdir       %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')
145 -%ruby_vendordir                %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendordir"]')
146 -%ruby_vendorarchdir    %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')
147 -%ruby_vendorlibdir     %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]')
148 -%ruby_gemdir           %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], "gems/#{RbConfig::CONFIG["ruby_version"]}")')
149 -%ruby_ridir            %(%{__ruby} -rrbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", RbConfig::CONFIG["ruby_version"])')
150 -
151 -%__gem_helper %{_usrlibrpm}/gem_helper.rb
152 -
153 -%gem_build(f:j:) \
154 -       %__gem_helper build \\\
155 -       %{-f:-f%{-f*}} \\\
156 -       %{!-j:%{_smp_mflags}}%{-j:-j%{-j*}}
157 -
158 -%gem_install(i:n:C) \
159 -       DESTDIR=${DESTDIR:-%{buildroot}} \\\
160 -       %__gem_helper install \\\
161 -       --env-shebang --rdoc --ri --force --ignore-dependencies \\\
162 -       %{!-i:--install-dir %{buildroot}%{ruby_gemdir}}%{-i:--install-dir %{-i*}} \\\
163 -       %{!-n:--bindir %{buildroot}%{_bindir}}%{-n:--bindir%{-n*}} \\\
164 -       %{!-C:--fix-permissions}
165 -
166 -#------------------------------------------------------------------------
167  # libtool(...) configuration.
168  #
169  # Path to scripts to autogenerate libtool package dependencies,
170 @@ -1588,15 +1451,7 @@
171  %__common_cflags       -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
172  %__common_cflags_with_ssp      %{__common_cflags} %{?_ssp_cflags}
173  
174 -#------------------------------------------------------------------------
175 -# mimetype(...) configuration.
176 -#
177 -# Path to script to autogenerate mimetype(foo) provides, based on MimeType
178 -# key from desktop files.
179 -#
180 -# Note: Used if _use_internal_dependency_generator is non-zero. The
181 -# helper is also used by %{_rpmhome}/rpmdeps --provides
182 -%__mimetype_provides %{_rpmhome}/mimetypedeps.sh --provides
183 +%requires_eq() %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
184  
185  %__gstreamer_provides %{nil}
186  
187 diff -ur rpm-4.5.orig/scripts/Makefile.am rpm-4.5/scripts/Makefile.am
188 --- rpm-4.5.orig/scripts/Makefile.am    2020-04-19 16:30:03.450641000 +0200
189 +++ rpm-4.5/scripts/Makefile.am 2020-04-29 15:41:49.787641000 +0200
190 @@ -11,11 +11,9 @@
191         cpanflute cpanflute2 Specfile.pm find-provides.perl \
192         find-requires.perl freshen.sh gendiff getpo.sh http.req \
193         check-java-closure.sh java.prov.sh java.req.sh \
194 -       javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
195 +       libtooldeps.sh pkgconfigdeps.sh \
196         perldeps.pl perl.prov perl.req pythondeps.sh pythoneggs.py \
197 -       mimetypedeps.sh \
198 -       php.prov php.req rpm2cpio \
199 -       rpmdb_loadcvt rpmdiff rpmdiff.cgi \
200 +       rpm2cpio rpmdb_loadcvt rpmdiff rpmdiff.cgi \
201         rpm.daily rpm.log rpm.xinetd \
202         sql.prov sql.req symclash.py symclash.sh tcl.req tgpg trpm u_pkg.sh \
203         vpkg-provides.sh vpkg-provides2.sh \
204 @@ -39,10 +37,8 @@
205         find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
206         find-provides.perl \
207         find-requires.perl getpo.sh http.req \
208 -       javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
209 +       libtooldeps.sh pkgconfigdeps.sh \
210         perldeps.pl perl.prov perl.req pythondeps.sh pythoneggs.py \
211 -       mimetypedeps.sh \
212 -       php.prov php.req \
213         rpmdb_loadcvt \
214         rpm.daily rpm.log rpm.xinetd \
215         symclash.py symclash.sh tgpg u_pkg.sh \
216 diff -ur rpm-4.5.orig/scripts/Makefile.in rpm-4.5/scripts/Makefile.in
217 --- rpm-4.5.orig/scripts/Makefile.in    2008-07-09 11:41:32.000000000 +0200
218 +++ rpm-4.5/scripts/Makefile.in 2020-04-29 15:41:01.972641000 +0200
219 @@ -339,9 +339,9 @@
220         cpanflute cpanflute2 Specfile.pm find-provides.perl \
221         find-requires.perl freshen.sh gendiff getpo.sh http.req \
222         check-java-closure.sh java.prov.sh java.req.sh \
223 -       javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
224 -       perldeps.pl perl.prov perl.req pythondeps.sh mimetypedeps.sh \
225 -       php.prov php.req rpm2cpio \
226 +       libtooldeps.sh pkgconfigdeps.sh \
227 +       perldeps.pl perl.prov perl.req pythondeps.sh \
228 +       rpm2cpio \
229         rpmdb_loadcvt rpmdiff rpmdiff.cgi \
230         rpm.daily rpm.log rpm.xinetd \
231         sql.prov sql.req symclash.py symclash.sh tcl.req tgpg trpm u_pkg.sh \
232 @@ -360,9 +360,8 @@
233         find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
234         find-provides.perl \
235         find-requires.perl getpo.sh http.req \
236 -       javadeps.sh libtooldeps.sh pkgconfigdeps.sh \
237 -       perldeps.pl perl.prov perl.req pythondeps.sh mimetypedeps.sh \
238 -       php.prov php.req \
239 +       libtooldeps.sh pkgconfigdeps.sh \
240 +       perldeps.pl perl.prov perl.req pythondeps.sh \
241         rpmdb_loadcvt \
242         rpm.daily rpm.log rpm.xinetd \
243         symclash.py symclash.sh tgpg u_pkg.sh \