Permalink
Browse files

add build rpm support

Signed-off-by: Gu Zheng <gzheng@ddn.com>
  • Loading branch information...
Gu Zheng
Gu Zheng committed Dec 22, 2016
1 parent 7ca66ab commit 53748896edd35d35e57f3f610ada159828f8e773
Showing with 98 additions and 0 deletions.
  1. +12 −0 Makefile.am
  2. +36 −0 buildrpm
  3. +50 −0 mpifileutils.spec
View
@@ -23,9 +23,16 @@ MAINTAINERCLEANFILES = \
ltconfig ltmain.sh missing mkinstalldirs \
stamp-h.in
BUILD_DIRS = BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
$(BUILD_DIRS):
rm -rf $@
mkdir $@
distclean-local:
-(cd $(top_srcdir) && rm -rf autom4te*.cache autoscan.*)
-(cd $(top_srcdir) && rm -rf $(PACKAGE)-*)
-(cd $(top_srcdir) && rm -rf $(BUILD_DIRS))
mrproper: distclean-local clean
-(cd $(top_srcdir) && rm -rf autom4te.cache config.h config.log)
@@ -41,4 +48,9 @@ mrproper: distclean-local clean
-find $(top_srcdir)/ -name ".dirstamp" -exec rm {} \;
-find $(top_srcdir) -depth -name ".deps" -exec rm -rf {} \;
rpm: dist ${BUILD_DIRS}
mv $(distdir).tar.gz SOURCES
rpmbuild -ba --define="_topdir `pwd`" mpifileutils.spec
.PHONY: test
View
@@ -0,0 +1,36 @@
#!/bin/bash
. /usr/local/tools/dotkit/init.sh
use mvapich2-gnu
set -x
export topdir=`pwd`
export installdir=$topdir/install
export PATH="${topdir}/autotools/install/bin:$PATH"
./autogen.sh
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${installdir}/lib/pkgconfig"
# TODO: avoid this step
# necessary so configure test of dtcmp links with MPI
export CC=mpicc
# hack to get things to build after common library
export CFLAGS="-I${topdir}/src/common -DDCOPY_USE_XATTRS"
export LDFLAGS="-Wl,-rpath,${topdir}/install/lib -L${topdir}/install/lib -lcircle"
#./configure \
# --enable-lustre \
# --prefix=$installdir \
# --disable-silent-rules \
# --with-dtcmp=$installdir && \
./configure --enable-dist && \
make dist && \
make rpm
if [ $? -ne 0 ] ; then
echo "failed to configure, build, or build file utils rpm"
exit 1
fi
View
@@ -0,0 +1,50 @@
Name: mpifileutils
Version: 0.6
Release: 1%{?dist}
Summary: File utilities designed for scalability and performance.
Group: System Environment/Libraries
License: Copyright and BSD License
URL: http://fileutils.io/
Source: %{name}-%{version}.tar.gz
BuildRoot: %_topdir/BUILDROOT
Requires: libcircle, lwgrp, dtcmp, libarchive, openssl, openssl-devel
%description
File utilities designed for scalability and performance.
%prep
%setup -q
%build
#topdir=`pwd`
#installdir=$topdir/install
#export PATH="${topdir}/autotools/install/bin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${installdir}/lib/pkgconfig"
export CC=mpicc
# hack to get things to build after common library
export CFLAGS="-I${topdir}/src/common -DDCOPY_USE_XATTRS"
export LDFLAGS="-Wl,-rpath,-lcircle"
%configure \
--bindir=%{_bindir} \
--enable-lustre \
--disable-silent-rules \
--with-dtcmp=${installdir} && \
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_includedir}/*
%{_libdir}/*
%{_mandir}/*
%changelog

0 comments on commit 5374889

Please sign in to comment.