summaryrefslogtreecommitdiff
path: root/scripts/brp-compress
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-01-07 17:32:27 +0000
committerjbj <devnull@localhost>2000-01-07 17:32:27 +0000
commit65e8fdb8f9bf5857e1c4ebf8adbefc566126037c (patch)
tree74a9aa5d65118dabcce260de323bc283ef0e0cce /scripts/brp-compress
parentba46bbb4feb8c4fab914cfc835e953d8d94485a4 (diff)
downloadrpm-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.tar.gz
rpm-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.tar.bz2
rpm-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.zip
add several BuildRoot FTW policies.
CVS patchset: 3511 CVS date: 2000/01/07 17:32:27
Diffstat (limited to 'scripts/brp-compress')
-rwxr-xr-xscripts/brp-compress19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/brp-compress b/scripts/brp-compress
new file mode 100755
index 000000000..5d4710980
--- /dev/null
+++ b/scripts/brp-compress
@@ -0,0 +1,19 @@
+#!/bin/sh
+# If using normal root, avoid changing anything.
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+fi
+
+cd $RPM_BUILD_ROOT
+
+# Compress man pages
+COMPRESS=gzip
+
+for d in ./usr/man/man* ./usr/man/*/man* ./usr/X11R6/man/man* ./usr/lib/perl5/man/man*
+do
+ [ -d $d ] || continue
+ for f in `find $d -type f | sed -e 's/[^ ]*\.gz//' -e 's/[^ ]*\.bz2//'`
+ do
+ $COMPRESS $f
+ done
+done