diff options
author | Theodore Ts'o <tytso@mit.edu> | 2001-01-02 23:44:00 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2001-01-02 23:44:00 +0000 |
commit | 26d4042e5480ecfe64a7298a3c3895151f080d9a (patch) | |
tree | ccd671b35b7bdd514ff999d3ad8184378c4aa6cb /contrib | |
parent | e5b38a5fafe4807b54d90a2e70bddf4b41b1695b (diff) | |
download | e2fsprogs-26d4042e5480ecfe64a7298a3c3895151f080d9a.tar.gz |
ChangeLog, build-rpm:
build-rpm: Shell script contributed by sct
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rw-r--r-- | contrib/build-rpm | 31 |
2 files changed, 35 insertions, 0 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog new file mode 100644 index 00000000..1a90dcf6 --- /dev/null +++ b/contrib/ChangeLog @@ -0,0 +1,4 @@ +2001-01-02 <tytso@snap.thunk.org> + + * build-rpm: Shell script contributed by sct + diff --git a/contrib/build-rpm b/contrib/build-rpm new file mode 100644 index 00000000..fcafce31 --- /dev/null +++ b/contrib/build-rpm @@ -0,0 +1,31 @@ +#!/bin/sh + +# Build an e2fsprogs RPM from cvs + +pwd=`pwd` +currdir=`basename $pwd` +pkgname=`grep Name: e2fsprogs.spec | awk '{print $2;}'` +pkgvers=`grep Version: e2fsprogs.spec | awk '{print $2;}'` +builddir=${pkgname}-${pkgvers} + +cd .. + +# We need to build a tarball for the SRPM using $builddir as the +# directory name (since that's what RPM will expect it to unpack +# into). That may require a symlink. + +if [ -L $builddir ] ; then + rm -f $builddir || exit 1 +elif [ -d $builddir ] ; then + rm -rf $builddir || exit 1 +fi + +# Make a recursive-symlink copy of the source dir +cp -sR `pwd`/$currdir $builddir || exit 1 + +# Remove any build files from the temporary tarball directory +[ -f $builddir/Makefile ] && make -C $builddir distclean + +tar czfh ${builddir}.tar.gz $builddir + +rpm --define "_sourcedir `pwd`" -ba $currdir/e2fsprogs.spec |