From: Arlin Davis Date: Wed, 26 Jun 2013 23:45:12 +0000 (-0700) Subject: mpxyd: fix build with/without scif, init.d directory conflict, and missing -lpthread X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=cb0eea6dff986d2f4e5aa84addfddce609d82b00;p=~ardavis%2Fdapl.git mpxyd: fix build with/without scif, init.d directory conflict, and missing -lpthread Signed-off-by: Patrick Mccormick Acked-by: Arlin Davis --- diff --git a/Makefile.am b/Makefile.am index 449cea8..e083013 100755 --- a/Makefile.am +++ b/Makefile.am @@ -751,7 +751,7 @@ EXTRA_DIST = dat/common/dat_dictionary.h \ 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: diff --git a/configure.in b/configure.in index f73502f..59f6305 100644 --- a/configure.in +++ b/configure.in @@ -117,7 +117,7 @@ AC_ARG_ENABLE([mcm], 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) diff --git a/intel-mic-ofed-dapl.spec.in b/intel-mic-ofed-dapl.spec.in index 0f0e76f..35412c4 100644 --- a/intel-mic-ofed-dapl.spec.in +++ b/intel-mic-ofed-dapl.spec.in @@ -105,21 +105,23 @@ make install DESTDIR=$RPM_BUILD_ROOT # 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 @@ -128,6 +130,7 @@ fi %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