]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Simplify rpm build scripts
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 30 Apr 2024 09:39:36 +0000 (11:39 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 30 Apr 2024 09:39:36 +0000 (11:39 +0200)
mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot

index fb3ca65ab3d10a4a11eb13d657fc3aa291206e14..498c52e0114b27a8d9240d84da8b5bd54792eb9d 100755 (executable)
@@ -46,24 +46,21 @@ ANNOBIN="no-active-checks" rpmbuild \
     --build-in-place \
     --with upstream \
     $( ((WITH_TESTS)) || echo "--nocheck") \
-    $( ((WITH_DOCS))  || echo "--without docs") \
+    $( ((WITH_DOCS))  || echo "--without=docs") \
     --define "_topdir /var/tmp" \
     --define "_sourcedir pkg/$ID" \
     --define "_rpmdir $OUTPUTDIR" \
-    ${BUILDDIR:+--define} \
-    ${BUILDDIR:+"_vpath_builddir $BUILDDIR"} \
+    ${BUILDDIR:+"--define=_vpath_builddir $BUILDDIR"} \
     --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
     --define "_binary_payload w.ufdio" \
-    $( ((WITH_DEBUG)) || echo --define) \
-    $( ((WITH_DEBUG)) || echo "debug_package %{nil}") \
+    $( ((WITH_DEBUG)) || echo "--define=debug_package %{nil}") \
     --define "version_override $VERSION" \
     --define "release_override $RELEASE" \
     --define "build_cflags $CFLAGS" \
     --define "meson_build %{shrink:%{__meson} compile -C %{_vpath_builddir} -j %{_smp_build_ncpus} %{nil}}" \
     --define "meson_install %{shrink:DESTDIR=%{buildroot} %{__meson} install -C %{_vpath_builddir} --no-rebuild --quiet %{nil}}" \
     --define "meson_extra_configure_options -D mode=developer -D b_sanitize=${SANITIZERS:-none}" \
-    $( ((WITH_DEBUG)) || echo --define) \
-    $( ((WITH_DEBUG)) || echo "__brp_strip %{nil}") \
+    $( ((WITH_DEBUG)) || echo "--define=__brp_strip %{nil}") \
     --define "__brp_compress %{nil}" \
     --define "__brp_mangle_shebangs %{nil}" \
     --define "__brp_strip_comment_note %{nil}" \
index da4c1df556ab5135effd363f920285f20f5a6fb8..8a2df7423636293ae73ceab480b4cae08538cbf2 100755 (executable)
@@ -52,16 +52,14 @@ build() {
         -bb \
         --build-in-place \
         --with upstream \
-        $( ((WITH_TESTS)) || echo --nocheck) \
+        $( ((WITH_TESTS)) || echo "--nocheck") \
         --define "_topdir /var/tmp" \
         --define "_sourcedir pkg/$ID" \
         --define "_rpmdir $OUTPUTDIR" \
-        ${BUILDDIR:+--define} \
-        ${BUILDDIR:+"_vpath_builddir $BUILDDIR"} \
+        ${BUILDDIR:+"--define=_vpath_builddir $BUILDDIR"} \
         --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
         --define "_binary_payload w.ufdio" \
-        $( ((WITH_DEBUG)) || echo --define) \
-        $( ((WITH_DEBUG)) || echo "debug_package %{nil}") \
+        $( ((WITH_DEBUG)) || echo "--define=debug_package %{nil}") \
         --define "vendor openSUSE" \
         --define "version_override $VERSION" \
         --define "release_override $RELEASE" \