@@ -26,7 +26,7 @@ BuildRequires: systemd
2626# Must use /var/run for runtime_path on older releases or dnsmasq in the
2727# lxc-net script will not be able to write its pid in /run (selinux denial)
2828%if 0%{?fedora} < 15 || 0%{?rhel} < 7
29- %define _with_runtime_path --with-runtime -path=/var/run
29+ %define _with_runtime_path -Druntime -path=/var/run
3030%endif
3131
3232# RPM needs alpha/beta/rc in Release: not Version: to ensure smooth
@@ -52,12 +52,13 @@ Requires: openssl rsync dnsmasq bridge-utils
5252Requires: %{name}-libs = %{version}-%{release}
5353Requires(pre): /usr/sbin/useradd
5454Requires(postun): /usr/sbin/userdel
55- %if 0%{?fedora} < 15 || 0%{?rhel} < 7
55+ %if 0%{?fedora} < 15 && 0%{?rhel} < 7
5656Requires: libcgroup
5757%endif
5858# Note for Suse. The "docbook2X" BuildRequires does properly
5959# match docbook2x on Suse in a case insensitive manner
60- BuildRequires: libcap libcap-devel docbook2X graphviz libxslt pkgconfig dbus-1
60+ BuildRequires: libcap libcap-devel docbook2X graphviz libxslt pkgconfig dbus-devel
61+ BuildRequires: meson
6162
6263#
6364# Additional packages for openSUSE and SUSE
@@ -109,22 +110,18 @@ development of the Linux containers.
109110%setup -q -n %{name}-%{version}%{?beta_dot}
110111%build
111112
112- #Dont use pkgconfig to get bash completion dir and use backwards compatible location.
113- export bashcompdir=%{_sysconfdir}/bash_completion.d
114-
115- PATH=$PATH:/usr/sbin:/sbin %configure $args \
113+ %meson \
116114%if "x%{_unitdir}" != "x"
117- --with-systemdsystemunitdir =%{_unitdir} \
115+ -Dsystemd-unitdir =%{_unitdir} \
118116%endif
119117 %{?_with_runtime_path} \
120- --disable-rpath \
121- --with-init-script=%{init_script}
122- make %{?_smp_mflags}
118+ "-Dinit-script=['%{init_script}']"
119+
120+ %meson_build
123121
124122%install
125123rm -rf %{buildroot}
126- make install DESTDIR=%{buildroot}
127- find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
124+ %meson_install
128125
129126%clean
130127rm -rf %{buildroot}
228225%{_mandir}/ko/man5/lxc*
229226%{_mandir}/ko/man7/lxc*
230227%endif
228+ %{_datadir}/bash-completion/completions
231229%{_datadir}/doc/*
232230%{_datadir}/lxc/*
233- %{_sysconfdir}/bash_completion.d
234231%config(noreplace) %{_sysconfdir}/lxc/*
235232%config(noreplace) %{_sysconfdir}/sysconfig/*
236233
0 commit comments