]>
git.ipfire.org Git - thirdparty/systemd.git/blob - mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
2 # SPDX-License-Identifier: LGPL-2.1-or-later
5 # shellcheck source=/dev/null
8 if [ ! -f "pkg/$ID/systemd.spec" ]; then
9 echo "spec not found at pkg/$ID/systemd.spec, run mkosi once with -ff to make sure the spec is cloned" >&2
13 if [ -d .git
/ ] && [ -z "$(git status --porcelain)" ]; then
14 TS
="$(git show --no-patch --format=%ct HEAD)"
16 TS
="${SOURCE_DATE_EPOCH:-$(date +%s)}"
19 # Fix the %install override so debuginfo packages are generated even when --build-in-place is used.
20 # See https://github.com/rpm-software-management/rpm/issues/3042.
21 tee --append /usr
/lib
/rpm
/redhat
/macros
<<'EOF'
22 %install %{?_enable_debug_packages:%{debug_package}}\
28 # TODO: Replace meson_build and meson_install overrides with "--undefine __meson_verbose" once
29 # https://github.com/mesonbuild/meson/pull/12835 is available.
30 # shellcheck disable=SC2046
35 $
( ((WITH_TESTS
)) ||
echo "--nocheck") \
36 $
( ((WITH_DOCS
)) ||
echo "--without docs") \
37 --define "_topdir /var/tmp" \
38 --define "_sourcedir pkg/$ID" \
39 --define "_rpmdir $OUTPUTDIR" \
40 ${BUILDDIR:+--define} \
41 ${BUILDDIR:+"_vpath_builddir $BUILDDIR"} \
42 --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
43 --define "_binary_payload w.ufdio" \
44 $
( ((WITH_DEBUG
)) ||
echo --define) \
45 $
( ((WITH_DEBUG
)) ||
echo "debug_package %{nil}") \
46 --define "version_override $(cat meson.version)" \
47 --define "release_override $(date "+%Y
%m
%d
%H
%M
%S
" --date "@
$TS")" \
48 --define "_distro_extra_cflags -Og" \
49 --define "meson_build %{shrink:%{__meson} compile -C %{_vpath_builddir} -j %{_smp_build_ncpus} %{nil}}" \
50 --define "meson_install %{shrink:DESTDIR=%{buildroot} %{__meson} install -C %{_vpath_builddir} --no-rebuild --quiet %{nil}}" \
51 --define "meson_extra_configure_options -D mode=developer -D b_sanitize=${SANITIZERS:-none}" \
52 $
( ((WITH_DEBUG
)) ||
echo --define) \
53 $
( ((WITH_DEBUG
)) ||
echo "__brp_strip %{nil}") \
54 --define "__brp_compress %{nil}" \
55 --define "__brp_mangle_shebangs %{nil}" \
56 --define "__brp_strip_comment_note %{nil}" \
57 --define "__brp_strip_static_archive %{nil}" \
58 --define "__brp_check_rpaths %{nil}" \
59 --define "__elf_exclude_path ^/usr/lib/systemd/tests/unit-tests/.*$" \
60 --define "__script_requires %{nil}" \
61 --undefine _lto_cflags \
63 "pkg/$ID/systemd.spec"
65 cp "$OUTPUTDIR"/*.rpm
"$PACKAGEDIR"