-%{__intltoolize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-
-%configure \
- CPPFLAGS="%{rpmcppflags} -I/usr/include/lz4" \
- QUOTAON=/sbin/quotaon \
- QUOTACHECK=/sbin/quotacheck \
- SETCAP=/sbin/setcap \
- KILL=/bin/kill \
- KMOD=/sbin/kmod \
- KEXEC=/sbin/kexec \
-%if "%{?configure_cache}" == "1"
- --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}.cache \
-%endif
- %{?debug:--enable-debug} \
- %{__enable_disable audit} \
- %{__enable_disable cryptsetup libcryptsetup} \
- %{__enable_disable efi gnuefi} \
- %{__enable_disable pam} \
- %{__enable_disable selinux} \
- %{__enable_disable microhttpd} \
- %{__enable_disable qrencode} \
- --disable-silent-rules \
- --enable-lz4 \
- --enable-split-usr \
- --with-kbd-loadkeys=/usr/bin/loadkeys \
- --with-kbd-setfont=/bin/setfont \
- --with-ntp-servers='0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org' \
- --with-rc-local-script-path-start=/etc/rc.d/rc.local \
- --with-rc-local-script-path-stop=/sbin/halt.local \
- --with-rootprefix="" \
- --with-rootlibdir=/%{_lib} \
- --with-sysvinit-path=/etc/rc.d/init.d \
- --with-sysvrcnd-path=/etc/rc.d \
- --without-kill-user-processes
-
-%{__make}
-
-./libtool --mode=link --tag=CC %{__cc} %{rpmcppflags} %{rpmcflags} -o systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd
-
-%{?with_tests:%{__make} check}
+%meson build \
+ -Daudit=%{__true_false audit} \
+ -Ddefault-kill-user-processes=false \
+ %{?debug:--buildtype=debug} \
+ -Defi=%{__true_false efi} \
+ -Dhalt-local=/sbin/halt.local \
+ -Dkexec-path=/sbin/kexec \
+ -Dkill-path=/bin/kill \
+ -Dkmod-path=/sbin/kmod \
+ -Dlibcryptsetup=%{__true_false cryptsetup} \
+ -Dloadkeys-path=/usr/bin/loadkeys \
+ -Dlz4=true \
+ -Dmicrohttpd=%{__true_false microhttpd} \
+ -Dmount-path=/bin/mount \
+ -Dntp-servers='0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org' \
+ -Dpam=%{__true_false pam} \
+ -Dqrencode=%{__true_false qrencode} \
+ -Dquotacheck=true \
+ -Dquotacheck-path=/sbin/quotacheck \
+ -Dquotaon-path=/sbin/quotaon \
+ -Drc-local=/etc/rc.d/rc.local \
+ -Drootlibdir=/%{_lib} \
+ -Drootprefix="" \
+ -Drootsbindir=%{_rootsbindir} \
+ -Dselinux=%{__true_false selinux} \
+ -Dsetfont-path=/bin/setfont \
+ -Dsplit-usr=true \
+ -Dsulogin-path=/sbin/sulogin \
+ -Dsysvinit-path=/etc/rc.d/init.d \
+ -Dsysvrcnd-path=/etc/rc.d \
+ -Dumount-path=/bin/umount
+
+%meson_build -C build
+
+%{__cc} %{rpmcppflags} %{rpmcflags} -o build/systemd_booted %{rpmldflags} src/systemd_booted.c -L. -lsystemd
+
+%{?with_tests:%meson_test -C build}