summaryrefslogtreecommitdiff
path: root/source/ap/rpm/rpm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/rpm/rpm.SlackBuild')
-rwxr-xr-xsource/ap/rpm/rpm.SlackBuild13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/ap/rpm/rpm.SlackBuild b/source/ap/rpm/rpm.SlackBuild
index 68ab36a4..2f930c37 100755
--- a/source/ap/rpm/rpm.SlackBuild
+++ b/source/ap/rpm/rpm.SlackBuild
@@ -22,7 +22,8 @@
# Build RPM (of all things) for Slackware.
-VERSION=${VERSION:-4.8.0}
+PKGNAM=rpm
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -119,9 +120,17 @@ zcat $CWD/Packages.gz > $PKG/var/lib/rpm/tmp/Packages
# Install docs
mkdir -p $PKG/usr/doc/rpm-$VERSION
cp -a \
- CHANGES COPYING CREDITS GROUPS INSTALL README TODO doc/manual \
+ COPYING* CREDITS GROUPS INSTALL README* TODO doc/manual \
$PKG/usr/doc/rpm-$VERSION
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
mkdir -p $PKG/install
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc