Файловый менеджер - Редактировать - /home/skymarketplace/public_html/uploads/macros.d.zip
Назад
PK ��ZG�� � macros.firewalldnu �[��� # RPM macros for packages installing firewalld services/zones # put this into %post otherwise firewalld won't load new service/zone file %firewalld_reload() \ test -x %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || : \ %{nil} PK ��ZG|�d macros.systemdnu �[��� # -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */ # SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # Copyright 2012 Lennart Poettering # RPM macros for packages installing systemd unit files %_unitdir /usr/lib/systemd/system %_userunitdir /usr/lib/systemd/user %_presetdir /usr/lib/systemd/system-preset %_userpresetdir /usr/lib/systemd/user-preset %_udevhwdbdir /usr/lib/udev/hwdb.d %_udevrulesdir /usr/lib/udev/rules.d %_journalcatalogdir /usr/lib/systemd/catalog %_binfmtdir /usr/lib/binfmt.d %_sysctldir /usr/lib/sysctl.d %_sysusersdir /usr/lib/sysusers.d %_tmpfilesdir /usr/lib/tmpfiles.d %_environmentdir /usr/lib/environment.d %_modulesloaddir /usr/lib/modules-load.d %_modprobedir /usr/lib/modprobe.d %_systemdgeneratordir /usr/lib/systemd/system-generators %_systemdusergeneratordir /usr/lib/systemd/user-generators %_systemd_system_env_generator_dir /usr/lib/systemd/system-environment-generators %_systemd_user_env_generator_dir /usr/lib/systemd/user-environment-generators # Because we had one release with a typo... # This is temporary (Remove after systemd 240 is released) %_environmnentdir %{warn:Use %%_environmentdir instead}%_environmentdir %systemd_requires \ Requires(post): systemd \ Requires(preun): systemd \ Requires(postun): systemd \ %{nil} %systemd_ordering \ OrderWithRequires(post): systemd \ OrderWithRequires(preun): systemd \ OrderWithRequires(postun): systemd \ %{nil} %systemd_post() \ if [ $1 -eq 1 ] ; then \ # Initial installation \ systemctl --no-reload preset %{?*} &>/dev/null || : \ fi \ %{nil} %systemd_user_post() %{expand:%systemd_post \\--global %%{?*}} %systemd_preun() \ if [ $1 -eq 0 ] ; then \ # Package removal, not upgrade \ systemctl --no-reload disable --now %{?*} &>/dev/null || : \ fi \ %{nil} %systemd_user_preun() \ if [ $1 -eq 0 ] ; then \ # Package removal, not upgrade \ systemctl --global disable %{?*} &>/dev/null || : \ fi \ %{nil} %systemd_postun() %{nil} %systemd_user_postun() %{nil} %systemd_postun_with_restart() \ if [ $1 -ge 1 ] ; then \ # Package upgrade, not uninstall \ systemctl try-restart %{?*} &>/dev/null || : \ fi \ %{nil} %systemd_user_postun_with_restart() %{nil} %udev_hwdb_update() %{nil} %udev_rules_update() %{nil} %journal_catalog_update() %{nil} # Deprecated. Use %tmpfiles_create_package instead %tmpfiles_create() \ systemd-tmpfiles --create %{?*} &>/dev/null || : \ %{nil} # Deprecated. Use %sysusers_create_package instead %sysusers_create() \ systemd-sysusers %{?*} &>/dev/null || : \ %{nil} %sysusers_create_inline() \ systemd-sysusers - <<SYSTEMD_INLINE_EOF &>/dev/null || : \ %{?*} \ SYSTEMD_INLINE_EOF \ %{nil} # This should be used by package installation scripts which require users or # groups to be present before the files installed by the package are present on # disk (for example because some files are owned by those users or groups). # # Example: # Source1: %{name}-sysusers.conf # ... # %install # install -D %SOURCE1 %{buildroot}%{_sysusersdir}/%{name}.conf # %pre # %sysusers_create_package %{name} %SOURCE1 # %files # %{_sysusersdir}/%{name}.conf %sysusers_create_package() \ systemd-sysusers --replace=%_sysusersdir/%1.conf - <<SYSTEMD_INLINE_EOF &>/dev/null || : \ %(cat %2) \ SYSTEMD_INLINE_EOF \ %{nil} # This may be used by package installation scripts to create files according to # their tmpfiles configuration from a package installation script, even before # the files of that package are installed on disk. # # Example: # Source1: %{name}-tmpfiles.conf # ... # %install # install -D %SOURCE1 %{buildroot}%{_tmpfilesdir}/%{name}.conf # %pre # %tmpfiles_create_package %{name} %SOURCE1 # %files # %{_tmpfilesdir}/%{name}.conf %tmpfiles_create_package() \ systemd-tmpfiles --replace=%_tmpfilesdir/%1.conf --create - <<SYSTEMD_INLINE_EOF &>/dev/null || : \ %(cat %2) \ SYSTEMD_INLINE_EOF \ %{nil} %sysctl_apply() \ /usr/lib/systemd/systemd-sysctl %{?*} &>/dev/null || : \ %{nil} %binfmt_apply() \ /usr/lib/systemd/systemd-binfmt %{?*} &>/dev/null || : \ %{nil} PK ��ZǾ$n n macros.selinux-policynu �[��� # Copyright (C) 2017 Red Hat, Inc. All rights reserved. # # Author: Petr Lautrbach <plautrba@redhat.com> # Author: Lukáš Vrabec <lvrabec@redhat.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # RPM macros for packages installing SELinux modules %_selinux_policy_version 3.14.3 %_selinux_store_path /var/lib/selinux %_selinux_store_policy_path %{_selinux_store_path}/${_policytype} %_file_context_file %{_sysconfdir}/selinux/${SELINUXTYPE}/contexts/files/file_contexts %_file_context_file_pre %{_localstatedir}/lib/rpm-state/file_contexts.pre %_file_custom_defined_booleans %{_selinux_store_policy_path}/rpmbooleans.custom %_file_custom_defined_booleans_tmp %{_selinux_store_policy_path}/rpmbooleans.custom.tmp # %selinux_requires %selinux_requires \ Requires: selinux-policy >= %{_selinux_policy_version} \ BuildRequires: git \ BuildRequires: pkgconfig(systemd) \ BuildRequires: selinux-policy \ BuildRequires: selinux-policy-devel \ Requires(post): selinux-policy-base >= %{_selinux_policy_version} \ Requires(post): libselinux-utils \ Requires(post): policycoreutils \ %if 0%{?fedora} || 0%{?rhel} > 7\ Requires(post): policycoreutils-python-utils \ %else \ Requires(post): policycoreutils-python \ %endif \ %{nil} # %selinux_modules_install [-s <policytype>] [-p <modulepriority>] module [module]... %selinux_modules_install("s:p:") \ . /etc/selinux/config \ _policytype=%{-s*} \ if [ -z "${_policytype}" ]; then \ _policytype="targeted" \ fi \ if [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ %{_sbindir}/semodule -n -s ${_policytype} -X %{!-p:200}%{-p*} -i %* \ %{_sbindir}/selinuxenabled && %{_sbindir}/load_policy || : \ fi \ %{nil} # %selinux_modules_uninstall [-s <policytype>] [-p <modulepriority>] module [module]... %selinux_modules_uninstall("s:p:") \ . /etc/selinux/config \ _policytype=%{-s*} \ if [ -z "${_policytype}" ]; then \ _policytype="targeted" \ fi \ if [ $1 -eq 0 ]; then \ if [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ %{_sbindir}/semodule -n -X %{!-p:200}%{-p*} -s ${_policytype} -r %* &> /dev/null || : \ %{_sbindir}/selinuxenabled && %{_sbindir}/load_policy || : \ fi \ fi \ %{nil} # %selinux_relabel_pre [-s <policytype>] %selinux_relabel_pre("s:") \ . /etc/selinux/config \ _policytype=%{-s*} \ if [ -z "${_policytype}" ]; then \ _policytype="targeted" \ fi \ if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ [ -f %{_file_context_file_pre} ] || cp -f %{_file_context_file} %{_file_context_file_pre} \ fi \ %{nil} # %selinux_relabel_post [-s <policytype>] %selinux_relabel_post("s:") \ . /etc/selinux/config \ _policytype=%{-s*} \ if [ -z "${_policytype}" ]; then \ _policytype="targeted" \ fi \ if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ if [ -f %{_file_context_file_pre} ]; then \ %{_sbindir}/fixfiles -C %{_file_context_file_pre} restore &> /dev/null \ rm -f %{_file_context_file_pre} \ fi \ fi \ %{nil} # %selinux_set_booleans [-s <policytype>] boolean [boolean]... %selinux_set_booleans("s:") \ . /etc/selinux/config \ _policytype=%{-s*} \ if [ -z "${_policytype}" ]; then \ _policytype="targeted" \ fi \ if [ -d "%{_selinux_store_policy_path}" ]; then \ LOCAL_MODIFICATIONS=$(%{_sbindir}/semanage boolean -E) \ if [ ! -f %_file_custom_defined_booleans ]; then \ /bin/echo "# This file is managed by macros.selinux-policy. Do not edit it manually" > %_file_custom_defined_booleans \ fi \ semanage_import='' \ for boolean in %*; do \ boolean_name=${boolean%=*} \ boolean_value=${boolean#*=} \ boolean_local_string=$(grep "$boolean_name\$" <<<$LOCAL_MODIFICATIONS) \ if [ -n "$boolean_local_string" ]; then \ semanage_import="${semanage_import}\\nboolean -m -$boolean_value $boolean_name" \ boolean_customized_string=$(grep "$boolean_name\$" %_file_custom_defined_booleans | tail -n 1) \ if [ -n "$boolean_customized_string" ]; then \ /bin/echo $boolean_customized_string >> %_file_custom_defined_booleans \ else \ /bin/echo $boolean_local_string >> %_file_custom_defined_booleans \ fi \ else \ semanage_import="${semanage_import}\\nboolean -m -$boolean_value $boolean_name" \ boolean_default_value=$(LC_ALL=C %{_sbindir}/semanage boolean -l | grep "^$boolean_name " | sed 's/[^(]*([^,]*, *\\(on\\|off\\).*/\\1/') \ /bin/echo "boolean -m --$boolean_default_value $boolean_name" >> %_file_custom_defined_booleans \ fi \ done; \ if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" \ elif test -d /usr/share/selinux/"${_policytype}"/base.lst; then \ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" -N \ fi \ fi \ %{nil} # %selinux_unset_booleans [-s <policytype>] boolean [boolean]... %selinux_unset_booleans("s:") \ . /etc/selinux/config \ _policytype=%{-s*} \ if [ -z "${_policytype}" ]; then \ _policytype="targeted" \ fi \ if [ -d "%{_selinux_store_policy_path}" ]; then \ semanage_import='' \ for boolean in %*; do \ boolean_name=${boolean%=*} \ boolean_customized_string=$(grep "$boolean_name\$" %_file_custom_defined_booleans | tail -n 1) \ if [ -n "$boolean_customized_string" ]; then \ awk "/$boolean_customized_string/ && !f{f=1; next} 1" %_file_custom_defined_booleans > %_file_custom_defined_booleans_tmp && mv %_file_custom_defined_booleans_tmp %_file_custom_defined_booleans \ if ! grep -q "$boolean_name\$" %_file_custom_defined_booleans; then \ semanage_import="${semanage_import}\\n${boolean_customized_string}" \ fi \ fi \ done; \ if %{_sbindir}/selinuxenabled && [ "${SELINUXTYPE}" = "${_policytype}" ]; then \ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" \ elif test -d /usr/share/selinux/"${_policytype}"/base.lst; then \ /bin/echo -e "$semanage_import" | %{_sbindir}/semanage import -S "${_policytype}" -N \ fi \ fi \ %{nil} PK ��Zi�o�� � macros.systemtapnu �[��� # -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */ # # RPM macros for packages installing systemtap tapset files %_systemtap_tapsetdir /usr/share/systemtap/tapset %_systemtap_datadir /usr/share/systemtap PK ��Z{ Y� � macros.alt-python38nu �[��� %__alt_python38 /opt/alt/python38/bin/python3 %alt_python38_sitelib %(%{__alt_python38} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %alt_python38_sitearch %(%{__alt_python38} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %alt_python38_version %(%{__alt_python38} -Ic "import sys; sys.stdout.write(sys.version[:3])") %alt_python38_version_nodots %(%{__alt_python38} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))") %alt_py38dir %{_builddir}/python3-%{name}-%{version}-%{release} %alt_python38_dir /opt/alt/python38 %py_setup setup.py %alt_py38_shbang_opts -s %alt_py38_shbang_opts_nodash %(opts=%{alt-py38_shbang_opts}; echo ${opts#-}) # Use the slashes after expand so that the command starts on the same line as # the macro %alt_py38_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python38} %{py_setup} %{?py_setup_args} build --executable="%{__alt_python38} %{alt-py38_shbang_opts}" %{?*} } %alt_py38_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python38} %{py_setup} %{?py_setup_args} bdist_egg %{?*} } %alt_py38_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python38} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} } %alt_py38_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python38} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %alt_py38_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{alt_python38_sitelib} %alt_easy_install-3.8 -m --prefix %{buildroot}%{_prefix} -Z dist/*-py3.8.egg %{?*} %{alt_python38_dir}/bin/easy_install-3.8 %{alt_python38_locate}/bin/easy_install-3.8 } %alt_py38_install_wheel() %{expand:\\\ %{alt_python38_dir}/bin/pip3.8 install -I dist/%{1} --root %{buildroot} --no-deps } PK ��ZҤ]� macros.alt-python310nu �[��� %__alt_python310 /opt/alt/python310/bin/python3 %alt_python310_sitelib %(%{__alt_python310} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %alt_python310_sitearch %(%{__alt_python310} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))") %alt_python310_version %(%{__alt_python310} -Ic "import sys; sys.stdout.write(sys.version[:3])") %alt_python310_version_nodots %(%{__alt_python310} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))") %alt_py310dir %{_builddir}/python3-%{name}-%{version}-%{release} %alt_python310_dir /opt/alt/python310 %py_setup setup.py %alt_py310_shbang_opts -s %alt_py310_shbang_opts_nodash %(opts=%{alt_py310_shbang_opts}; echo ${opts#-}) # Use the slashes after expand so that the command starts on the same line as # the macro %alt_py310_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python310} %{py_setup} %{?py_setup_args} build --executable="%{__alt_python310} %{alt_py310_shbang_opts}" %{?*} } %alt_py310_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python310} %{py_setup} %{?py_setup_args} bdist_egg %{?*} } %alt_py310_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python310} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} } %alt_py310_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python310} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %alt_py310_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{alt_python310_sitelib} %alt_easy_install-3.9 -m --prefix %{buildroot}%{_prefix} -Z dist/*-py3.9.egg %{?*} %{alt_python310_dir}/bin/easy_install-3.9 %{alt_python310_locate}/bin/easy_install-3.9 } %alt_py310_install_wheel() %{expand:\\\ %{alt_python310_dir}/bin/pip3.9 install -I dist/%{1} --root %{buildroot} --no-deps } PK ��Ze�!� � macros.alt-python39nu �[��� %__alt_python39 /opt/alt/python39/bin/python3 %alt_python39_sitelib %(%{__alt_python39} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %alt_python39_sitearch %(%{__alt_python39} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))") %alt_python39_version %(%{__alt_python39} -Ic "import sys; sys.stdout.write(sys.version[:3])") %alt_python39_version_nodots %(%{__alt_python39} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))") %alt_py39dir %{_builddir}/python3-%{name}-%{version}-%{release} %alt_python39_dir /opt/alt/python39 %py_setup setup.py %alt_py39_shbang_opts -s %alt_py39_shbang_opts_nodash %(opts=%{alt_py39_shbang_opts}; echo ${opts#-}) # Use the slashes after expand so that the command starts on the same line as # the macro %alt_py39_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python39} %{py_setup} %{?py_setup_args} build --executable="%{__alt_python39} %{alt_py39_shbang_opts}" %{?*} } %alt_py39_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python39} %{py_setup} %{?py_setup_args} bdist_egg %{?*} } %alt_py39_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python39} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} } %alt_py39_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python39} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %alt_py39_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{alt_python39_sitelib} %alt_easy_install-3.9 -m --prefix %{buildroot}%{_prefix} -Z dist/*-py3.9.egg %{?*} %{alt_python39_dir}/bin/easy_install-3.9 %{alt_python39_locate}/bin/easy_install-3.9 } %alt_py39_install_wheel() %{expand:\\\ %{alt_python39_dir}/bin/pip3.9 install -I dist/%{1} --root %{buildroot} --no-deps } PK ��Z �)L macros.alt-python311nu �[��� %__alt_python311 /opt/alt/python311/bin/python3 %alt_python311_sitelib %(%{__alt_python311} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %alt_python311_sitearch %(%{__alt_python311} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))") %alt_python311_version %(%{__alt_python311} -Ic "import sys; sys.stdout.write(sys.version[:3])") %alt_python311_version_nodots %(%{__alt_python311} -Ic "import sys; sys.stdout.write(sys.version[:3].replace('.',''))") %alt_py311dir %{_builddir}/python3-%{name}-%{version}-%{release} %alt_python311_dir /opt/alt/python311 %py_setup setup.py %alt_py311_shbang_opts -s %alt_py311_shbang_opts_nodash %(opts=%{alt_py311_shbang_opts}; echo ${opts#-}) # Use the slashes after expand so that the command starts on the same line as # the macro %alt_py311_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python311} %{py_setup} %{?py_setup_args} build --executable="%{__alt_python311} %{alt_py311_shbang_opts}" %{?*} } %alt_py311_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python311} %{py_setup} %{?py_setup_args} bdist_egg %{?*} } %alt_py311_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python311} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} } %alt_py311_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__alt_python311} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %alt_py311_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{alt_python311_sitelib} %alt_easy_install-3.9 -m --prefix %{buildroot}%{_prefix} -Z dist/*-py3.9.egg %{?*} %{alt_python311_dir}/bin/easy_install-3.9 %{alt_python311_locate}/bin/easy_install-3.9 } %alt_py311_install_wheel() %{expand:\\\ %{alt_python311_dir}/bin/pip3.9 install -I dist/%{1} --root %{buildroot} --no-deps } PK ��Z�~�� � macros.rubynu �[��� %ruby_libdir %{_datadir}/%{srcname} %ruby_libarchdir %{_libdir}/%{srcname} # This is the local lib/arch and should not be used for packaging. %ruby_sitedir site_ruby %ruby_sitelibdir %{_prefix}/share/%{srcname}/%{ruby_sitedir} %ruby_sitearchdir %{_prefix}/%{_lib}/%{srcname}/%{ruby_sitedir} # This is the general location for libs/archs compatible with all # or most of the Ruby versions available in the Fedora repositories. %ruby_vendordir vendor_ruby %ruby_vendorlibdir %{ruby_libdir}/%{ruby_vendordir} %ruby_vendorarchdir %{ruby_libarchdir}/%{ruby_vendordir} # For ruby packages we want to filter out any provides caused by private # libs in %%{ruby_vendorarchdir}/%%{ruby_sitearchdir}. # # Note that this must be invoked in the spec file, preferably as # "%{?ruby_default_filter}", before any %description block. %ruby_default_filter %{expand: \ %global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^(%{ruby_vendorarchdir}|%{ruby_sitearchdir})/.*\\\\.so$ \ } PK ��Z���Y� � macros.javapackages-filesystemnu �[��� # # RPM macros for Java filesystem layout. # # JPackage Project <http://www.jpackage.org/> # David Walluck <david@jpackage.org> # Ville Skyttä <scop at jpackage.org> # Nicolas Mailhot <Nicolas.Mailhot@laPoste.net> # #============================================================================== # ---- default Java directories # # Root directory where all Java VMs/SDK/JREs are installed. # %_jvmdir %{_prefix}/lib/jvm # # Root directory for all Java VM/SDK/JRE's private things. # %_jvmprivdir %{_prefix}/lib/jvm-private # # Root directory for all architecture dependent parts of Java VM/SDK/JRE's # %_jvmlibdir %{_prefix}/lib/jvm # # Root directory for all architecture independent parts of Java VM/SDK/JRE's # %_jvmdatadir %{_datadir}/jvm # # Root directory for all configurations parts of Java VM/SDK/JRE's # %_jvmsysconfdir %{_sysconfdir}/jvm # # Root directory for all common architecture dependent parts of Java VM/SDK/JRE's # %_jvmcommonlibdir %{_prefix}/lib/jvm-commmon # # Root directory for all common architecture independent parts of Java VM/SDK/JRE's # %_jvmcommondatadir %{_datadir}/jvm-commmon # # Root directory for all common configurations parts of Java VM/SDK/JRE's # %_jvmcommonsysconfdir %{_sysconfdir}/jvm-commmon # # Directory containing Java configuration file (java.conf) # %_javaconfdir %{_sysconfdir}/java # # Directory where arch and version independent jars are installed. # This has already been integrated in RH macros following our request. # %_javadir %{_datadir}/java # # Directory where arch-specific (JNI) version-independent jars are installed. # %_jnidir %{_prefix}/lib/java # # Root directory where all javadoc is installed. Also already in RH macros. # %_javadocdir %{_datadir}/javadoc # # Directory for Maven POM files # %_mavenpomdir %{_datadir}/maven-poms # # Directory for Ivy XML files # %_ivyxmldir %{_datadir}/ivy-xmls PK ��Z����� � macros.python-srpmnu �[��� # python3_pkgversion specifies the version of Python 3 in the distro. It can be # a specific version (e.g. 34 in Fedora EPEL7) %python3_pkgversion 3 # Set to /bin/true to avoid %ifdefs and %{? in specfiles %__python3_other /bin/true %py3_other_build /bin/true %py3_other_install /bin/true # Define where Python wheels will be stored and the prefix of -wheel packages # - In Fedora we want wheel subpackages named e.g. `python-pip-wheel` that # install packages into `/usr/share/python-wheels`. Both names are not # versioned, because they're used by all Python 3 stacks. # - In RHEL we want wheel packages named e.g. `python3-pip-wheel` and # `python3.11-pip-wheel` that install packages into similarly versioned # locations. We want each Python stack in RHEL to have their own wheels, # because the main python3 wheels (which we can't upgrade) will likely be # quite old by the time we're adding new alternate Python stacks. # - In ELN we want to follow Fedora, because builds for ELN and Fedora rawhide # need to be interoperable. %python_wheel_pkg_prefix python%{?rhel:%{!?eln:%{python3_pkgversion}}} %python_wheel_dir %{_datadir}/%{python_wheel_pkg_prefix}-wheels # === Macros for Build/Requires tags using Python dist tags === # - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages # - These macros need to be in macros.python-srpm, because BuildRequires tags # get rendered as runtime requires into the metadata of SRPMs. # Converts Python dist name to a canonical format %py_dist_name() %{lua:\ name = rpm.expand("%{?1:%{1}}");\ canonical = string.gsub(string.lower(name), "[^%w%.]+", "-");\ print(canonical);\ } # Creates Python 2 dist tag(s) after converting names to canonical format # Needs to first put all arguments into a list, because invoking a different # macro (%py_dist_name) overwrites them %py2_dist() %{lua:\ args = {}\ arg = 1\ while (true) do\ name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\ if (name == nil or name == '') then\ break\ end\ args[arg] = name\ arg = arg + 1\ end\ for arg, name in ipairs(args) do\ canonical = rpm.expand("%py_dist_name " .. name);\ print("python2dist(" .. canonical .. ") ");\ end\ } # RHEL 9+ and Fedora compatibility macro # Only use in macro backports, not intended to be used in spec files! # In the future, the %%python3_pkgversion macro has a dot, e.g. 3.9 or 3.11 # However, in RHEL 8 at least, it does not, e.g. 38, 39 # This is a helpful macro that determines the proper "Python version" string with dot # from %%python3_pkgversion without actually having Python installed. # For values other than 3X, it should expand to %%python3_pkgversion unchanged. # Examples of %%python3_pkgversion -> %%_python3_pkgversion_with_dot: # 3 -> 3 # 38 -> 3.8 # 39 -> 3.9 # 310 -> 3.10 # 3.12 -> 3.12 # 4 -> 4 # 412 -> 412 %_python3_pkgversion_with_dot %{lua:print((rpm.expand("%python3_pkgversion"):gsub('^3(%d)', '3.%1')))} # Creates Python 3 dist tag(s) after converting names to canonical format # Needs to first put all arguments into a list, because invoking a different # macro (%py_dist_name) overwrites them %py3_dist() %{lua:\ python3_pkgversion_with_dot = rpm.expand("%_python3_pkgversion_with_dot")\ args = {}\ arg = 1\ while (true) do\ name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\ if (name == nil or name == '') then\ break\ end\ args[arg] = name\ arg = arg + 1\ end\ for arg, name in ipairs(args) do\ canonical = rpm.expand("%py_dist_name " .. name);\ print("python" .. python3_pkgversion_with_dot .. "dist(" .. canonical .. ") ");\ end\ } # Macro to replace overly complicated references to PyPI source files. # Expands to the pythonhosted URL for a package # Accepts zero to three arguments: # 1: The PyPI project name, defaulting to %srcname if it is defined, then # %pypi_name if it is defined, then just %name. # 2: The PYPI version, defaulting to %version with tildes stripped. # 3: The file extension, defaulting to "tar.gz". (A period will be added # automatically.) # Requires %__pypi_url and %__pypi_default_extension to be defined. %__pypi_url https://files.pythonhosted.org/packages/source/ %__pypi_default_extension tar.gz %pypi_source() %{lua: local src = rpm.expand('%1') local ver = rpm.expand('%2') local ext = rpm.expand('%3') local url = rpm.expand('%__pypi_url') \ -- If no first argument, try %srcname, then %pypi_name, then %name -- Note that rpm leaves macros unchanged if they are not defined. if src == '%1' then src = rpm.expand('%srcname') end if src == '%srcname' then src = rpm.expand('%pypi_name') end if src == '%pypi_name' then src = rpm.expand('%name') end \ -- If no second argument, use %version if ver == '%2' then ver = rpm.expand('%version'):gsub('~', '') end \ -- If no third argument, use the preset default extension if ext == '%3' then ext = rpm.expand('%__pypi_default_extension') end \ local first = string.sub(src, 1, 1) \ print(url .. first .. '/' .. src .. '/' .. src .. '-' .. ver .. '.' .. ext) } # Python packages in RHEL 8 should not provide unversioned python- names # so this macro here is just a compatibility layer and only provides the given name. %py_provides() %{lua: local name = rpm.expand('%1') if name == '%1' then rpm.expand('%{error:%%py_provides requires at least 1 argument, the name to provide}') end local evr = rpm.expand('%2') if evr == '%2' then evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}') end print('Provides: ' .. name .. ' = ' .. evr .. '\\n') } PK ��Z�=v v macros.pybytecompilenu �[��� # Note that the path could itself be a python file, or a directory # Python's compile_all module only works on directories, and requires a max # recursion depth # Usage: # %py_byte_compile <interpereter> <path> # Example: # %py_byte_compile %{__python3} %{buildroot}%{_datadir}/spam/plugins/ # This will terminate build on SyntaxErrors, if you want to avoid that, # use it in a subshell like this: # (%{py_byte_compile <interpereter> <path>}) || : %py_byte_compile()\ python_binary="%1"\ buildroot_path="%2"\ bytecode_compilation_path=".${buildroot_path/#$RPM_BUILD_ROOT}"\ failure=0\ pushd $RPM_BUILD_ROOT\ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -m py_compile || failure=1\ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -m py_compile || failure=1\ popd\ test $failure -eq 0 PK ��Z(�LVo o macros.pythonnu �[��� # %%__python is defined in /usr/lib/rpm/macros to raise an error # so if you don't redefine it, you'll get the same error from %%python %python %__python %python_platform_triplet %(%{__python} -Esc "import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))") %python_ext_suffix %(%{__python} -Esc "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") %py_setup setup.py %py_shbang_opts -s %py_shbang_opts_nodash %(opts=%{py_shbang_opts}; echo ${opts#-}) %py_shebang_flags %(opts=%{py_shbang_opts}; echo ${opts#-}) %py_shebang_fix %{expand:\\\ if [ -f /usr/bin/pathfix%{python_version}.py ]; then pathfix=/usr/bin/pathfix%{python_version}.py else # unversioned pathfix.py provided by platform-python-devel pathfix=/usr/bin/pathfix.py fi if [ -z "%{?py_shebang_flags}" ]; then shebang_flags="-k" else shebang_flags="-ka%{py_shebang_flags}" fi $pathfix -pni %{__python} $shebang_flags} # Use the slashes after expand so that the command starts on the same line as # the macro %py_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python} %{py_setup} %{?py_setup_args} build --executable="%{__python} %{py_shbang_opts}" %{?*} sleep 1 } %py_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python} %{py_setup} %{?py_setup_args} bdist_egg %{?*} sleep 1 } %py_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} sleep 1 } %py_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %py_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{python_sitelib} easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python_version}.egg %{?*} } %py_install_wheel() %{expand:\\\ pip install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps } %python_provide() %{lua: function string.starts(String,Start) return string.sub(String,1,string.len(Start))==Start end package = rpm.expand("%{?1}") vr = rpm.expand("%{?epoch:%{epoch}:}%{version}-%{release}") if (string.starts(package, "python2-")) then --No unversioned provides as python2 is not default elseif (string.starts(package, "python" .. rpm.expand("%{python3_pkgversion}") .. "-")) then --No unversioned provides as python3 is not default elseif (rpm.expand("%{?python3_other_pkgversion}") ~= "" and string.starts(package, "python" .. rpm.expand("%{python3_other_pkgversion}") .. "-")) then --No unversioned provides as python3_other is not default elseif (string.starts(package, "pypy-")) then --No unversioned provides as pypy is not default elseif (string.starts(package, "pypy3-")) then --No unversioned provides as pypy is not default elseif (string.starts(package, "python-")) then --Providing the current default python print("Provides: python2-") print(string.sub(package,8,string.len(package))) print(" = ") print(vr) else print("%python_provide: ERROR: ") print(package) print(" not recognized.") end } %python_enable_dependency_generator() \ %global __python_requires %{_rpmconfigdir}/pythondistdeps.py --requires \ %{nil} PK ��Zr�S�� � macros.python3nu �[��� %__python3 /usr/libexec/platform-python %python3 %__python3 %python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %python3_version %(%{__python3} -Ic "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %python3_version_nodots %(%{__python3} -Ic "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info).replace('.',''))") %python3_platform %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_platform())") %python3_platform_triplet %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))") %python3_ext_suffix %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") %py3dir %{_builddir}/python3-%{name}-%{version}-%{release} %py3_shbang_opts -s %py3_shbang_opts_nodash %(opts=%{py3_shbang_opts}; echo ${opts#-}) %py3_shebang_flags %(opts=%{py3_shbang_opts}; echo ${opts#-}) %py3_shebang_fix %{expand:\\\ if [ -f /usr/bin/pathfix%{python3_version}.py ]; then pathfix=/usr/bin/pathfix%{python3_version}.py else # unversioned pathfix.py provided by platform-python-devel pathfix=/usr/bin/pathfix.py fi if [ -z "%{?py3_shebang_flags}" ]; then shebang_flags="-k" else shebang_flags="-ka%{py3_shebang_flags}" fi $pathfix -pni %{__python3} $shebang_flags} # Use the slashes after expand so that the command starts on the same line as # the macro %py3_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*} sleep 1 } %py3_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*} sleep 1 } %py3_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} sleep 1 } %py3_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %py3_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{python3_sitelib} CFLAGS="%{optflags}" %{__python3} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*} } %py3_install_wheel() %{expand:\\\ CFLAGS="%{optflags}" %{__python3} -m pip install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps } # This only supports Python 3.5+ and will never work with Python 2. # Hence, it has no Python version in the name. %pycached() %{lua: path = rpm.expand("%{?*}") if (string.sub(path, "-3") ~= ".py") then rpm.expand("%{error:%%pycached can only be used with paths explicitly ending with .py}") else print(path) pyminor = path:match("/python3.(%d+)/") or "*" dirname = path:match("(.*/)") modulename = path:match(".*/([^/]+).py") print("\\n" .. dirname .. "__pycache__/" .. modulename .. ".cpython-3" .. pyminor .. "{,.opt-?}.pyc") end } # This is intended for Python 3 only, hence also no Python version in the name. %__pytest /usr/bin/pytest-%{_python3_pkgversion_with_dot} %pytest %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ PATH="%{buildroot}%{_bindir}:$PATH"\\\ PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\ PYTHONDONTWRITEBYTECODE=1\\\ %__pytest} PK ��Z.p�� � macros.infonu �[��� %info_requires \ Requires(post): /sbin/install-info \ Requires(preun): /sbin/install-info %info_post() \ if [ -f %{_infodir}/%1 ]; then # --excludedocs? \ /sbin/install-info %{_infodir}/%1 %{_infodir}/dir || : \ fi %info_preun() \ if [ $1 == 0 ]; then \ if [ -f %{_infodir}/%1 ]; then # --excludedocs? \ /sbin/install-info --delete %{_infodir}/%1 %{_infodir}/dir || : \ fi \ fi PK ��Zx�(o( ( macros.vimnu �[��� %vimfiles_root %{_datadir}/vim/vimfiles PK ��Z�[�G G macros.python2nu �[��� %__python2 /usr/bin/python2 %python2_sitelib %(RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %python2_sitearch %(RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %python2_version %(RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %python2_version_nodots %(RHEL_ALLOW_PYTHON2_FOR_BUILD=1 %{__python2} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") %py2_shbang_opts -s # Use the slashes after expand so that the command starts on the same line as # the macro %py2_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?*} sleep 1 } %py2_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} bdist_egg %{?*} sleep 1 } %py2_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} sleep 1 } %py2_install() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} } %py2_install_egg() %{expand:\\\ mkdir -p %{buildroot}%{python2_sitelib} easy_install-%{python2_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python2_version}.egg %{?*} } %py2_install_wheel() %{expand:\\\ pip%{python2_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps } PK ��Z��d5 macros.perl-srpmnu �[��� # Copyright (c) 2012 Petr Pisar <ppisar@redhat.com>. # This file is distributed under the terms of GNU GPL license version 3, or # any later version. # This file contains macros that can be used for building source RPM package # from git source repository. This file must present in minimal build root to # take effect. # This file must not use Perl or any non-minimal-build-root package. The # purpose is to enable bootstrapping perl. # Perl bootstrap For rebuild of Perl and all related packages is needed # switch, which enable only vital build requires. This could help cyclic # dependencies, for example: perl-Test-Minimum-Version <-> # perl-Perl-Minimum-Version Defined for bootstraping, undefined otherwise. # Usage: %%if !%%{defined perl_bootstrap} ... %%endif #%%perl_bootstrap 1 PK ��Z�= = macros.rust-srpmnu �[��� %rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x PK ��Z]���h h macros.openblas-srpmnu �[��� # Architectures that OpenBLAS supports %openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64 s390x PK ��Z��Ҟ� � macros.ocaml-srpmnu �[��� # Note that OCaml is compiled on all architectures. However # on some (rare) architectures, only bytecode compilation is # available. Use these macros to find out if native code # compilation is available on a particular architecture. # Architectures that support the OCaml native code compiler. %ocaml_native_compiler aarch64 %{arm} %{ix86} ppc ppc64 ppc64le riscv64 s390x sparc sparcv9 x86_64 # Architectures that support native dynamic linking of OCaml code. %ocaml_natdynlink aarch64 %{arm} %{ix86} ppc ppc64 ppc64le riscv64 s390x sparc sparcv9 x86_64 # Architectures that support profiling of native code (ocamlopt -p). %ocaml_native_profiling %{arm} %{ix86} ppc ppc64 ppc64le sparc sparcv9 x86_64 PK ��Z-�K�� � macros.go-srpmnu �[��� # Copyright (c) 2015-2021 Jakub Cajka <jcajka@redhat.com>, # Jan Chaloupka <jchaloup@redhat.com>, # Nicolas Mailhot <nim@fedoraproject.org> # Alejandro Saez Morollon <asm@redhat.com> # This file is distributed under the terms of GNU GPL license version 3, or # any later version. # This file contains macros for building projects in golang for packages # with golang compiler or gcc-go compiler based on an architecture. # Golang is primarly for primary architectures, gcc-go for secondary. # # This file provides only macros and must not use any other package except # redhat-rpm-macros. # Define arches for PA and SA %golang_arches x86_64 %{arm} aarch64 ppc64le s390x %gccgo_arches %{mips} %go_arches %{golang_arches} %{gccgo_arches} # Where to set GOPATH for builds %gopath %{_datadir}/gocode # Define go_compilers macro to signal go-compiler package is available %go_compiler 1 # Sanitize a Go import path that can then serve as rpm package name # Mandatory parameter: a Go import path %gorpmname() %{lua: local goname = rpm.expand("%1") -- lowercase and end with '/' goname = string.lower(goname .. "/") -- remove eventual protocol prefix goname = string.gsub(goname, "^http(s?)://", "") -- add golang prefix goname = "golang-" .. goname -- remove FQDN root (.com, .org, etc) goname = string.gsub(goname, "^([^/]+)%.([^%./]+)/", "%1/") -- special-case x.y.z number-strings as that’s an exception in our naming -- guidelines repeat goname, i = string.gsub(goname, "(%d)%.(%d)", "%1:%2") until i == 0 -- replace various separators rpm does not like with - goname = string.gsub(goname, "[%._/%-]+", "-") -- because of the Azure sdk goname = string.gsub(goname, "%-for%-go%-", "-") -- Tokenize along - separators and remove duplicates to avoid -- golang-foo-foo-bar-foo names local result = "" local tokens = {} tokens["go"] = true tokens["git"] = true for token in string.gmatch(goname, "[^%-]+") do if not tokens[token] then result = result .. "-" .. token tokens[token] = true end end -- reassemble the string, restore x.y.z runs, convert the vx.y.z -- Go convention to x.y.z as prefered in rpm naming result = string.gsub(result, "^-", "") result = string.gsub(result, ":", ".") -- some projects have a name that end up in a number, and *also* add release -- numbers on top of it, keep a - prefix before version strings result = string.gsub(result, "%-v([%.%d])", "-%1") print(result) } # Map Go information to rpm metadata. This macro will compute default spec # variable values. # # The following spec variable MUST be set before calling the macro: # # goipath the packaged Go project import path # # The following spec variables SHOULD be set before calling the macro: # # forgeurl the project url on the forge, strongly recommended, if it can not # be deduced from goipath; alternatively, use -u <url> # Version if applicable, set it with Version: <version> # tag if applicable # commit if applicable # # The macro will attempt to compute and set the following variables if they are # not already set by the packager: # # goname an rpm-compatible package name derived from goipath # gosource an URL that can be used as SourceX: value # gourl an URL that can be used as URL: value # # It will delegate processing to the forgemeta macro for: # # forgesource an URL that can be used as SourceX: value # forgesetupargs the correct arguments to pass to %setup for this source # used by %forgesetup and %forgeautosetup # archivename the source archive filename, without extentions # archiveext the source archive filename extensions, without leading dot # archiveurl the url that can be used to download the source archive, # without renaming # scm the scm type, when packaging code snapshots: commits or tags # # If the macro is unable to parse your forgeurl value set at least archivename # and archiveurl before calling it. # # Most of the computed variables are both overridable and optional. However, # the macro WILL REDEFINE %{dist} when packaging a snapshot (commit or tag). # The previous %{dist} value will be lost. Don’t call the macro if you don’t # wish %{dist} to be changed. # # Optional parameters: # -u <url> Ignore forgeurl even if it exists and use <url> instead. Note # that the macro will still end up setting <url> as the forgeurl # spec variable if it manages to parse it. # -s Silently ignore problems in forgeurl, use it if it can be parsed, # ignore it otherwise. # -p Restore problem handling, override -s. # -v Be verbose and print every spec variable the macro sets. # -i Print some info about the state of spec variables the macro may use or # set at the end of the processing. %gometa(u:spvi) %{expand:%{lua: local forgeurl = rpm.expand("%{?-u*}") if (forgeurl == "") then forgeurl = rpm.expand("%{?forgeurl}") end -- Be explicit about the spec variables we’re setting local function explicitset(rpmvariable,value) rpm.define(rpmvariable .. " " .. value) if (rpm.expand("%{?-v}") ~= "") then rpm.expand("%{echo:Setting %%{" .. rpmvariable .. "} = " .. value .. "\\n}") end end -- Never ever stomp on a spec variable the packager already set local function safeset(rpmvariable,value) if (rpm.expand("%{?" .. rpmvariable .. "}") == "") then explicitset(rpmvariable,value) end end -- All the Go packaging automation relies on goipath being set local goipath = rpm.expand("%{?goipath}") if (goipath == "") then rpm.expand("%{error:Please set the Go import path in the “goipath” variable before calling “gometa”!}") end -- Compute and set spec variables if (forgeurl ~= "") then rpm.expand("%forgemeta %{?-v} %{?-i} %{?-s} %{?-p} -u " .. forgeurl .. "\\n") safeset("gourl", forgeurl) else safeset("gourl", "https://" .. goipath) rpm.expand("%forgemeta %{?-v} %{?-i} -s %{?-p} -u %{gourl}\\n") end if (rpm.expand("%{?forgesource}") ~= "") then safeset("gosource", "%{forgesource}") else safeset("gosource", "%{gourl}/%{archivename}.%{archiveext}") end safeset("goname", "%gorpmname %{goipath}") -- Final spec variable summary if the macro was called with -i if (rpm.expand("%{?-i}") ~= "") then rpm.expand("%{echo:Go-specific packaging variables}") rpm.expand("%{echo: goipath: %{?goipath}}") rpm.expand("%{echo: goname: %{?goname}}") rpm.expand("%{echo: gourl: %{?gourl}}") rpm.expand("%{echo: gosource: %{?gosource}}") end} BuildRequires: compiler(go-compiler) ExclusiveArch: %{go_arches} } # Define commands for building # BUILD_ID can be generated for golang build no matter of debuginfo %gobuild(o:) \ CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build -compiler gc -buildmode pie '-tags=rpm_crashtraceback libtrust_openssl ' -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};\ # Define commands for testing %gotest() go test -compiler gc -ldflags "${LDFLAGS:-}" %{?**}; PK ��Z�T�O� � macros.ghc-srpmnu �[��� # Macros needed for building srpms of Haskell packages # from ghc-7.8 ghci is supported on all arch's # former archs: armv5tel ppc sparcv9 %ghc_arches_with_ghci %{ix86} x86_64 armv7hl ppc64 ppc64le aarch64 s390 s390x %{mips} # ghc_arches is not used in current packages but still here for back compat # former archs: alpha ppc sparcv9 armv5tel %ghc_arches %{ix86} x86_64 armv7hl ppc64 ppc64le aarch64 s390 s390x PK ��Z�F9�q q macros.gconf2nu �[��� # # RPM macros for gconf applications. # # (c) 2006-2007 SUSE LINUX # Author: Stanislav Brabec <sbrabec@suse.cz> # (c) 2009 Red Hat, Inc # Author: Toshio Kuratomi <toshio@fedoraproject.org> # # License: LGPLv2+ # # Usage: # # Preamble: # Requires(pre): GConf2 # Requires(preun): GConf2 # Requires(post): GConf2 # # schemas names are without path and suffix # # # %pre # %gconf_schema_obsolete schema1 # %gconf_schema_prepare schema2 schema3 # # %preun # %gconf_schema_remove schema2 schema3 # # %post # %gconf_schema_upgrade schema2 schema3 # # %files # %{_sysconfdir}/gconf/schemas/schema2.schemas # %{_sysconfdir}/gconf/schemas/schema3.schemas # Copy schemas from old package for later uninstall on upgrade %gconf_schema_prepare() \ if [ "$1" -gt 1 ] ; then \ rm -rf %{_localstatedir}/lib/rpm-state/gconf/* \ for schema in %{*} ; do \ if test -f %{_sysconfdir}/gconf/schemas/"$schema".schemas ; then \ cp -p %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/ || : \ fi \ done \ fi \ %{nil} # Macro to remove schemas. Not meant to be used publically %_do_gconf_schema_remove() \ if test -f %{_sysconfdir}/gconf/schemas/"$schema".schemas ; then \ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \ fi \ %{nil} # Remove schemas unconditionally %gconf_schema_obsolete() \ for schema in %{*} ; do \ %_do_gconf_schema_remove \ done \ %{nil} # Remove schemas on package removal (not upgrade) %gconf_schema_remove() \ if [ "$1" -eq 0 ] ; then \ for schema in %{*} ; do \ %_do_gconf_schema_remove \ done \ fi \ %{nil} %gconf_schema_upgrade() \ for schema in %{*} ; do \ if test -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas ; then \ cmp --quiet %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas \ if test $? != 0; then\ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ gconftool-2 --makefile-uninstall-rule %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas > /dev/null || : \ gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \ fi \ rm -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas \ else \ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || : \ fi \ done \ %{nil} PK ��Z=QA@ @ macros.perlnu �[��� # Sensible Perl-specific RPM build macros. # # Note that these depend on the generic filtering system being in place in # rpm core; but won't cause a build to fail if they're not present. # # Chris Weyl <cweyl@alumni.drew.edu> 2009 # Marcela Mašláňová <mmaslano@redhat.com> 2011 # This macro unsets several common vars used to control how Makefile.PL (et # al) build and install packages. We also set a couple to help some of the # common systems be less interactive. This was blatantly stolen from # cpanminus, and helps building rpms locally when one makes extensive use of # local::lib, etc. # # Usage, in %build, before "%{__perl} Makefile.PL ..." # # %{?perl_ext_env_unset} %perl_ext_env_unset %{expand: unset PERL_MM_OPT MODULEBUILDRC PERL5INC export PERL_AUTOINSTALL="--defaultdeps" export PERL_MM_USE_DEFAULT=1 } ############################################################################# # Filtering macro incantations # keep track of what "revision" of the filtering we're at. Each time we # change the filter we should increment this. %perl_default_filter_revision 3 # By default, for perl packages we want to filter all files in _docdir from # req/prov scanning. # Filtering out any provides caused by private libs in vendorarch/archlib # (vendor/core) is done by rpmbuild since Fedora 20 # <https://fedorahosted.org/fpc/ticket/353>. # # Note that this must be invoked in the spec file, preferably as # "%{?perl_default_filter}", before any %description block. %perl_default_filter %{expand: \ %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir} %global __requires_exclude_from %{?__requires_exclude_from:%__requires_exclude_from|}^%{_docdir} %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\\\(VMS|^perl\\\\(Win32|^perl\\\\(DB\\\\)|^perl\\\\(UNIVERSAL\\\\) %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\\\(VMS|^perl\\\\(Win32 } ############################################################################# # Macros to assist with generating a "-tests" subpackage in a semi-automatic # manner. # # The following macros are still in a highly experimental stage and users # should be aware that the interface and behaviour may change. # # PLEASE, PLEASE CONDITIONALIZE THESE MACROS IF YOU USE THEM. # # See http://gist.github.com/284409 # These macros should be invoked as above, right before the first %description # section, and conditionalized. e.g., for the common case where all our tests # are located under t/, the correct usage is: # # %{?perl_default_subpackage_tests} # # If custom files/directories need to be specified, this can be done as such: # # %{?perl_subpackage_tests:%perl_subpackage_tests t/ one/ three.sql} # # etc, etc. %perl_version %(eval "`%{__perl} -V:version`"; echo $version) %perl_testdir %{_libexecdir}/perl5-tests %cpan_dist_name %(eval echo %{name} | %{__sed} -e 's/^perl-//') # easily mark something as required by -tests and BR to the main package %tests_req() %{expand:\ BuildRequires: %*\ %%tests_subpackage_requires %*\ } # fixup (and create if needed) the shbang lines in tests, so they work and # rpmlint doesn't (correctly) have a fit %fix_shbang_line() \ TMPHEAD=`mktemp`\ TMPBODY=`mktemp`\ for file in %* ; do \ head -1 $file > $TMPHEAD\ tail -n +2 $file > $TMPBODY\ %{__perl} -pi -e '$f = /^#!/ ? "" : "#!%{__perl}$/"; $_="$f$_"' $TMPHEAD\ cat $TMPHEAD $TMPBODY > $file\ done\ %{__perl} -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(qw{%*})"\ %{__rm} $TMPHEAD $TMPBODY\ %{nil} # additional -tests subpackage requires, if any %tests_subpackage_requires() %{expand: \ %global __tests_spkg_req %{?__tests_spkg_req} %* \ } # additional -tests subpackage provides, if any %tests_subpackage_provides() %{expand: \ %global __tests_spkg_prov %{?__tests_spkg_prov} %* \ } # # Runs after the body of %check completes. # %__perl_check_pre %{expand: \ %{?__spec_check_pre} \ pushd %{buildsubdir} \ %define perl_br_testdir %{buildroot}%{perl_testdir}/%{cpan_dist_name} \ %{__mkdir_p} %{perl_br_testdir} \ %{__tar} -cf - %{__perl_test_dirs} | ( cd %{perl_br_testdir} && %{__tar} -xf - ) \ find . -maxdepth 1 -type f -name '*META*' -exec %{__cp} -vp {} %{perl_br_testdir} ';' \ find %{perl_br_testdir} -type f -exec %{__chmod} -c -x {} ';' \ T_FILES=`find %{perl_br_testdir} -type f -name '*.t'` \ %fix_shbang_line $T_FILES \ %{__chmod} +x $T_FILES \ %{_fixperms} %{perl_br_testdir} \ popd \ } # # The actual invoked macro # %perl_subpackage_tests() %{expand: \ %global __perl_package 1\ %global __perl_test_dirs %* \ %global __spec_check_pre %{expand:%{__perl_check_pre}} \ %package tests\ Summary: Test suite for package %{name}\ Group: Development/Debug\ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}\ Requires: /usr/bin/prove \ %{?__tests_spkg_req:Requires: %__tests_spkg_req}\ %{?__tests_spkg_prov:Provides: %__tests_spkg_prov}\ AutoReqProv: 0 \ %description tests\ This package provides the test suite for package %{name}.\ %files tests\ %defattr(-,root,root,-)\ %{perl_testdir}\ } # shortcut sugar %perl_default_subpackage_tests %perl_subpackage_tests t/ PK ��ZM7��K K macros.environment-modulesnu �[��� # RPM macros for environment modules %_modulesdir %{_datadir}/modulefiles PK ��Z�|�2 2 macros.jpackagenu �[��� # # RPM macros for Java applications. # # JPackage Project <http://www.jpackage.org/> # David Walluck <david@jpackage.org> # Ville Skyttä <scop at jpackage.org> # Nicolas Mailhot <Nicolas.Mailhot@laPoste.net> # # # Current default JVM home. # %java_home %(. /usr/share/java-utils/java-functions; set_jvm; echo $JAVA_HOME) #============================================================================== # ---- default Java commands %ant JAVA_HOME=%{java_home} %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }ant %jar %{java_home}/bin/jar %java %(. /usr/share/java-utils/java-functions; set_javacmd; echo $JAVACMD) %javac %{java_home}/bin/javac %javadoc %{java_home}/bin/javadoc # # 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 %{buildroot}%{_bindir} \ cat > %{buildroot}%{_bindir}/%5 << EOF \ #!/bin/bash\ #\ # %{name} script\ # JPackage Project <http://www.jpackage.org/>\ \ # Source functions library\ _prefer_jre="%{?6}"\ . /usr/share/java-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\ chmod 755 %{buildroot}%{_bindir}/%5\ %{nil} PK ��Z�28> macros.efi-srpmnu �[��� # # EFI specific SRPM macro definitions # # Copyright 2018 Peter M Jones <pjones@redhat.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # %_efi_srpm_macros_setup() %{expand:%{lua: -- test if our arch matches local function arch(archmacro) local target = rpm.expand(" %{_target_cpu} ") local arches = rpm.expand(" " .. archmacro .. " ") local match = string.match(arches, target) return (match ~= nil) end -- give us the arch... local function getarch() if arch("ia64") then return("ia64") elseif arch("x86_64") then return("x64") elseif arch("%{ix86}") then return("ia32") elseif arch("aarch64") then return("aa64") elseif arch("%{arm}") then return("arm") else return("none") end end -- alt arch local function getaltarch() if arch("x86_64") then return("ia32") else return("none") end end -- make some macros local done = rpm.expand("%{?_efi}") if done == nil or done == "" then local arch = getarch() local alt = getaltarch() print("%global _efi x86_64 aarch64 %{arm} %{ix86}\\n") print("%global _efi_vendor cloudlinux\\n") if arch == "none" then print("%global _efi_has_arch 0\\n") else print("%global _efi_has_arch 1\\n") end print("%global _efi_arch " .. getarch() .. "\\n") print("%global _efi_arch_upper " .. string.upper(getarch()) .. "\\n") if alt == "none" then print("%global _efi_has_alt_arch 0\\n") else print("%global _efi_has_alt_arch 1\\n") end print("%global _efi_alt_arch " .. alt .. "\\n") print("%global _efi_alt_arch_upper " .. string.upper(alt) .. "\\n") end }} %efi_srpm_macros_version %{expand:%{_efi_srpm_macros_setup}}3 %efi %{expand:%{_efi_srpm_macros_setup}}%{expand:%{_efi}} %efi_vendor %{expand:%{_efi_srpm_macros_setup}}%{expand:%{_efi_vendor}} %efi_esp_root /boot/efi %efi_esp_efi %{efi_esp_root}/EFI %efi_esp_boot %{efi_esp_efi}/BOOT %efi_esp_dir %{expand:%{_efi_srpm_macros_setup}}%{efi_esp_efi}/centos %efi_arch %{expand:%{_efi_srpm_macros_setup}}%{_efi_arch} %efi_arch_upper %{expand:%{_efi_srpm_macros_setup}}%{_efi_arch_upper} %efi_has_arch %{expand:%{_efi_srpm_macros_setup}}0%{_efi_has_arch} %efi_has_alt_arch %{expand:%{_efi_srpm_macros_setup}}0%{_efi_has_alt_arch} %efi_alt_arch %{expand:%{_efi_srpm_macros_setup}}%{?_efi_alt_arch}%{nil} %efi_alt_arch_upper %{expand:%{_efi_srpm_macros_setup}}%{?_efi_alt_arch_upper}%{nil} PK ��Z��* macros.dwznu �[��� # Macros for reducing debug info size using dwz(1) utility. # The two default values below should result in dwz taking at most # 3GB of RAM or so on 64-bit hosts and 2.5GB on 32-bit hosts # on the largest *.debug files (in mid 2012 those are # libreoffice-debuginfo, debuginfos containing # libxul.so.debug and libwebkitgtk-*.so.*.debug). # This needs to be tuned based on the amount of available RAM # on build boxes for each architecture as well as virtual address # space limitations if dwz is 32-bit program. While it needs less # memory than 64-bit program because pointers are smaller, it can # never have more than 4GB-epsilon of RAM and on some architecture # even less than that (e.g. 2GB). # Number of debugging information entries (DIEs) above which # dwz will stop considering file for multifile optimizations # and enter a low memory mode, in which it will optimize # in about half the memory needed otherwise. %_dwz_low_mem_die_limit 10000000 # Number of DIEs above which dwz will stop processing # a file altogether. %_dwz_max_die_limit 50000000 # On x86_64 increase the higher limit to make libwebkit* optimizable. # libwebkit* in mid 2012 contains roughly 87mil DIEs, and 64-bit # dwz is able to optimize it from ~1.1GB to ~410MB using 5.2GB of RAM. %_dwz_max_die_limit_x86_64 110000000 # On ARM, build boxes often have only 512MB of RAM and are very slow. # Lower both the limits. %_dwz_low_mem_die_limit_armv5tel 4000000 %_dwz_low_mem_die_limit_armv7hl 4000000 %_dwz_max_die_limit_armv5tel 10000000 %_dwz_max_die_limit_armv7hl 10000000 %_dwz_limit() %{expand:%%{?%{1}_%{_arch}}%%{!?%{1}_%{_arch}:%%%{1}}} %_find_debuginfo_dwz_opts --run-dwz\\\ --dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\\\ --dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit} PK ��Z��t� macros.fedora-miscnu �[��� # Some miscellaneous Fedora-related macros # List files matching inclusion globs, excluding files matching exclusion blogs # Optional parameters: # – -i "<globs>" inclusion globs # – -x "<globs>" exclusion globs # Globs are space-separated lists of shell globs. Such lists require %{quote:} # use for safe rpm argument passing. # Alternatively, set the following rpm variables before calling the macro: # – “listfiles_include” inclusion globs # — “listfiles_exclude” exclusion globs # Arguments passed to the macro without flags will be interpreted as inclusion # globs. %listfiles(i:x:) %{expand: %if %{lua: print(string.len(rpm.expand("%{?-i*}%{?listfiles_include}%*")))} listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u) %if %{lua: print(string.len(rpm.expand("%{?-x*}%{?listfiles_exclude}")))} while IFS= read -r finc ; do realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\ | sort -u | grep -q "${finc}" || echo "${finc}" done <<< "${listfiles_include}" %else echo "${listfiles_include}" %endif %endif } # https://github.com/rpm-software-management/rpm/issues/581 # Write the contents of a list of rpm variables to a macro file. # The target file must contain the corresponding anchors. # For example %writevars -f myfile foo bar will replace: # @@FOO@@ with the rpm evaluation of %{foo} and # @@BAR@@ with the rpm evaluation of %{bar} # in myfile %writevars(f:) %{lua: local fedora = require "fedora.common" local macrofile = rpm.expand("%{-f*}") local rpmvars = {} for i = 1, rpm.expand("%#") do table.insert(rpmvars, rpm.expand("%" .. i)) end fedora.writevars(macrofile,rpmvars) } # gpgverify verifies signed sources. There is documentation in the script. %gpgverify(k:s:d:) %{lua: local script = rpm.expand("%{_rpmconfigdir}/redhat/gpgverify ") local keyring = rpm.expand("%{-k*}") local signature = rpm.expand("%{-s*}") local data = rpm.expand("%{-d*}") print(script) if keyring ~= "" then print(rpm.expand("--keyring='%{SOURCE" .. keyring .. "}' ")) end if signature ~= "" then print(rpm.expand("--signature='%{SOURCE" .. signature .. "}' ")) end if data ~= "" then print(rpm.expand("--data='%{SOURCE" .. data .. "}' ")) end } # gpgverify verifies signed sources. There is documentation in the script. %gpgverify(k:s:d:) %{lua: local script = rpm.expand("%{_rpmconfigdir}/redhat/gpgverify ") local keyring = rpm.expand("%{-k*}") local signature = rpm.expand("%{-s*}") local data = rpm.expand("%{-d*}") print(script) if keyring ~= "" then print(rpm.expand("--keyring='%{SOURCE" .. keyring .. "}' ")) end if signature ~= "" then print(rpm.expand("--signature='%{SOURCE" .. signature .. "}' ")) end if data ~= "" then print(rpm.expand("--data='%{SOURCE" .. data .. "}' ")) end } PK ��Z �گ� � macros.fedora-misc-srpmnu �[��� # Some miscellaneous Fedora-related macros # A directory for rpm macros %rpmmacrodir /usr/lib/rpm/macros.d # A directory for appdata metainfo. This has changed between releases so a # macro is useful. %_metainfodir %{_datadir}/metainfo PK ��Z��Gs�1 �1 macros.forgenu �[��� # Map forge information to rpm metadata. This macro will compute default spec # variable values. # # The following spec variables SHOULD be set before calling the macro: # # forgeurl the project url on the forge, strongly recommended; # alternatively, use -u <url> # Version if applicable, set it with Version: <version> # tag if applicable # commit if applicable # # The macro will attempt to compute and set the following variables if they are # not already set by the packager: # # forgesource an URL that can be used as SourceX: value # forgesetupargs the correct arguments to pass to %setup for this source # used by %forgesetup and %forgeautosetup # archivename the source archive filename, without extentions # archiveext the source archive filename extensions, without leading dot # archiveurl the url that can be used to download the source archive, # without renaming # scm the scm type, when packaging code snapshots: commits or tags # # If the macro is unable to parse your forgeurl value set at least archivename # and archiveurl before calling it. # # Most of the computed variables are both overridable and optional. However, # the macro WILL REDEFINE %{dist} when packaging a snapshot (commit or tag). # The previous %{dist} value will be lost. Don’t call the macro if you don’t # wish %{dist} to be changed. # # Optional parameters: # -u <url> Ignore forgeurl even if it exists and use <url> instead. Note # that the macro will still end up setting <url> as the forgeurl # spec variable if it manages to parse it. # -s Silently ignore problems in forgeurl, use it if it can be parsed, # ignore it otherwise. # -p Restore problem handling, override -s. # -v Be verbose and print every spec variable the macro sets. # -i Print some info about the state of spec variables the macro may use or # set at the end of the processing. %forgemeta(u:spvi) %{lua: local forgeurl = rpm.expand("%{?-u*}") if (forgeurl == "") then forgeurl = rpm.expand("%{?forgeurl}") end local silent = false local verbose = false local informative = false if (rpm.expand("%{?-s}") ~= "") then silent = true end if (rpm.expand("%{?-p}") ~= "") then silent = false end if (rpm.expand("%{?-v}") ~= "") then verbose = true end if (rpm.expand("%{?-i}") ~= "") then informative = true end local tag = rpm.expand("%{?tag}") local commit = rpm.expand("%{?commit}") -- Be explicit about the spec variables we’re setting local function explicitset(rpmvariable,value) rpm.define(rpmvariable .. " " .. value) if verbose then rpm.expand("%{echo:Setting %%{" .. rpmvariable .. "} = " .. value .. "\\n}") end end -- Never ever stomp on a spec variable the packager already set local function safeset(rpmvariable,value) if (rpm.expand("%{?" .. rpmvariable .. "}") == "") then explicitset(rpmvariable,value) end end -- Set spec variable values for each known software publishing service if (forgeurl ~= "") then local forge = string.match(forgeurl, "^[^:]+://([^/]+)/") if (forge == nil) then if not silent then rpm.expand("%{error:URLs must include a protocol such as https:// and a path starting with / !\\n}") end else if (string.match(forge, "^gitlab[%.-]") or string.match(forge, "[%.-]gitlab[%.]")) then forgeurl = string.match(forgeurl, "https://[^/]+/[^/]+/[^/#?]+") if (forgeurl == nil) then if not silent then rpm.expand("%{error:Gitlab URLs must match https://(…[-.])gitlab[-.]…/owner/repo !\\n}") end else explicitset("forgeurl", forgeurl) if (commit == "") then rpm.expand("%{error:All Gitlab URLs require commit value knowledge: you need to define %{commit}!\\nPlease vote on https://gitlab.com/gitlab-org/gitlab-ce/issues/38830\\n}") end safeset("archiveext", "tar.bz2") safeset("forgesetupargs", "-n %{archivename}") if (commit ~= "") or (tag ~= "") then safeset("scm", "git") end local owner = string.match(forgeurl, "^[^:]+://[^/]+/([^/]+)") local repo = string.match(forgeurl, "^[^:]+://[^/]+/[^/]+/([^/]+)") local version = rpm.expand("%{?version}") if (version ~= "") and (version ~= "0") and (tag == "") then -- GitLab does not have strong versionning semantics -- Some projects use "version" as release tag, others "v" + "version" -- Tag value needs to be explicitly declared before calling the macro -- in the second case tag = version safeset("tag", tag) end if (tag ~= "") then safeset("archivename", repo .. "-%{tag}-%{commit}") safeset("archiveurl", "%{forgeurl}/repository/%{tag}/archive.%{archiveext}") else safeset("archivename", repo .. "-%{commit}") safeset("archiveurl", "%{forgeurl}/repository/%{commit}/archive.%{archiveext}") end end end if (string.match(forge, "^github[%.-]") or string.match(forge, "[%.-]github[%.]")) then forgeurl = string.match(forgeurl, "https://[^/]+/[^/]+/[^/#?]+") if (forgeurl == nil) then if not silent then rpm.expand("%{error:GitHub URLs must match https://(…[-.])github[-.]…/owner/repo !\\n}") end else explicitset("forgeurl", forgeurl) safeset("archiveext", "tar.gz") local forgesetupargs = "-n %{archivename}" if (commit ~= "") or (tag ~= "") then safeset("scm", "git") end local owner = string.match(forgeurl, "^[^:]+://[^/]+/([^/]+)") local repo = string.match(forgeurl, "^[^:]+://[^/]+/[^/]+/([^/]+)") if (tag ~= "") then -- if upstream used a version suffix such as -rc1 or -beta it will not -- be a valid version string for rpm but github will accept it fine and -- use the same naming as for other versions: v prefix in the tag and -- archivename, no v prefix in the topdir naming inside the archive local version = rpm.expand("%{?version}") if version ~= "" and (string.match(tag, "^v" .. version .. "[^%d]") or string.match(tag, "^v" .. version .. "$")) then forgesetupargs = "-n " .. repo .. "-" .. string.gsub(tag, "^v", "") end safeset("archivename", repo .. "-%{tag}") safeset("archiveurl", "%{forgeurl}/archive/%{tag}.%{archiveext}") else if (commit ~= "") then safeset("archivename", repo .. "-%{commit}") safeset("archiveurl", "%{forgeurl}/archive/%{commit}/" .. repo .. "-%{commit}.%{archiveext}") else safeset("archivename", repo .. "-%{version}") safeset("archiveurl", "%{forgeurl}/archive/v%{version}.%{archiveext}") end end safeset("forgesetupargs", forgesetupargs) end end if (forge == "code.googlesource.com") then forgeurl = string.match(forgeurl, "https://code.googlesource.com/[^#?]*[^/#?]+") if (forgeurl == nil) then if not silent then rpm.expand("%{error:Googlesource URLs must match https://code.googlesource.com/…/repo !\\n}") end else explicitset("forgeurl", forgeurl) safeset("archiveext", "tar.gz") safeset("forgesetupargs", "-c") if (commit ~= "") or (tag ~= "") then safeset("scm", "git") end local repo = string.match(forgeurl, "^[^:]+://.+/([^/?#]+)") if (tag ~= "") then safeset("archivename", repo .. "-%{tag}") safeset("archiveurl", "%{forgeurl}/+archive/%{tag}.%{archiveext}") else if (commit ~= "") then safeset("archivename", repo .. "-%{commit}") safeset("archiveurl", "%{forgeurl}/+archive/%{commit}.%{archiveext}") else safeset("archivename", repo .. "-v%{version}") safeset("archiveurl", "%{forgeurl}/+archive/v%{version}.%{archiveext}") end end end end if (forge == "bitbucket.org") then forgeurl = string.match(forgeurl, "https://[^/]+/[^/]+/[^/#?]+") if (forgeurl == nil) then if not silent then rpm.expand("%{error:BitBucket URLs must match https://bitbucket.org/owner/repo !\\n}") end else explicitset("forgeurl", forgeurl) if (commit == "") then rpm.expand("%{error:All BitBucket URLs require commit value knowledge: you need to define %{commit}!\\n}") end local shortcommit = string.sub(commit, 1, 12) safeset("archiveext", "tar.bz2") -- Default to git even though BitBucket allows choosing between several SCMs -- Set scm to hg for example before calling the macro if your project does not use git safeset("scm", "git") local owner = string.match(forgeurl, "^[^:]+://[^/]+/([^/]+)") local repo = string.match(forgeurl, "^[^:]+://[^/]+/[^/]+/([^/]+)") safeset("archivename", owner .. "-" .. repo .. "-" .. shortcommit) safeset("forgesetupargs", "-n %{archivename}") if (tag ~= "") then safeset("archiveurl", "%{forgeurl}/get/%{tag}.%{archiveext}") else safeset("archiveurl", "%{forgeurl}/get/%{commit}.%{archiveext}") end end end if (forge == "pagure.io") then if not silent then rpm.expand("%{error:https://pagure.io/pagure/issue/861 needs to be resolved before the “pagure.io”\\nsoftware publishing service can be supported.\\n}") end end -- Final tests to check forgeurl was successfuly parsed if not silent then if (rpm.expand("%{?archivename}") == "") or (rpm.expand("%{?archiveurl}") == "") then rpm.expand("%{error:Automation for the “" .. forge .. "”\\nsoftware publishing service is not implemented yet.\\nPlease extend the %%forgemeta macro!\\n}") end end end end -- Set defaults if forgeurl is missing or does not parse local archivename = rpm.expand("%{?archivename}") safeset("archiveext", "tar.gz") if (archivename ~= "") then safeset("forgesetupargs", "-n %{archivename}") end if (commit ~= "") or (tag ~= "") then safeset("scm", "git") end -- Source URL processing (computing the forgesource spec variable) local archiveurl = rpm.expand("%{?archiveurl}") local archiveext = rpm.expand("%{?archiveext}") if (archivename ~= "") and (archiveurl ~= "") then if (string.match(archiveurl, "/([^/]+)$") == archivename .. "." .. archiveext) then safeset("forgesource", "%{archiveurl}") else safeset("forgesource", "%{?archiveurl}#/%{?archivename}.%{archiveext}") end end -- dist processing (computing the correct pefix for snapshots) local distprefix = rpm.expand("%{?tag}") local version = rpm.expand("%{?version}") if (distprefix == version) or (distprefix == "v" .. version) then distprefix = "" end if (distprefix == "") then distprefix = string.sub(rpm.expand("%{?commit}"), 1, 7) end if (distprefix ~= "") then local dist = ".%([ -r %{_sourcedir}/%{archivename}.%{archiveext} ] && date +%Y%m%d -u -r %{_sourcedir}/%{archivename}.%{archiveext})%{scm}" .. string.gsub(distprefix, "-",".") .. rpm.expand("%{?dist}") explicitset("dist", dist) end -- Final spec variable summary if the macro was called with -i if informative then rpm.expand("%{echo:Forge-specific packaging variables\\n}") rpm.expand("%{echo: forgeurl: %{?forgeurl}\\n}") rpm.expand("%{echo: forgesource: %{?forgesource}\\n}") rpm.expand("%{echo: forgesetupargs: %{?forgesetupargs}\\n}") rpm.expand("%{echo:Generic variables\\n}") rpm.expand("%{echo: archivename: %{?archivename}\\n}") rpm.expand("%{echo: archiveext: %{?archiveext}\\n}") rpm.expand("%{echo: archiveurl: %{?archiveurl}\\n}") rpm.expand("%{echo: scm: %{?scm}\\n}") rpm.expand("%{echo: tag: %{?tag}\\n}") rpm.expand("%{echo: commit: %{?commit}\\n}") rpm.expand("%{echo: dist: %{?dist} (snapshot date is computed once %%{_sourcedir}/%%{archivename}.%%{archiveext} is available)\\n}") end } # Convenience macro to relay computed arguments to %setup %forgesetup(a:b:cDn:Tq) %setup %{?forgesetupargs} %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{-q} # Convenience macro to relay computed arguments to %autosetup %forgeautosetup(a:b:cDn:TvNS:p:) %autosetup %{?forgesetupargs} %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{-v} %{-N} %{-S} %{-p} PK ��Z��9t t macros.kernel-srpmnu �[��� # kernel_arches lists what arches the full kernel is built for. %kernel_arches x86_64 s390x ppc64le aarch64 %{arm} PK ��Z�� I I macros.ldc-srpmnu �[��� # arches that ldc builds on %ldc_arches %{ix86} x86_64 %{arm} %{power64} PK ��Z{�3 3 macros.ldconfignu �[��� #%ldconfig /sbin/ldconfig %ldconfig_post(n:) %{?ldconfig:%post -p %ldconfig %{?*} %{-n:-n %{-n*}}\ %end} %ldconfig_postun(n:) %{?ldconfig:%postun -p %ldconfig %{?*} %{-n:-n %{-n*}}\ %end} %ldconfig_scriptlets(n:) %{?ldconfig:\ %ldconfig_post %{?*} %{-n:-n %{-n*}}\ %ldconfig_postun %{?*} %{-n:-n %{-n*}}\ } PK ��Z1�F� � macros.mono-srpmnu �[��� # arches that mono builds on %mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} aarch64 alpha s390x ppc ppc64 ppc64le %_monodir %{_prefix}/lib/mono %_monogacdir %{_monodir}/gac PK ��Z>�D D macros.nodejs-srpmnu �[��� # nodejs_arches lists what arches Node.js and dependent packages run on. # # Enabling Node.js on other arches requires porting the V8 JavaScript JIT to # those arches. Support for POWER and aarch64 arrived in nodejs v4. Support # for s390x arrived in nodejs v6 %nodejs_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x PK ��Z� macros.valgrind-srpmnu �[��� # valgrind_arches lists what arches Valgrind works on %valgrind_arches %{ix86} x86_64 ppc ppc64 ppc64le armv7hl aarch64 s390x PK ��Z-��f� � macros.vpathnu �[��� # ---- VPATH default settings # directory where CMakeLists.txt/meson.build/etc. are placed %_vpath_srcdir . # directory (doesn't need to exist) where all generated build files will be placed %_vpath_builddir %_target_platform PK ��Z�I%!6 !6 macros.sclnu �[��� # scl-utils RPM macros # # Copyright (C) 2012 Red Hat, Inc. # Written by Jindrich Novy <jnovy@redhat.com>. %scl_debug() %{expand: %define old_debug %{lua:print(rpm.expand("%{debug_package}"):len())} %undefine _debugsource_packages %global debug_package %{expand: %if "%{?old_debug}" == "0" %{expand: %{nil}} %else %if "%{?scl}%{!?scl:0}" == "%{pkg_name}" %{expand: %{nil}} %else %ifnarch noarch %package debuginfo Summary: Debug information for package %{name} Group: Development/Debug AutoReqProv: 0 Requires: %scl_runtime Provides: scl-package(%scl) %{lua: debuginfo=tonumber(rpm.expand("%{old_debug}")) if debuginfo > 0 then rpm.define("__debug_package 1") end } %description debuginfo This package provides debug information for package %{name}. Debug information is useful when developing applications that use this package or when debugging this package. %files debuginfo -f debugfiles.list %defattr(-,root,root) %endif %endif %endif %{nil}}} %scl_prefix() %{?scl:%(if [ "%1" = "%%1" ]; then echo "%{scl}-"; else echo "%1-"; fi)}%{!?scl:%{nil}} %scl_package() %{expand:%{!?_root_prefix: %global pkg_name %1 %global scl_name %{scl} %global scl_runtime %{scl}-runtime %global scl_basedir /opt %{!?scl_vendor: %global scl_vendor rh} %{!?_scl_prefix: %global _scl_prefix %{scl_basedir}/%{scl_vendor}} %global _scl_scripts %{_scl_prefix}/%{scl} %global _scl_root %{_scl_prefix}/%{scl}/root %global _root_prefix %{_prefix} %global _root_exec_prefix %{_root_prefix} %global _root_bindir %{_exec_prefix}/bin %global _root_sbindir %{_exec_prefix}/sbin %global _root_libexecdir %{_exec_prefix}/libexec %global _root_datadir %{_prefix}/share %global _root_sysconfdir %{_sysconfdir} %global _root_sharedstatedir %{_sharedstatedir} %global _root_localstatedir %{_localstatedir} %global _root_libdir %{_exec_prefix}/%{_lib} %global _root_includedir %{_prefix}/include %global _root_infodir %{_datadir}/info %global _root_mandir %{_datadir}/man %global _root_initddir %{_sysconfdir}/rc.d/init.d %global _prefix %{_scl_root}/usr %global _exec_prefix %{_prefix} %global _bindir %{_exec_prefix}/bin %global _sbindir %{_exec_prefix}/sbin %global _libexecdir %{_exec_prefix}/libexec %global _datadir %{_prefix}/share %global _sysconfdir %{_scl_root}/etc %{?nfsmountable: %global _sysconfdir %{_root_sysconfdir}%{_scl_prefix}/scls/%{scl}} %{?rh_layout: %global _sysconfdir %{_root_sysconfdir}%{_scl_prefix}/%{scl}} %global _sharedstatedir %{_scl_root}/var/lib %{?nfsmountable: %global _sharedstatedir %{_root_localstatedir}%{_scl_prefix}/scls/%{scl}/lib} %{?rh_layout: %global _sharedstatedir %{_root_localstatedir}%{_scl_prefix}/%{scl}/lib} %global _localstatedir %{_scl_root}/var %{?nfsmountable: %global _localstatedir %{_root_localstatedir}%{_scl_prefix}/scls/%{scl}} %{?rh_layout: %global _localstatedir %{_root_localstatedir}%{_scl_prefix}/%{scl}} %global _libdir %{_exec_prefix}/%{_lib} %global _includedir %{_prefix}/include %global _infodir %{_datadir}/info %global _mandir %{_datadir}/man %global _docdir %{_datadir}/doc %global _defaultdocdir %{_docdir} } %{?scl_dependency_generators:%scl_dependency_generators} %global scl_pkg_name %{scl}-%{pkg_name} %scl_debug %global __os_install_post %{expand: /usr/lib/rpm/brp-scl-compress %{_scl_root} %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip} /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} } /usr/lib/rpm/brp-strip-static-archive %{__strip} /usr/lib/rpm/brp-scl-python-bytecompile %{__python3} %{?_python_bytecompile_errors_terminate_build} %{_scl_root} /usr/lib/rpm/brp-python-hardlink %{nil}} BuildRequires: scl-utils-build %if "%{?scl}%{!?scl:0}" == "%{pkg_name}" Requires: %{scl_runtime} Provides: scl-package(%{scl}) %endif %{?scl_package_override:%scl_package_override} } %scl_require() %{_scl_prefix}/%1/enable, %1 %scl_require_package() %1-%2 %scl_enable_script() %{expand: cat >> %{buildroot}%{_scl_scripts}/enable << 'EOF' eval `/usr/bin/modulecmd bash load %{scl}` EOF } %scl_files %{expand: %defattr(-,root,root,-) %dir %_scl_prefix %dir %attr(555,root,root) %{_scl_root} %dir %attr(555,root,root) %{_scl_scripts} %{_scl_scripts}/enable %{_root_sysconfdir}/scl/prefixes/%scl %{_scl_root}/bin %attr(555,root,root) %{_scl_root}/boot %{_scl_root}/dev %dir %{_sysconfdir} %{_sysconfdir}/X11 %{_sysconfdir}/xdg %{_sysconfdir}/opt %{_sysconfdir}/pm %{_sysconfdir}/xinetd.d %{_sysconfdir}/skel %{_sysconfdir}/sysconfig %{_sysconfdir}/pki %{_scl_root}/home %{_scl_root}/lib %ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x %{_scl_root}/%{_lib} %endif %{_scl_root}/media %dir %{_scl_root}/mnt %dir %{_scl_root}/opt %attr(555,root,root) %{_scl_root}/proc %attr(550,root,root) %{_scl_root}/root %{_scl_root}/run %{_scl_root}/sbin %{_scl_root}/srv %{_scl_root}/sys %attr(1777,root,root) %{_scl_root}/tmp %dir %{_scl_root}/usr %attr(555,root,root) %{_scl_root}/usr/bin %{_scl_root}/usr/etc %{_scl_root}/usr/games %{_scl_root}/usr/include %dir %attr(555,root,root) %{_scl_root}/usr/lib %ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x %attr(555,root,root) %{_scl_root}/usr/%{_lib} %endif %{_scl_root}/usr/libexec %{_scl_root}/usr/local %attr(555,root,root) %{_scl_root}/usr/sbin %dir %{_scl_root}/usr/share %{_scl_root}/usr/share/aclocal %{_scl_root}/usr/share/applications %{_scl_root}/usr/share/augeas %{_scl_root}/usr/share/backgrounds %{_scl_root}/usr/share/desktop-directories %{_scl_root}/usr/share/dict %{_scl_root}/usr/share/doc %attr(555,root,root) %dir %{_scl_root}/usr/share/empty %{_scl_root}/usr/share/games %{_scl_root}/usr/share/ghostscript %{_scl_root}/usr/share/gnome %{_scl_root}/usr/share/icons %{_scl_root}/usr/share/idl %{_scl_root}/usr/share/info %dir %{_scl_root}/usr/share/licenses %dir %{_scl_root}/usr/share/locale %dir %{_scl_root}/usr/share/man %{_scl_root}/usr/share/mime-info %{_scl_root}/usr/share/misc %{_scl_root}/usr/share/omf %{_scl_root}/usr/share/pixmaps %{_scl_root}/usr/share/sounds %{_scl_root}/usr/share/themes %{_scl_root}/usr/share/xsessions %{_scl_root}/usr/share/X11 %{_scl_root}/usr/src %{_scl_root}/usr/tmp %dir %{_localstatedir} %{_localstatedir}/adm %{_localstatedir}/cache %{_localstatedir}/db %{_localstatedir}/empty %{_localstatedir}/games %{_localstatedir}/gopher %{_localstatedir}/lib %{_localstatedir}/local %ghost %dir %attr(755,root,root) %{_localstatedir}/lock %ghost %{_localstatedir}/lock/subsys %{_localstatedir}/log %{_localstatedir}/mail %{_localstatedir}/nis %{_localstatedir}/opt %{_localstatedir}/preserve %ghost %attr(755,root,root) %{_localstatedir}/run %dir %{_localstatedir}/spool %attr(755,root,root) %{_localstatedir}/spool/lpd %attr(775,root,mail) %{_localstatedir}/spool/mail %attr(1777,root,root) %{_localstatedir}/tmp %{_localstatedir}/yp } %scl_install %{expand: # scl specific stuff mkdir -p %{buildroot}%{_root_sysconfdir}/{rpm,scl/{prefixes,modulefiles}} cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF %%%%scl %scl %{?nfsmountable:%%%%nfsmountable %{nfsmountable}} %{!?nfsmountable:%%%%undefine nfsmountable} %{?rh_layout:%%%%rh_layout %{rh_layout}} %{!?rh_layout:%%%%undefine rh_layout} EOF cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF %_scl_prefix EOF test -e %{buildroot}%{_scl_scripts}/%{scl} && ln -s %{_scl_scripts}/%{scl} %{buildroot}%{_root_sysconfdir}/scl/modulefiles/%{scl} # filelist set +x cat >> %{buildroot}/lang-exceptions << EOF af_ZA am_ET ast_ES az_IR bg_BG bn_IN ca@valencia ca_ES ca_ES@valencian cs_CZ de_AT de_CH de_DE default el_GR en_AU en_CA en_GB en_US en_NZ es_AR es_CL es_CO es_CR es_DO es_EC es_ES es_GT es_HN es_MX es_NI es_PA es_PE es_PR es_SV es_UY es_VE et_EE eu_ES fa_IR fi_FI fr_BE fr_CA fr_CH fr_FR gl_ES he_IL hr_HR hu_HU it_CH it_IT ja_JP ko_KR ks@devanagari lv_LV ms_MY my_MM nb_NO nds_DE nl_BE nl_NL pl_PL pt_BR pt_PT ru_RU sl_SI sq_AL sr_RS sv_SE uk_UA ur_PK zh_CN zh_CN.GB2312 zh_HK zh_TW zh_TW.Big5 en@boldquot en@quot nds@NFE sr@ije sr@ijekavian sr@ijekavianlatin sr@latin sr@Latn uz@cyrillic uz@Latn be@latin en@shaw brx brx_IN EOF cat >> %{buildroot}/iso_639.sed << EOF 1,/<iso_639_entries/b # on each new iso-code process the current one \\!\\(<iso_639_entry\\|</iso_639_entries>\\)!{ x s/^$// # we are on the first iso-code--nothing to process here t # process and write to output s/\\s\\+/ /g s/<iso_639_entry// s!/\\s*>!! # use '%' as a separator of parsed and unparsed input s/\\(.*\\)iso_639_2T_code="\\([^"]\\+\\)"\\(.*\\)/\\2 % \\1 \\3/ s/\\([^%]\\+\\)%\\(.*\\)iso_639_2B_code="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3 % \\2 \\4/ # clear subst. memory for the next t t clear :clear s/\\([^%]\\+\\)%\\(.*\\)iso_639_1_code="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3 % \\2 \\4/ t name # no 639-1 code--write xx s/%/\\tXX %/ :name s/\\([^%]\\+\\)%\\(.*\\)name="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3/ s/ \\t/\\t/g p b :noout } H EOF cat >> %{buildroot}/iso_3166.sed << EOF 1,/<iso_3166_entries/b # on each new iso-code process the current one \\!\\(<iso_3166_entry\\|</iso_3166_entries>\\)!{ x s/^$// # we are on the first iso-code--nothing to process here t # process and write to output s/\\s\\+/ /g s/<iso_3166_entry// s!/\\s*>!! # use '%' as a separator of parsed and unparsed input s/\\(.*\\)alpha_2_code="\\([^"]\\+\\)"\\(.*\\)/\\2 % \\1 \\3/ s/\\([^%]\\+\\)%\\(.*\\)alpha_3_code="\\([^"]\\+\\)"\\(.*\\)/\\1% \\2 \\4/ # clear subst. memory for the next t t clear :clear s/\\([^%]\\+\\)%\\(.*\\)numeric_code="\\([^"]\\+\\)"\\(.*\\)/\\1% \\2 \\4/ t name # no 3166 code--write xx s/%/\\tXX %/ :name s/\\([^%]\\+\\)%\\(.*\\)name="\\([^"]\\+\\)"\\(.*\\)/\\1\\t\\3/ s/ \\t/\\t/g p b :noout } H EOF mkdir -p %{buildroot}%{_localstatedir} pushd %{buildroot}%{_localstatedir} mkdir -p {adm,empty,gopher,lib/{games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd,uucp},tmp,db,cache,opt,games,yp} popd mkdir -p %{buildroot}%{_sysconfdir} pushd %{buildroot}%{_sysconfdir} mkdir -p {X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} popd mkdir -p %{buildroot}%{_scl_root} rm -f $RPM_BUILD_DIR/%{buildsubdir}/filelist rm -f $RPM_BUILD_DIR/%{buildsubdir}/filesystem pushd %{buildroot}%{_scl_root} mkdir -p boot dev \\ home media mnt opt proc root run/lock srv sys tmp \\ usr/{bin,etc,games,include,lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,licenses,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11},src,src/kernels,src/debug} %ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x mkdir -p usr/{%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},local/%{_lib}} %endif ln -snf %{_localstatedir}/tmp usr/tmp ln -snf spool/mail %{buildroot}%{_localstatedir}/mail ln -snf usr/bin bin ln -snf usr/sbin sbin ln -snf usr/lib lib %ifarch x86_64 ppc ppc64 ppc64le aarch64 sparc sparc64 s390 s390x ln -snf usr/%{_lib} %{_lib} %endif sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml >%{buildroot}/iso_639.tab sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml >%{buildroot}/iso_3166.tab grep -av "^$" %{buildroot}/iso_639.tab | grep -av "^#" | while read a b c d ; do [[ "$d" =~ "^Reserved" ]] && continue [[ "$d" =~ "^No linguistic" ]] && continue locale=$c if [ "$locale" = "XX" ]; then locale=$b fi echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${locale}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist done cat %{buildroot}/lang-exceptions | grep -v "^#" | grep -v "^$" | while read loc ; do locale=$loc locality= special= [[ "$locale" =~ "@" ]] && locale=${locale%%%%@*} [[ "$locale" =~ "_" ]] && locality=${locale##*_} [[ "$locality" =~ "." ]] && locality=${locality%%%%.*} [[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc # If the locality is not official, skip it if [ -n "$locality" ]; then grep -q "^$locality" %{buildroot}/iso_3166.tab || continue fi # If the locale is not official and not special, skip it if [ -z "$special" ]; then egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \\ %{buildroot}/iso_639.tab || continue fi echo "%lang(${locale}) %{_scl_root}/usr/share/locale/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist echo "%lang(${locale}) %ghost %config(missingok) %{_scl_root}/usr/share/man/${loc}" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist done rm -f %{buildroot}/iso_639.tab rm -f %{buildroot}/iso_639.sed rm -f %{buildroot}/iso_3166.tab rm -f %{buildroot}/iso_3166.sed rm -f %{buildroot}/lang-exceptions cat $RPM_BUILD_DIR/%{buildsubdir}/filelist | grep "locale" | while read a b ; do mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES done cat $RPM_BUILD_DIR/%{buildsubdir}/filelist | grep "/share/man" | while read a b c d; do mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p} done for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do echo "%{_scl_root}/usr/share/man/$i" >> $RPM_BUILD_DIR/%{buildsubdir}/filelist done ln -s $RPM_BUILD_DIR/%{buildsubdir}/filelist $RPM_BUILD_DIR/%{buildsubdir}/filesystem set -x popd } PK ��Z�Y� � macros.colornu �[��� %_colordir %_datadir/color %_syscolordir %_colordir %_icccolordir %_colordir/icc %_cmmscolordir %_colordir/cmms %_settingscolordir %_colordir/settings PK ��Z�-g<�S �S macros.fjavanu �[��� # Copyright (c) 2012-2016, Red Hat, Inc # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of Red Hat nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Stanislav Ochotnicky <sochotnicky@redhat.com> # Mikolaj Izdebski <mizdebsk@redhat.com> # %mvn_package - assign Maven artifact(s) to a subpackage # # Usage: %mvn_package [gId]:[aId[:ver]] <subpackage name> # # This macro causes given artifact(s) to be installed in given subpackage. # # GId, aId and ver can contain wildcards and alternatives, which allows # multiple artifacts to be matched. If any of gId, aId or ver is omited # then any value will match the respective part. In particular a bare : # symbol will match any artifact. # # Subpackage name can contain backreferences in form @n. # %mvn_package %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_package.py # %mvn_alias - create alias(es) for given Maven artifact(s) # # Usage: %mvn_alias [gId]:[aId[:ver]] [aliasGId]:[aliasAId[:aliasVer]] [...] # # This macro adds one or more aliases for specified artifacts. Aliases are # additional groupId, artifactId and version triples under which artifacts # can be found. After resulting package is installed any attempts to # resolve any of aliases will result in resolving the original artifact. # # GId, aId and ver can contain wildcards and alternatives, which allows # multiple artifacts to be matched. If any of gId, aId or ver is omited # then any value will match the respective part. In particular a bare : # symbol will match any artifact. # # AliasGId, aliasAId and aliasVer can contain backreferences in form @n, # which can refer only to respective parts. # %mvn_alias %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_alias.py # %mvn_file - specify file name(s) for Maven artifact(s) # # Usage: %mvn_file [gId]:[aId[:ver]] <file1> [file2 ...] # # GId, aId and ver can contain wildcards and alternatives, which allows # multiple artifacts to be matched. If any of gId, aId or ver is omited # then any value will match the respective part. In particular a bare : # symbol will match any artifact. # # File names can contain backreferences in form @n. If multiple names # are given then the first one will be primary name of the artifact and # additional names will be symbolic links pointing to the primary file. # %mvn_file %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_file.py # %mvn_compat_version - specify file name(s) for Maven artifact(s) # # Usage: %mvn_compat_version [gId]:[aId[:ver]] <version1> [version2 ...] # # GId, aId and ver can contain wildcards and alternatives, which allows # multiple artifacts to be matched. If any of gId, aId or ver is omited # then any value will match the respective part. In particular a bare : # symbol will match any artifact. # # Versions can contain backreferences in form @n. If multiple versions are # given then the first one will be primary version of the artifact and # additional versions will be symbolic links pointing to the primary # version. # %mvn_compat_version %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_compat_version.py # %mvn_config - set XMvn configuration option # # Usage: %mvn_config <option> <value> # # This macro sets value of specified XMvn configuration option. # # Option is a sequence of slash-delimited XML node names that identify # XMvn configuration option, as in XMvn configuration reference; for # example: buildSettings/compilerSource. # # For information about available configuration options, see XMvn # configuration reference, available on XMvn website. # %mvn_config %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_config.py # %mvn_artifact - add Maven artifact to be installed # # Usage: %mvn_artifact <pom> [<artifact-file>] # %mvn_artifact %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_artifact.py # %mvn_build - build Maven project # # Usage: %mvn_build [options] # # This macro causes Maven project to be built (usually compiled and # packaged). It is intended to be placed in %build section of spec file. # # For summary of accepted options execute `mvn-build --help` command. # %mvn_build %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_build.py --xmvn-javadoc %{?base_xmvn_opts} %{?xmvn_opts} %{?xmvn_bootstrap: -b} %{?_without_javadoc: -j $(> .mfiles-javadoc)}%{?_without_tests: -f} # %gradle_build - build Gradle project # # Usage: %mvn_build [options] # # This macro causes Gradle project to be built (usually compiled and # packaged). It is intended to be placed in %build section of spec file. # # For summary of accepted options execute `mvn-build --help` command. # %gradle_build %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/mvn_build.py --xmvn-javadoc --gradle %{?base_xmvn_opts} %{?xmvn_opts} %{?xmvn_bootstrap: -b} %{?_without_javadoc: -j $(> .mfiles-javadoc)}%{?_without_tests: -f} # %mvn_install - install Maven project # # Usage: %mvn_install # # This macro causes previously built Maven project to be installed into # buildroot. It is intended to be placed in %install section of spec file. # %mvn_install(J:X) %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }xmvn-install %{?base_xmvn_opts} %{?xmvn_install_opts} %{?-X} -R .xmvn-reactor -n %{?scl:%{pkg_name}}%{!?scl:%{name}} %{?xmvn_install_repo:-i %{xmvn_install_repo}} -d "%{buildroot}" \ %{-J*:jdir="%{-J*}"}%{!-J*:jdir=target/site/apidocs; [ -d .xmvn/apidocs ] && jdir=.xmvn/apidocs} \ %{__mkdir_p} %{buildroot}%{_licensedir} \ if [ -d "${jdir}" ]; then \ install -dm755 %{buildroot}%{_javadocdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}} \ cp -pr "${jdir}"/* %{buildroot}%{_javadocdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}} \ echo '%{_javadocdir}/%{?scl:%{pkg_name}}%{!?scl:%{name}}' >>.mfiles-javadoc \ fi \ %{nil} # %mvn_subst - replace all JAR files in given directory with symlinks # # Usage: %mvn_subst [options] path # # Substitutes Java archives in given directory with symlinks to system-wide or # just installed versions. %mvn_subst %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }xmvn-subst %{?base_xmvn_opts} %{?xmvn_subst_opts} -R %{buildroot} #============================================================================== # # add_maven_depmap is simplified version of jpackage-style add_to_maven_depmap # # IMPORTANT: This macro is obsolete. Use mvn_artifact macro instead. # # -f addition to fragment name # -a is "g1:a1,g2:a2" formatted string with additional depmaps (groupId:artifactId,...) # -v is "v1,v2" formatted string with additional compatibility versions # supposed to be provided (jar,pom will be renamed to -%{version} variants # and additional symlinks optionally created) # %1 is the pom filename relative to mavenpomdir # %2 is the path to jar file (when omitted we deal with parent pom file without jar) # # add_maven_depmap automatically parses pom file and it will fail with incorrect pom # or jar filename # # in the end add_maven_depmap optionally moves jar and pom file to # -%{version} variant and can create additional versioned symlinks %add_maven_depmap(f:a:v:) \ set -e \ %{lua:io.stderr:write("[WARNING] Deprecated \%add_maven_depmap macro is used. ", \ "Please use \%mvn_artifact and %mvn_install instead.\\n")} \ # default values \ %if %# == 0 \ _pompart="JPP-%{?scl:%{pkg_name}}%{!?scl:%{name}}.pom" \ _jarpart="%{?scl:%{pkg_name}}%{!?scl:%{name}}.jar" \ %else \ _pompart="%1" \ _jarpart="%2" \ %endif \ _filelist=".mfiles%{-f*:-%{-f*}}" \ install -dm 755 %{buildroot}%{_datadir}/maven-metadata \ _jbase= \ _jpath= \ for _dir in %{_jnidir} %{_javadir}; do \ if [ -f %{buildroot}$_dir/$_jarpart ]; then \ _jbase="%{buildroot}$_dir" \ _jpath="$_jbase/$_jarpart" \ fi \ done \ %if %# != 1 \ [ -z "$_jpath" ] && (echo "%0 error: $_jarpart - file not found" 1>&2; exit 1) \ %endif \ /usr/libexec/platform-python /usr/share/java-utils/maven_depmap.py %{-a} %{-v*:-r %{-v*}} \\\ -n "%{?scl}" \\\ --pom-base %{buildroot}%{_mavenpomdir} \\\ --jar-base "$_jbase" \\\ %{buildroot}%{_datadir}/maven-metadata/%{?scl:%{pkg_name}}%{!?scl:%{name}}%{-f*:-%{-f*}}.xml \\\ %{buildroot}%{_mavenpomdir}/$_pompart \\\ %if %# == 2 \ "${_jpath}" \\\ %endif \ %if %# == 0 \ "${_jpath}" \\\ %endif \ >> ${_filelist} \ sed -i 's:%{buildroot}::' ${_filelist} \ sort -u -o ${_filelist} ${_filelist} \ \ %{nil} #============================================================================== # # %pom_* -- macros for batch editing of POM files # # These macros can be used to edit Maven POM files directly from RPM spec # file. Using these macros it is possible to alter Maven dependency management, # change plugin invocation, or even inject or remove arbitrary XML code to/from # nodes described by an XPath expression. # # See comments preceding individual macros for more detailed documentation. # # Private macro, shouldn't be used directly %__pom_call %{?scl:/usr/share/java-utils/scl-enable %{?scl_maven} %{scl} -- }/usr/libexec/platform-python /usr/share/java-utils/pom_editor.py pom_ # %pom_remove_dep - remove dependency on Maven artifact from POM file # # Usage: %pom_remove_dep [groupId]:[artifactId] [POM location] # # This macro patches specified POM file not to contain dependencies on given # Maven artifact. # # groupId and artifactId are identifiers of Maven group and artifact of the # module on which dependency is to be removed. If they are ommited then all # identifiers are matched. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_remove_dep(rf) %{expand: %{__pom_call}remove_dep %** } # %pom_remove_plugin - remove Maven plugin invocation from POM file # # Usage: %pom_remove_plugin [groupId]:[artifactId] [POM location] # # This macro patches specified POM file not to contain invocations of given # Maven plugin. # # groupId and artifactId are identifiers of Maven group and artifact of the # plugin which invocation is to be removed. If they are ommited then all # identifiers are matched. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_remove_plugin(rf) %{expand: %{__pom_call}remove_plugin %** } # %pom_disable_module - disable given project module in POM file # # Usage: %pom_disable_module <module name> [POM location] # # This macro patches specified POM file not to contain reference to given # project module. # # Module name is the exact name of the module to be disabled. It must not be # ommited. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_disable_module() %{expand: %{__pom_call}disable_module %* } # %pom_xpath_remove - remove an XML node from POM file # # Usage: %pom_xpath_remove <XPath> [POM location] # # This macro patches specified POM file removing all XML nodes described by the # XPath expression. # # XPath is an expression describing a set of XML nodes to be removed from the # POM file. It must be a properly formated XPath 1.0 expression, as described # in <http://www.w3.org/TR/xpath/>. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # # NOTE: POM files use a specific namespace - http://maven.apache.org/POM/4.0.0. # The easiest way to respect this namespace in XPath expressions is prefixing # all node names with "pom:". For example, "pom:environment/pom:os" will work # because it selects nodes from pom namespace, but "environment/os" won't find # anything because it looks for nodes that don't belong to any XML namespace. # %pom_xpath_remove(rf) %{expand: %{__pom_call}xpath_remove %** } %pom_xpath_disable() %{expand: %{__pom_call}xpath_disable %** } # %pom_xpath_inject - inject XML code into POM file # # Usage: %pom_xpath_inject <XPath> [XML code] [POM location] # # This macro patches specified POM file appending some code as children of all # XML nodes described by the XPath expression. # # XPath is an expression describing a set of XML nodes in the POM file to which # child code is to be appended. It must be a properly formated XPath 1.0 # expression, as described in <http://www.w3.org/TR/xpath/>. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_xpath_inject() %{expand: %{__pom_call}xpath_inject %* } # %pom_xpath_replace - replace XML node from POM file with given XML code # # Usage: %pom_xpath_replace <XPath> <XML code> [POM location] # # This macro patches specified POM file removing all XML nodes described by the # XPath expression and injecting given XML code in their place. # # XPath is an expression describing a set of XML nodes to be removed from the # POM file. It must be a properly formated XPath 1.0 expression, as described # in <http://www.w3.org/TR/xpath/>. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_xpath_replace(rf) %{expand: %{__pom_call}xpath_replace %** } # %pom_xpath_set - set text contents of XML node from POM file # # Usage: %pom_xpath_set <XPath> <new contents> [POM location] # # This macro patches specified POM file replacing text contents of all XML nodes # described by the XPath expression with given new text content. # # XPath is an expression describing a set of XML nodes to be removed from the # POM file. It must be a properly formated XPath 1.0 expression, as described # in <http://www.w3.org/TR/xpath/>. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_xpath_set(rf) %{expand: %{__pom_call}xpath_set %** } # %pom_add_parent - add parent POM reference to POM file # # Usage: %pom_add_parent groupId:artifactId[:version] [POM location] # # This macro patches specified POM file adding a reference to parent POM with # specified groupId, artifactId and version. # # groupId and artifactId are identifiers of Maven group and artifact of the POM # to be referenced as parent POM. They must be specified. If version is not # specified then default value of "any" is used. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_add_parent() %{expand: %{__pom_call}add_parent %* } # %pom_remove_parent - remove parent POM reference from POM file # # Usage: %pom_remove_parent [POM location] # # This macro patches specified POM file removing reference to parent POM. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # %pom_remove_parent() %{expand: %{__pom_call}remove_parent %* } # %pom_set_parent - set parent POM reference in POM file # # Usage: %pom_set_parent groupId:artifactId[:version] [POM location] # # This macro patches specified POM file setting reference to parent POM to # specified groupId, artifactId and version. # # This macros first removes parent POM reference and then adds a new one. It's # (more or less) equivalent to call to %pom_remove_parent followed by # invocation of %pom_add_parent. See documentation for these macros for more # information about parameters. # %pom_set_parent() %{expand: %{__pom_call}set_parent %* } # %pom_add_dep[_mgmt] - add dependency to POM file # # Usage: %pom_add_dep groupId:artifactId[:version[:scope]] [POM location] \ # [extra XML] # %pom_add_dep_mgmt groupId:artifactId[:version[:scope]] [POM location] \ # [extra XML] # # These macros patch specified POM file adding a dependency on given version of # artifactId from groupId, with given scope (if any). %pom_add_dep adds the # dependency to <dependencies> XML node, while %pom_add_dep_mgmt adds it to # <dependencyManagement>. # # groupId and artifactId are identifiers of Maven artifact on which dependency # is to be added. They must be specified. If version is not specified then # default value of "any" is used. If scope is not specified then no scope is # defined (Maven defaults to "compile" in this case). # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # # Extra XML is additional XML code to be added into the <dependency> node. This # parameter can be ommited, in which case no extra XML is appended. # %pom_add_dep() %{expand: %{__pom_call}add_dep %* } %pom_add_dep_mgmt() %{expand: %{__pom_call}add_dep_mgmt %* } # %pom_add_plugin - add plugin invocation to POM file # # Usage: %pom_add_plugin groupId:artifactId[:version] [POM location] \ # [extra XML] # # This macro patches specified POM file adding plugin invocation of given # groupId and artifactId. # # groupId and artifactId are identifiers of Maven plugin artifact of which # invocation is to be added. groupId may be ommited, in which case value of # "org.apache.maven.plugins" is used as default. artifactId must be # specified. If version is not specified then default value of "any" is used. # # POM location can be either a full path to the POM file, or a path to the # directory containing pom.xml. If POM location is not given then pom.xml from # current working directory is used. # # Extra XML is additional XML code to be added into the <plugin> node. This # parameter can be ommited, in which case no extra XML is appended. # %pom_add_plugin() %{expand: %{__pom_call}add_plugin %* } %pom_change_dep(rf) %{expand: %{__pom_call}change_dep %** } # %javadoc_package - generate javadoc subpackage definition # # Usage: %javadoc_package [options] # This macro generates %package and %files definitions for a javadoc subpackage. # Use on top-level only, preferably just before %prep. # Prerequisites: # - javadoc package must not already exist # - package must use %mvn_install to install javadoc (default when using %mvn_build) # - package should install license files using %license macro, or specify # license for javadoc package manually (see below) # # Manually specifying license files: # Use -L option to suppress automatic license installation and specify %license # directive on the next line after the macro invocation. Example: # %javadoc_package -L # %license LICENSE %javadoc_package(L) %if 0%{!?_without_javadoc:1} \ %package javadoc \ Summary: API documentation for %{?scl:%{pkg_name}}%{!?scl:%{name}} \ %description javadoc \ API documentation for %{?scl:%{pkg_name}}%{!?scl:%{name}}. \ %files javadoc -f .mfiles-javadoc \ %if 0%{!?-L:1} \ %%license %{_licensedir} \ %exclude %dir %{_licensedir} \ %endif \ %endif PK ��Zl��w w macros.luanu �[��� %lua_version %{lua: print(string.sub(_VERSION, 5))} %lua_libdir %{_libdir}/lua/%{lua_version} %lua_pkgdir %{_datadir}/lua/%{lua_version} %lua_requires \ %if 0%{?fedora} >= 16 || 0%{?rhel} >= 7 \ Requires: lua(abi) = %{lua_version} \ %else \ Requires: lua >= %{lua_version} \ Requires: lua < %{lua: os.setlocale('C'); print(string.sub(_VERSION, 5) + 0.1)} \ %endif \ %{nil} PK ��ZG�� � macros.firewalldnu �[��� PK ��ZG|�d / macros.systemdnu �[��� PK ��ZǾ$n n � macros.selinux-policynu �[��� PK ��Zi�o�� � >, macros.systemtapnu �[��� PK ��Z{ Y� � L- macros.alt-python38nu �[��� PK ��ZҤ]� u5 macros.alt-python310nu �[��� PK ��Ze�!� � �= macros.alt-python39nu �[��� PK ��Z �)L �E macros.alt-python311nu �[��� PK ��Z�~�� � ;N macros.rubynu �[��� PK ��Z���Y� � _R macros.javapackages-filesystemnu �[��� PK ��Z����� � <Z macros.python-srpmnu �[��� PK ��Z�=v v Kr macros.pybytecompilenu �[��� PK ��Z(�LVo o v macros.pythonnu �[��� PK ��Zr�S�� � �� macros.python3nu �[��� PK ��Z.p�� � q� macros.infonu �[��� PK ��Zx�(o( ( 2� macros.vimnu �[��� PK ��Z�[�G G �� macros.python2nu �[��� PK ��Z��d5 � macros.perl-srpmnu �[��� PK ��Z�= = s� macros.rust-srpmnu �[��� PK ��Z]���h h � macros.openblas-srpmnu �[��� PK ��Z��Ҟ� � �� macros.ocaml-srpmnu �[��� PK ��Z-�K�� � �� macros.go-srpmnu �[��� PK ��Z�T�O� � �� macros.ghc-srpmnu �[��� PK ��Z�F9�q q �� macros.gconf2nu �[��� PK ��Z=QA@ @ 5� macros.perlnu �[��� PK ��ZM7��K K �� macros.environment-modulesnu �[��� PK ��Z�|�2 2 E� macros.jpackagenu �[��� PK ��Z�28> �� macros.efi-srpmnu �[��� PK ��Z��* �� macros.dwznu �[��� PK ��Z��t� @� macros.fedora-miscnu �[��� PK ��Z �گ� � � macros.fedora-misc-srpmnu �[��� PK ��Z��Gs�1 �1 � macros.forgenu �[��� PK ��Z��9t t �; macros.kernel-srpmnu �[��� PK ��Z�� I I t< macros.ldc-srpmnu �[��� PK ��Z{�3 3 �< macros.ldconfignu �[��� PK ��Z1�F� � n> macros.mono-srpmnu �[��� PK ��Z>�D D c? macros.nodejs-srpmnu �[��� PK ��Z� �@ macros.valgrind-srpmnu �[��� PK ��Z-��f� � �A macros.vpathnu �[��� PK ��Z�I%!6 !6 �B macros.sclnu �[��� PK ��Z�Y� � 'y macros.colornu �[��� PK ��Z�-g<�S �S �y macros.fjavanu �[��� PK ��Zl��w w � macros.luanu �[��� PK + + m ��
| ver. 1.4 |
Github
|
.
| PHP 8.1.31 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка