if DEFINE_MCM
sbin_PROGRAMS = svc/mpxyd
svc_mpxyd_SOURCES = dapl/svc/mpxyd.c
-svc_mpxyd_CFLAGS = $(AM_CFLAGS) -lscif -libverbs -Idat/include/
+svc_mpxyd_CFLAGS = $(AM_CFLAGS) -lscif -libverbs -lpthread -Idat/include/
sysconf_DATA += doc/mpxyd.conf
install-exec-hook:
no) mcm=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mcm) ;;
esac],
- [mcm=sciffound])
+ [mcm=$sciffound])
AM_CONDITIONAL(DEFINE_MCM, test x$mcm = xtrue)
dnl Support to enable/disable IB extended counters (CM,LINK,DIAG)
# remove unpackaged files from the buildroot
rm -f %{buildroot}%{_libdir}/*.la
+# make init.d so we can exclude it later:
+mkdir -p %{buildroot}%{_sysconfdir}/init.d
+
%clean
rm -rf %{buildroot}
%post
# fix problem with older dapl packages that clobber dat.conf when updating
-cp $RPM_BUILD_ROOT%{_sysconfdir}/dat.conf /tmp/%{version}-dat.conf
+cp %{_sysconfdir}/dat.conf /tmp/%{version}-dat.conf
/sbin/ldconfig
-if [ $1 = 1 ]; then
- /sbin/chkconfig --add mpxyd &> /dev/null
+
+if [ $1 -gt 1 ]; then
+ /sbin/chkconfig --add mpxyd &> /dev/null || true
fi
%preun
-if [ $1 = 1 ]; then
- /sbin/chkconfig --del mpxyd &> /dev/null
-fi
+/sbin/chkconfig --del mpxyd &> /dev/null || true
%postun
/sbin/ldconfig
%defattr(-,root,root,-)
%{_libdir}/libda*.so.*
%{_sbindir}
+%exclude %dir %{_sysconfdir}/init.d/
%{_sysconfdir}/*
%doc AUTHORS README COPYING ChangeLog LICENSE.txt LICENSE2.txt LICENSE3.txt README.mcm