# ---- configure macros. note that most of these are inherited
# from the defaults.
#
-%_sharedstatedir /var/lib
-%_localstatedir /var
%_localedir %{_datadir}/locale
%_lispdir %{_datadir}/emacs/site-lisp
%_initddir %{_sysconfdir}/rc.d/init.d
%_metainfodir %{_datadir}/metainfo
-%_defaultdocdir %{_usr}/share/doc
-
%_fmoddir %{_libdir}/gfortran/modules
# Location of autoconf macros
# Location of pkgconfig files
%_pkgconfigdir /usr/%{_lib}/pkgconfig
-# noarch pkgconfig files
+# noarch pkgconfig files (since 1.446)
%_npkgconfigdir /usr/share/pkgconfig
# Location of desktop files
# Location of pixmaps for applnk/desktop files
%_pixmapsdir /usr/share/pixmaps
-# Location of themable icons for applnk/desktop files
-%_iconsdir /usr/share/icons
-
# Location of fonts directories
%_fontsdir /usr/share/fonts
-# Location of Gtk and associated libraries documentation
+# Location of Gtk and associated libraries documentation (since 1.98)
%_gtkdocdir %{_defaultdocdir}/gtk-doc/html
-# Location of KDE documentation
+# Common subdirectory for gi-docgen generated libraries documentation (since 2.029)
+%_gidocdir %{_defaultdocdir}/gi-doc
+
+# Location of KDE documentation (since 1.129)
%_kdedocdir %{_defaultdocdir}/kde/HTML
# unsermake script
# Example files, programs, scripts...
%_examplesdir /usr/src/examples
-# SysV-style initscripts dir
-%_initddir /etc/rc.d/init.d
-
# Executed at after copying %doc to DOCDIR, with $DOCDIR set
# TODO: teach rpm.org that compressed %doc is the same thing as uncompressed
#__compress_doc %{_rpmconfigdir}/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
%files debugsource -f debugsourcefiles.list\
%{nil}
-%debug_package \
-%ifnarch noarch\
-%global __debug_package 1\
-%_debuginfo_template\
-%if 0%{?_debugsource_packages}\
-%_debugsource_template\
-%endif\
-%endif\
-%{nil}
-
#---------------------------------------------------------------------
# Overwrite RPM macros with TLD specific one here.
%__lua %{_bindir}/lua
%__rc %{_bindir}/rc
%__xar %{_bindir}/xar
+%__rm /bin/rm --interactive=never
+
%_source_payload w9.gzdio
%_binary_payload w6.xzdio
%_upgrade_tag name
# Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps)
-%_check_symlink_deps 0
-
+%_check_symlink_deps 0
+
# Do not generate executable() dependencies for scriptlets,
# as it may give false positives, for example:
# [ ! -x /bin/prog ] || /bin/prog
%_use_internal_dependency_generator 1
%_duplicate_files_terminate_build 1
-%_files_listed_twice_terminate_build 1
%_unpackaged_files_terminate_build 0
-%_unpackaged_subdirs_terminate_build 0
-#
-# Export package NEVRA (stamped with install tid) info for HRMIB on this path.
-#
-# XXX Note: escaped %% for use in headerSprintf()
-%_hrmib_path /var/cache/hrmib/%{___NVRA}
+# Make files in .src.rpm owned by root, but preserve permissions
+%_srcdefattr (-,root,root,-)
#-----------------------------------------------------------------
# CFLAGS and LDFLAGS used to build
%debugcppflags %{nil}
%debugldflags %{nil}
-%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc %{?use_ld:-Wl,-fuse-ld=%{use_ld}}
-%optcppflags %{nil}
+%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc %{?use_ld:-Wl,-fuse-ld=%{use_ld}}
+%optcppflags -DNDEBUG -DQT_NO_DEBUG
# common compilation flags
%_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
%Werror_cflags -Wformat -Werror=format-security
+# silent line truncation causes errors hard to track
+%Werror_fflags -Werror=line-truncation
+
# Use -Werror=trampolines to prevent GCC from generating code that require executable stack
%_ssp_cflags -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines
-%__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
+%__common_cflags -O2 -fwrapv -pipe %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
%__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags}
# arch macros
%cc_version %{expand:%%global cc_version %(%{__cc} -dumpversion 2>/dev/null || echo 0.0)}%cc_version
%cxx_version %{expand:%%global cxx_version %(%{__cxx} -dumpversion 2>/dev/null || echo 0.0)}%cxx_version
-%__rm /bin/rm --interactive=never
-
# Build system path macros.
%__autoconf autoconf %{?debug:-Wall}
%__automake automake -a -c -f --foreign
# if you want to disable parallel build do:
# echo '%__jobs %{nil}' >> ~/.rpmmacros
%__jobs %{expand:%%global __jobs %(_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN); [ "$_NCPUS" -gt 3 ] && echo $(($_NCPUS / 2)))%%{nil}}%__jobs
+%_smp_build_ncpus %{__jobs}
+%_smp_build_nthreads %{__jobs}
# expands to -jN if %__jobs has a value
%_smp_mflags %{expand:%%global _smp_mflags %(jobs=%{__jobs}; echo ${jobs:+-j$jobs}%%{nil})}%_smp_mflags
%__cmake /usr/bin/cmake
%__meson /usr/bin/meson
%__meson_wrap_mode nodownload
-%__ninja /usr/bin/ninja
-%__ninja_common_opts -v %{?_smp_mflags}
-%__gettextize { \
- gettextize --copy --force --no-changelog; \
- if [ ! -f po/Makevars ]; then \
- cp -f po/Makevars{.template,}; \
+%__gettextize(d:) { \
+ gettextize --copy --force --no-changelog %{?-d:--po-dir='%{-d*}'}; \
+ if [ ! -f %{!?-d:po}%{?-d:'%{-d*}'}/Makevars ]; then \
+ cp -f %{!?-d:po}%{?-d:'%{-d*}'}/Makevars{.template,}; \
fi; \
}
%_tmppath %(echo "${TMPDIR:-/var/tmp}")
%tmpdir %{_tmppath}
+# Left for compatibility with rpm < 4.20
+# These are not user overridable in rpm >= 4.20.
%_buildrootdir %{_tmppath}
%buildroot %{_buildrootdir}/%{name}-%{version}-%{_arch}-root-%(id -u -n)
# BuildRequires: rpmbuild(macros) >= 1.315
#
# Flags specified in %filterout_* are removed from %rpm*flags, exactly:
-# %rpmcflags = %optflags - %filterout - %filterout_c - %filterout_ld
-# %rpmcxxflags = %optflags - %filterout - %filterout_cxx - %filterout_ld
-# %rpmcppflags = %optcppflags - %filterout - %filterout_cpp - %filterout_ld
-# %rpmldflags = %optldflags - %filterout_ld
+# %rpmcflags = %optflags|%debufcflags %Werror_cflags - %filterout - %filterout_c - %filterout_ld
+# %rpmcxxflags = %optflags|%debufcflags %Werror_cflags - %filterout - %filterout_cxx - %filterout_ld
+# %rpmfflags = %optflags|%debugcflags %Werror_fflags - %filterout - %filterout_f - %filterout_ld
+# %rpmcppflags = %optcppflags|%debugcppflags - %filterout - %filterout_cpp - %filterout_ld
+# %rpmldflags = %optldflags|%debugldflags - %filterout_ld
#
# Regular expressions are supported, but to avoid some character be treated
# as regular expression it must be escaped twice.
}
%rpmcflags %(awk 'BEGIN {
- split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags} %{Werror_cflags}",I);
split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
%{filter_out}
}')
+%build_cflags %{rpmcflags}
+%build_fflags %{rpmcflags} %{?_fmoddir:-I%{_fmoddir}}
%rpmcxxflags %(awk 'BEGIN {
- split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags} %{Werror_cflags}",I);
split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
%{filter_out}
}')
+%build_cxxflags %{rpmcxxflags}
+
+%rpmfflags %(awk 'BEGIN {
+ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags} %{Werror_fflags}",I);
+ split("%{?filterout} %{?filterout_f} %{?filterout_ld}",F);
+ %{filter_out}
+}')
+%build_fflags %{rpmfflags}
%rpmcppflags %(awk 'BEGIN {
split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
split("%{?filterout_ld}",F)
%{filter_out}
}')
+%build_ldflags %{rpmldflags}
# rpmldflags with stripped -Wl, -- in the form flags have to be passed to 'ld'
# but, don't use it, better use gcc as linker
};
}')
+%set_build_flags \
+ if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
+ LC_ALL=C.UTF-8 ; \
+ %{?__cc:CC="%{__cc}" ; export CC ; } \
+ %{?__cxx:CXX="%{__cxx}" ; export CXX ; } \
+ %{?__cpp:CPP="%{__cpp}" ; export CPP ; } \
+ CFLAGS="${CFLAGS:-%rpmcflags}" ; export CFLAGS ; \
+ CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" ; export CXXFLAGS ; \
+ FFLAGS="${FFLAGS:-%rpmfflags}" ; export FFLAGS ; \
+ FCFLAGS="${FCFLAGS:-%rpmfflags}" ; export FCFLAGS ; \
+ CPPFLAGS="${CPPFLAGS:-%rpmcppflags}" ; export CPPFLAGS ; \
+ LDFLAGS="${LDFLAGS:-%rpmldflags}" ; export LDFLAGS ; \
+ RUSTC="${RUSTC:-%__rustc}" ; export RUSTC ; \
+ RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" ; export RUSTFLAGS
+
#-----------------------------------------------------------------
#
# Generate a command which cleans environment, leaving only the
%{nil}
#-----------------------------------------------------------------
+%configuredir .
+%configureshell %{nil}
+
%configure2_13 { \
- if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
- LDFLAGS="${LDFLAGS:-%rpmldflags}" ; export LDFLAGS ; \
- CFLAGS="${CFLAGS:-%rpmcflags}" ; export CFLAGS ; \
- CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" ; export CXXFLAGS ; \
- FFLAGS="${FFLAGS:-%rpmcflags}" ; export FFLAGS ; \
- FCFLAGS="${FCFLAGS:-%rpmcflags}" ; export FCFLAGS ; \
- CPPFLAGS="${CPPFLAGS:-%rpmcppflags}" ; export CPPFLAGS ; \
- %{?__cc:CC="%{__cc}" ; export CC ; } \
- %{?__cxx:CXX="%{__cxx}" ; export CXX ; } \
- %{?configuredir:%{configuredir}}%{!?configuredir:.}/configure \
+ %{set_build_flags}; \
+ %{?configureshell:%{configureshell}} %{configuredir}/configure \
--host=%{_target_platform} \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
%{dependencytracking} \
}
+#----------------------------------------------------------------
+#%configure_cache 0
+%configure_cache_file %{buildroot}.configure.cache
+
+%configure { \
+ %{set_build_flags}; \
+ %{?configureshell:%{configureshell}} %{configuredir}/configure \
+ --host=%{_target_platform} \
+ --build=%{_target_platform} \
+ --prefix=%{_prefix} \
+ --exec-prefix=%{_exec_prefix} \
+ --bindir=%{_bindir} \
+ --sbindir=%{_sbindir} \
+ --sysconfdir=%{_sysconfdir} \
+ --datadir=%{_datadir} \
+ --includedir=%{_includedir} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --localstatedir=%{_localstatedir} \
+ --sharedstatedir=%{_sharedstatedir} \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --x-libraries=%{?_x_libraries}%{!?_x_libraries:%{_libdir}} \
+ %{dependencytracking} \
+ %{?configure_cache:--cache-file=%{configure_cache_file}} \
+}
+
# Note: pass only standard cmake macros here.
# The only exception is SYSCONF_INSTALL_DIR, used commonly in KDE packages,
# where the default (${CMAKE_INSTALL_PREFIX}/etc) is not FHS-compliant and
# in different way (e.g. expect them to be always relative or always
# absolute).
%cmake \
-%{?__cc:CC="${CC:-%{__cc}}"} \\\
-%{?__cxx:CXX="${CXX:-%{__cxx}}"} \\\
-CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \\\
-%{__cmake} \\\
+ %{set_build_flags}; \
+ %{__cmake} \\\
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
-DCMAKE_BUILD_TYPE=%{!?debug:TLD}%{?debug:Debug} \\\
-DCMAKE_SYSTEM_NAME=Linux \\\
- -DCMAKE_CROSSCOMPILING:BOOL=FALSE \\\
+ -DCMAKE_SYSTEM_VERSION="%(uname -r)" \\\
+ -DCMAKE_CROSSCOMPILING:BOOL=OFF \\\
%ifarch x32\
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \\\
%else\
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir} \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
- -DCMAKE_CXX_FLAGS_TLD="${CXXFLAGS:-%{rpmcxxflags} -DNDEBUG -DQT_NO_DEBUG}" \\\
- -DCMAKE_C_FLAGS_TLD="${CFLAGS:-%{rpmcflags} -DNDEBUG -DQT_NO_DEBUG}" \\\
- -DCMAKE_Fortran_FLAGS_TLD="${CFLAGS:-%{rpmcflags} -DNDEBUG -DQT_NO_DEBUG}" \\\
- -DCMAKE_EXE_LINKER_FLAGS_TLD="${LDFLAGS:-%{rpmldflags}}" \\\
- -DCMAKE_SHARED_LINKER_FLAGS_TLD="${LDFLAGS:-%{rpmldflags}}" \\\
- -DCMAKE_MODULE_LINKER_FLAGS_TLD="${LDFLAGS:-%{rpmldflags}}" \\\
+ -DCMAKE_CXX_FLAGS_TLD="${CXXFLAGS} ${CPPFLAGS}" \\\
+ -DCMAKE_C_FLAGS_TLD="${CFLAGS} ${CPPFLAGS}" \\\
+ -DCMAKE_Fortran_FLAGS_TLD="${FFLAGS} ${CPPFLAGS}" \\\
+ -DCMAKE_EXE_LINKER_FLAGS_TLD="${LDFLAGS}" \\\
+ -DCMAKE_SHARED_LINKER_FLAGS_TLD="${LDFLAGS}" \\\
+ -DCMAKE_MODULE_LINKER_FLAGS_TLD="${LDFLAGS}" \\\
%if "%{_lib}" == "lib64" \
-DLIB_SUFFIX=64 \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON \\\
%{nil}
+# scons (since 1.385)
%scons { \
%{__scons} \
LDFLAGS="${LDFLAGS:-%rpmldflags}" \
CFLAGS="${CFLAGS:-%rpmcflags}" \
CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" \
- FFLAGS="${FFLAGS:-%rpmcflags}" \
+ FFLAGS="${FFLAGS:-%rpmfflags}" \
CPPFLAGS="${CPPFLAGS:-%rpmcppflags}" \
%{?__cc:CC="%{__cc}"} \
%{?__cxx:CXX="%{__cxx}"} \
prefix=%{_prefix} \
}
-# waf. see waf.spec
+# waf. see waf.spec (since 1.336)
%waf { \
-CC="%{__cc}" \
-CXX="%{__cxx}" \
-CPP="%{__cpp}" \
-CFLAGS="%{rpmcflags}" \
-CXXFLAGS="%{rpmcxxflags}" \
+%{set_build_flags}; \
LINKFLAGS="%{rpmldflags}" \
%{__waf} \
}
-# meson
-%meson { \
-%{?__cc:CC="${CC:-%{__cc}}"} \
-%{?__cxx:CXX="${CXX:-%{__cxx}}"} \
-CFLAGS="${CFLAGS:-%{rpmcflags}}" \
-CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \
-CXXFLAGS="${CXXFLAGS:-%{rpmcxxflags}}" \
-LDFLAGS="${LDFLAGS:-%{rpmldflags}}" \
-RUSTC="${RUSTC:-%{__rustc}}" \
-RUSTFLAGS="${RUSTFLAGS:-%{rpmrustflags} --target %rust_target}" \
-LC_ALL=C.UTF-8 %{__meson} \
- --buildtype=plain \
- --bindir=%{_bindir} \
- --datadir=%{_datadir} \
- --includedir=%{_includedir} \
- --infodir=%{_infodir} \
- --libdir=%{_libdir} \
- --libexecdir=%{_libexecdir} \
- --localedir=%{_localedir} \
- --localstatedir=%{_localstatedir} \
- --mandir=%{_mandir} \
- --prefix=%{_prefix} \
- --sbindir=%{_sbindir} \
- --sharedstatedir=%{_sharedstatedir} \
- --sysconfdir=%{_sysconfdir} \
- --wrap-mode=%{__meson_wrap_mode} \
- --default-library='both' \
-}
-
-%___meson_deprecate() {echo >&2 "DEPRECATED: %%%1 must be replaced with %%%2"; %{expand:%%%2} }
-%meson_build %___meson_deprecate meson_build ninja_build
-%meson_install %___meson_deprecate meson_install ninja_install
-%meson_test %___meson_deprecate meson_test ninja_test
-
-# ninja
-%ninja_build LC_ALL=C.UTF-8 %{__ninja} %{__ninja_common_opts}
-%ninja_install LC_ALL=C.UTF-8 DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts}
-%ninja_test LC_ALL=C.UTF-8 %{__ninja} test %{__ninja_common_opts}
-
-#----------------------------------------------------------------
-#%configure_cache 0
-%configure_cache_file %{buildroot}.configure.cache
-
-%configure {./configure \
- LDFLAGS="${LDFLAGS:-%rpmldflags}" \
- CFLAGS="${CFLAGS:-%rpmcflags}" \
- CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" \
- FFLAGS="${FFLAGS:-%rpmcflags}" \
- FCFLAGS="${FCFLAGS:-%rpmcflags}" \
- CPPFLAGS="${CPPFLAGS:-%rpmcppflags}" \
- %{?__cc:CC="%{__cc}"} \
- %{?__cxx:CXX="%{__cxx}"} \
- --host=%{_target_platform} \
- --build=%{_target_platform} \
- --prefix=%{_prefix} \
- --exec-prefix=%{_exec_prefix} \
- --bindir=%{_bindir} \
- --sbindir=%{_sbindir} \
- --sysconfdir=%{_sysconfdir} \
- --datadir=%{_datadir} \
- --includedir=%{_includedir} \
- --libdir=%{_libdir} \
- --libexecdir=%{_libexecdir} \
- --localstatedir=%{_localstatedir} \
- --sharedstatedir=%{_sharedstatedir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --x-libraries=%{?_x_libraries}%{!?_x_libraries:%{_libdir}} \
- %{dependencytracking} \
- %{?configure_cache:--cache-file=%{configure_cache_file}} \
-}
-
# Simple macros to simplify adding bconded options to configure scripts.
# Each macro requires bcond name and accepts optional option name, if option
# isn't specified bcond name is used as option name. Options returning
%__without_if() %{expand:%%{?with_%{1}:--without-%{?2}%{!?2:%{1}}}}
%__with_without_not() %{expand:%%{!?with_%{1}:--with-%{?2}%{!?2:%{1}}%{?3:=%{3}}}%%{?with_%{1}:--without-%{?2}%{!?2:%{1}}}}
-# expands to true or false based on bcond; for use with meson or cmake
+# expands to true or false based on bcond; for use with meson or cmake (since 1.729)
%__true_false() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}}
%__true_false_not() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
-# expands to enabled or disabled based on bcond; for use with meson or cmake
+# expands to enabled or disabled based on bcond; for use with meson (since 2.000)
%__enabled_disabled() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
%__enabled_disabled_not() %{expand:%%{?with_%{1}:disabled}%%{!?with_%{1}:enabled}}
-# for use with cmake:
+# expands to enabled or disabled based on bcond; for use with cmake (since 2.047)
+%__ON_OFF() %{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
+%__ON_OFF_not() %{expand:%%{?with_%{1}:OFF}%%{!?with_%{1}:ON}}
+
+# for use with cmake (since 1.742):
# Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
-# BuildRequires: rpmbuild(macros) >= 1.742
+# Deprecated: use clearer -DOPTION_NAME=%{__ON_OFF BCOND_NAME} instead
%cmake_on_off() -D%{?2}%{!?2:%{1}}:BOOL=%{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
#-----------------------------------------------------------------
-# overload to insert debuginfo package
-%prep \
-%if 0%{?_enable_debug_packages}\
-%{debug_package}\
-%endif\
-%%prep\
-%{nil}
-
%_build_id_links %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:alldebug}%{?__dic_0:none}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
# If non-empty "debug" macro defined, add "dbg" suffix to release number
echo "DONE"; \
fi; \
fi; \
- filelist=$(find $RPM_BUILD_ROOT -type f ! -regex ".*/usr/lib[x0-9]*/debug/.*\.debug" ! -regex ".*/usr/lib[x0-9]*.*/guile/.*\.go" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"} %{?_autostripall:! -regex "%{_autostripall}"} %{?_autostripunneeded:! -regex "%{_autostripunneeded}"} %{?_autostripdebug:! -regex "%{_autostripdebug}"}); \
+ filelist=$(find $RPM_BUILD_ROOT ! \( -path "*/usr/src/debug" -prune \) -type f ! -regex ".*/usr/lib[x0-9]*/debug/.*\.debug" ! -regex ".*/usr/lib[x0-9]*.*/guile/.*\.go" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautostrip:! -regex "%{_noautostrip}"} %{?_autostripall:! -regex "%{_autostripall}"} %{?_autostripunneeded:! -regex "%{_autostripunneeded}"} %{?_autostripdebug:! -regex "%{_autostripdebug}"}); \
if [ -n "$filelist" ]; then \
filetypes=`echo "$filelist" | xargs -r -d'\\n' file`; \
elfexelist=`echo "$filetypes" | awk -F: '/ELF.*executable/ {print $1}'`; \
%_soname_prov() %(echo "%{1}()%{_soname_tag}" | sed -e 's/^\\([^(]*([^)]\\+)\\)()%{_soname_tag}$/\\1%{_soname_tag}/;s/()$//')
#-----------------------------------------------------------------
-# Update GConf2 schemas
+# Update GConf2 schemas (since 1.198)
#
# Requires: GConf2
#
%{nil}
#-----------------------------------------------------------------
-# Update desktop MIME database
+# Update desktop MIME database (since 1.198)
# requires: desktop-file-utils
%update_desktop_database() {{ \
umask 022; \
%{nil}
#-----------------------------------------------------------------
-# Update shared MIME info database
+# Update shared MIME info database (since 1.311)
# requires: shared-mime-info
# Note: https://bugs.freedesktop.org/show_bug.cgi?id=70366#c19
# https://bugzilla.redhat.com/show_bug.cgi?id=1052173
%{nil}
#-----------------------------------------------------------------
-# Update scrollkeeper database
+# Update scrollkeeper database (since 1.198)
# requires: scrollkeeper
#
%scrollkeeper_update_post() \
%{nil}
#-----------------------------------------------------------------
-# Compile GSettings schemas
+# Compile GSettings schemas (since 1.592)
# requires: glib2 >= 1:2.26.0
#
%glib_compile_schemas() {{ \
# BuildRequires: rpmbuild(macros) >= 1.719
%zsh_compdir /usr/share/zsh/site-functions
-# depmod macro
+# depmod macro (since 1.184)
%depmod() { \
umask 022; \
if [ -e /boot/System.map-%1 ]; then \
fi; \
}
-# user/group checking macros
+# user/group checking macros (since 1.202)
#
# Usage:
# %userremove myuser
%addusertogroup(q) quiet=%{-q:1} /usr/lib/rpm/user_group.sh user addtogroup %*; \
%{nil}
-# banner support (useful in {pre,post}{,un} and triggers)
+# banner support (useful in {pre,post}{,un} and triggers) (since 1.194)
#
# Usage:
# %banner name [-a] [-e] [-n] [-tn] [-o] <<EOF
# -e - send to stderr instead of stdout
# -n - don't show banner (overrides -t)
# -t - show only, if RPM_SCRIPTVERBOSITY >= n; default n=5
-# -o - show only once, i.e when package is installed for the first time
+# -o - show only once, i.e when package is installed for the first time (since 1.595)
#
# Tests:
# (rpm -E '%banner -e banner <<EOF'; echo -e 'hi\nEOF') > m; sh -x m
eval $CMD %{?2:%2}%{?3: %3})%{-o:)} \
%{nil}
-# useradd/groupadd macros
+# useradd/groupadd macros (since 1.202)
# Author: Elan Ruusamäe <glen@pld-linux.org>
#
# Usage: