[ewg] libehca.spec.in file
Vladimir Sokolovsky
vlad at dev.mellanox.co.il
Sun Jul 15 08:42:21 PDT 2007
Hi,
The following patch adds RPM spec file to libehca:
Added libehca.spec.in file
Signed-off-by: Vladimir Sokolovsky <vlad at mellanox.co.il>
diff --git a/Makefile.am b/Makefile.am
index 6bbd4f1..84a459b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,7 +70,8 @@ EXTRA_DIST = src/ehca_asm.h \
src/ehca_utools.h \
src/hipz_hw.h \
src/libehca.map \
+ libehca.spec.in \
ehca.driver
-# dist-hook: libehca.spec
-# cp libehca.spec $(distdir)
+dist-hook: libehca.spec
+ cp libehca.spec $(distdir)
diff --git a/configure.in b/configure.in
index 9c86688..9398c8c 100644
--- a/configure.in
+++ b/configure.in
@@ -48,7 +48,7 @@ AC_SUBST(IBV_DEVICE_LIBRARY_EXTENSION)
dnl Checks for programs.
AC_PROG_CC
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile libehca.spec])
AC_OUTPUT
if test "$disable_libcheck" == "yes"
diff --git a/libehca.spec.in b/libehca.spec.in
new file mode 100644
index 0000000..5f8af94
--- /dev/null
+++ b/libehca.spec.in
@@ -0,0 +1,55 @@
+Name: libehca
+Version: @VERSION@
+Release: 0%{?dist}
+Summary: Mellanox InfiniBand HCA Userspace Driver
+
+Group: System Environment/Libraries
+License: GPL/BSD
+Url: http://www.openfabrics.org/
+Source: http://www.openfabrics.org/downloads/libehca-1.0.tar.gz
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires: libibverbs-devel >= 1.1-0.1.rc2
+
+%description
+libehca provides a device-specific userspace driver for IBM HCAs
+for use with the libibverbs library.
+
+%package devel-static
+Summary: Development files for the libehca driver
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel-static
+Static version of libehca that may be linked directly to an
+application, which may be useful for debugging.
+
+%prep
+%setup -q -n %{name}- at VERSION@
+
+%build
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=%{buildroot} install
+# remove unpackaged files from the buildroot
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{_libdir}/libehca.so
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libehca-rdmav2.so
+%{_sysconfdir}/libibverbs.d/mthca.driver
+%doc AUTHORS COPYING ChangeLog README
+
+%files devel-static
+%defattr(-,root,root,-)
+%{_libdir}/libehca.a
+
+%changelog
+* Mon Jul 9 2007 Vladimir Sokolovsky <vlad at mellanox.co.il> - 1.0-0
+- Initial packaging
More information about the ewg
mailing list