diff --git a/mdadm.spec b/mdadm.spec index ef7215c..53b2436 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -36,7 +36,9 @@ BuildRequires: systemd-units Requires(post): systemd-units systemd-sysv chkconfig coreutils Requires(preun): systemd-units Requires(postun): systemd-units coreutils -Requires: udev initscripts +Requires: udev >= 176 +Conflicts: filesystem < 3 +Conflicts: systemd < 38 %description The mdadm program is used to create, manage, and monitor Linux MD (software @@ -77,17 +79,18 @@ is not used as the system init process. %patch20 -p1 -b .static %build -make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS" SYSCONFDIR="%{_sysconfdir}" mdadm mdmon %install rm -rf %{buildroot} -make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=/sbin install +make DESTDIR=%{buildroot} MANDIR=%{_mandir} BINDIR=%{_sbindir} install install -Dp -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/mdmonitor install -Dp -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/raid-check -install -Dp -m 644 %{SOURCE3} %{buildroot}/lib/udev/rules.d/65-md-incremental.rules +install -Dp -m 644 %{SOURCE3} %{buildroot}%{_prefix}/lib/udev/rules.d/65-md-incremental.rules install -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/raid-check install -Dp -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.d/raid-check mkdir -p -m 700 %{buildroot}/var/run/mdadm +# move upstream installed udev rules to /usr +mv -f %{buildroot}/lib/udev/rules.d/*.rules %{buildroot}%{_prefix}/lib/udev/rules.d || : # systemd mkdir -p %{buildroot}%{_unitdir} @@ -132,9 +135,8 @@ fi %files %defattr(-,root,root,-) %doc TODO ChangeLog mdadm.conf-example COPYING misc/* -/lib/udev/rules.d/* -/sbin/* -%{_sbindir}/raid-check +%{_prefix}/lib/udev/rules.d/* +%{_sbindir}/* %{_unitdir}/mdmonitor.service %{_unitdir}/mdmonitor-takeover.service %{_mandir}/man*/md*