- Split SUSE macros and some helpers into rpm-config-SUSE
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=472
This commit is contained in:
233
macrosin.diff
233
macrosin.diff
@@ -1,5 +1,5 @@
|
||||
--- ./macros.in.orig 2018-05-07 14:27:45.991050600 +0000
|
||||
+++ ./macros.in 2018-05-07 14:28:12.426978605 +0000
|
||||
--- ./macros.in.orig 2018-07-02 14:46:14.912900534 +0000
|
||||
+++ ./macros.in 2018-07-02 14:50:35.356223235 +0000
|
||||
@@ -184,7 +184,7 @@
|
||||
%{?_unique_build_ids:--build-id-seed "%{VERSION}-%{RELEASE}"} \\\
|
||||
%{?_unique_debug_names:--unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch}"} \\\
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
#
|
||||
# Use internal dependency generator rather than external helpers?
|
||||
@@ -566,16 +581,22 @@ package or when debugging this package.\
|
||||
@@ -566,6 +581,10 @@ package or when debugging this package.\
|
||||
# Directories whose contents should be considered as documentation.
|
||||
%__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man
|
||||
|
||||
@@ -91,21 +91,15 @@
|
||||
#
|
||||
# Path to scripts to autogenerate package dependencies,
|
||||
#
|
||||
# Note: Used iff _use_internal_dependency_generator is zero.
|
||||
#%__find_provides %{_rpmconfigdir}/rpmdeps --provides
|
||||
#%__find_requires %{_rpmconfigdir}/rpmdeps --requires
|
||||
-%__find_provides %{_rpmconfigdir}/find-provides
|
||||
-%__find_requires %{_rpmconfigdir}/find-requires
|
||||
+%__find_provides %{_rpmconfigdir}/find-provides %name
|
||||
+%__find_requires %{_rpmconfigdir}/find-requires %name
|
||||
@@ -576,6 +595,7 @@ package or when debugging this package.\
|
||||
%__find_requires %{_rpmconfigdir}/find-requires
|
||||
#%__find_conflicts ???
|
||||
#%__find_obsoletes ???
|
||||
+#%__find_supplements ???
|
||||
+#%__find_enhances ???
|
||||
+%__find_supplements %{_rpmconfigdir}/find-supplements
|
||||
|
||||
#
|
||||
# Path to file attribute classifications for automatic dependency
|
||||
@@ -654,10 +675,10 @@ package or when debugging this package.\
|
||||
@@ -654,10 +674,10 @@ package or when debugging this package.\
|
||||
# Misc BDB tuning options
|
||||
%__dbi_other mp_mmapsize=128Mb mp_size=1Mb
|
||||
|
||||
@@ -118,7 +112,7 @@
|
||||
|
||||
#==============================================================================
|
||||
# ---- GPG/PGP/PGP5 signature macros.
|
||||
@@ -969,7 +990,7 @@ package or when debugging this package.\
|
||||
@@ -969,7 +989,7 @@ package or when debugging this package.\
|
||||
%_build_vendor %{_host_vendor}
|
||||
%_build_os %{_host_os}
|
||||
%_host @host@
|
||||
@@ -127,7 +121,7 @@
|
||||
%_host_cpu @host_cpu@
|
||||
%_host_vendor @host_vendor@
|
||||
%_host_os @host_os@
|
||||
@@ -1095,7 +1116,9 @@ package or when debugging this package.\
|
||||
@@ -1095,7 +1115,9 @@ package or when debugging this package.\
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# arch macro for all supported ARM processors
|
||||
@@ -138,212 +132,3 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# arch macro for 32-bit MIPS processors
|
||||
@@ -1125,6 +1148,183 @@ package or when debugging this package.\
|
||||
# arch macro for all supported Alpha processors
|
||||
%alpha alpha alphaev56 alphaev6 alphaev67
|
||||
|
||||
+# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
|
||||
+#
|
||||
+%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")
|
||||
+%perl_prefix %{buildroot}
|
||||
+
|
||||
+#------------------------------------------------------------------------------
|
||||
+# Python specific macro definitions (originally from PLD).
|
||||
+#
|
||||
+%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
|
||||
+%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
|
||||
+%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
|
||||
+%py_incdir %{py_prefix}/include/python%{py_ver}
|
||||
+%py_sitedir %{py_libdir}/site-packages
|
||||
+%py_compile(O) \
|
||||
+find %1 -name '*.pyc' -exec rm -f {} \\; \
|
||||
+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 \
|
||||
+%{-O: \
|
||||
+find %1 -name '*.pyo' -exec rm -f {} \\; \
|
||||
+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 \
|
||||
+}
|
||||
+%py_requires(d) \
|
||||
+%define minver %py_ver \
|
||||
+%define maxver %(python -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \
|
||||
+BuildRequires: python %{-d:python-devel} \
|
||||
+PreReq: python >= %minver, python < %maxver
|
||||
+
|
||||
+#------------------------------------------------------------------------------
|
||||
+#
|
||||
+# RPM macros for Java applications.
|
||||
+#
|
||||
+# JPackage Project <http://www.jpackage.org/>
|
||||
+# David Walluck <david@anti-microsoft.org>
|
||||
+# Ville Skytt<74> <ville.skytta@iki.fi>
|
||||
+# Nicolas Mailhot <Nicolas.Mailhot@laPoste.net>
|
||||
+#
|
||||
+# $Id: macros.jpackage,v 1.1.2.5 2003/08/30 13:24:58 scop Exp $
|
||||
+#
|
||||
+
|
||||
+# ---- default Java directories
|
||||
+
|
||||
+#
|
||||
+# Root directory where all Java VMs/SDK/JREs are installed.
|
||||
+#
|
||||
+%_jvmdir %{_libdir}/jvm
|
||||
+
|
||||
+#
|
||||
+# Root directory where all Java VMs/SDK/JREs expose their jars
|
||||
+#
|
||||
+%_jvmjardir %{_libdir}/jvm-exports
|
||||
+
|
||||
+#
|
||||
+# Root directory for all Java VM/SDK/JRE's private things.
|
||||
+#
|
||||
+%_jvmprivdir %{_libdir}/jvm-private
|
||||
+
|
||||
+#
|
||||
+# Directory where arch and version independent jars are installed.
|
||||
+# This has already been integrated in RH macros following our request.
|
||||
+#
|
||||
+# By extension:
|
||||
+# %{_javadir}-ext:
|
||||
+# - version dependent jars
|
||||
+# %{_javadir}-x.y.z:
|
||||
+# - jars for Java standard x.y.z (usually symlinks to %{_javadir}-ext)
|
||||
+# %{_javadir}-utils:
|
||||
+# - Java-related scripts
|
||||
+#
|
||||
+# To simplify things only %{_javadir} is defined.
|
||||
+#
|
||||
+%_javadir %{_datadir}/java
|
||||
+
|
||||
+#
|
||||
+# Directory where arch-specific (JNI) version-independent jars are installed.
|
||||
+#
|
||||
+# By extension:
|
||||
+# %{_jnidir}-ext:
|
||||
+# - version dependent jars
|
||||
+# %{_jnidir}-x.y.z:
|
||||
+# - jars for Java standard x.y.z (usually symlinks to %{_jnidir}-ext)
|
||||
+# To simplify things only %{_jnidir} is defined.
|
||||
+#
|
||||
+%_jnidir %{_libdir}/java
|
||||
+
|
||||
+#
|
||||
+# Root directory where all javadoc is installed. Also already in RH macros.
|
||||
+#
|
||||
+%_javadocdir %{_datadir}/javadoc
|
||||
+
|
||||
+#
|
||||
+# Current default JVM home.
|
||||
+#
|
||||
+%java_home %(. %{_javadir}-utils/java-functions; set_jvm; echo $JAVA_HOME)
|
||||
+
|
||||
+# ---- default Java commands
|
||||
+
|
||||
+%ant JAVA_HOME=%{java_home} ant
|
||||
+%jar %{java_home}/bin/jar
|
||||
+%java %(. %{_javadir}-utils/java-functions; set_javacmd; echo $JAVACMD)
|
||||
+%javac %{java_home}/bin/javac
|
||||
+%javadoc %{java_home}/bin/javadoc
|
||||
+
|
||||
+# ---- Java extension handling macros
|
||||
+
|
||||
+#
|
||||
+# add_jvm_extension should be used in %install by extension packages to declare
|
||||
+# what extension jars they provide.
|
||||
+#
|
||||
+# For example a package that provides foo.jar which is the bar extension
|
||||
+# under java 1.2 and 1.3 should do a:
|
||||
+#
|
||||
+# %install
|
||||
+# ... # create foo.jar in %{javadir}-ext
|
||||
+# %add_jvm_extension foo bar 1.2 1.3
|
||||
+#
|
||||
+# %files
|
||||
+# %{javadir}-ext/foo.jar
|
||||
+# %{javadir}-*/bar.jar
|
||||
+#
|
||||
+%add_jvm_extension JAVA_LIBDIR=%{buildroot}/%{_javadir} %{_bindir}/jvmjar -l
|
||||
+
|
||||
+#
|
||||
+# Standard JPackage script
|
||||
+#
|
||||
+# This is kind of tasteless and should be moved to an external template
|
||||
+#
|
||||
+# %1 main class
|
||||
+# %2 flags
|
||||
+# %3 options
|
||||
+# %4 jars (separated by ':')
|
||||
+# %5 the name of script you wish to create
|
||||
+# %6 whether to prefer a jre over a sdk when finding a jvm
|
||||
+#
|
||||
+%jpackage_script() \
|
||||
+install -d -m 755 $RPM_BUILD_ROOT%{_bindir}\
|
||||
+cat > $RPM_BUILD_ROOT%{_bindir}/%5 << EOF \
|
||||
+#!/bin/sh\
|
||||
+#\
|
||||
+# %{name} script\
|
||||
+# JPackage Project <http://www.jpackage.org/>\
|
||||
+\
|
||||
+# Source functions library\
|
||||
+_prefer_jre="%{?6}"\
|
||||
+. %{_javadir}-utils/java-functions\
|
||||
+\
|
||||
+# Source system prefs\
|
||||
+if [ -f %{_sysconfdir}/java/%{name}.conf ] ; then\
|
||||
+ . %{_sysconfdir}/java/%{name}.conf\
|
||||
+fi\
|
||||
+\
|
||||
+# Source user prefs\
|
||||
+if [ -f \\$HOME/.%{name}rc ] ; then\
|
||||
+ . \\$HOME/.%{name}rc\
|
||||
+fi\
|
||||
+\
|
||||
+# Configuration\
|
||||
+MAIN_CLASS=%1\
|
||||
+BASE_FLAGS=%2\
|
||||
+BASE_OPTIONS=%3\
|
||||
+BASE_JARS="%(echo %4 | sed -e 's,:, ,g')"\
|
||||
+\
|
||||
+# Set parameters\
|
||||
+set_jvm\
|
||||
+set_classpath \\$BASE_JARS\
|
||||
+set_flags \\$BASE_FLAGS\
|
||||
+set_options \\$BASE_OPTIONS\
|
||||
+\
|
||||
+# Let's start\
|
||||
+run "\\$@"\
|
||||
+EOF
|
||||
+
|
||||
#------------------------------------------------------------------------------
|
||||
# arch macro for all supported PowerPC 64 processors
|
||||
%power64 ppc64 ppc64p7 ppc64le
|
||||
@@ -1257,3 +1457,24 @@ end}
|
||||
|
||||
# \endverbatim
|
||||
#*/
|
||||
+
|
||||
+
|
||||
+#------------------------------------------------------------------------
|
||||
+# standard build service macros
|
||||
+#
|
||||
+%ext_info .gz
|
||||
+%ext_man .gz
|
||||
+
|
||||
+%info_add() test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
|
||||
+%{nil}
|
||||
+
|
||||
+%info_del() test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
|
||||
+%{nil}
|
||||
+
|
||||
+%service_add() %{fillup_and_insserv %{1}}
|
||||
+
|
||||
+%user_group_add() \
|
||||
+/usr/sbin/groupadd -r %{1} 2>/dev/null || :\
|
||||
+/usr/sbin/useradd -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} 2>/dev/null || :\
|
||||
+%{nil}
|
||||
+
|
||||
|
Reference in New Issue
Block a user