self.build_stage(stage)
# Run post-build stuff.
+ self.post_compress_man_pages()
self.post_remove_static_libs()
# Package the result.
except Error, e:
logging.warning(_("Could not remove static libraries: %s") % e)
+ def post_compress_man_pages(self):
+ try:
+ self.do("%s/compress-man-pages %s" % (SCRIPT_DIR, self.buildroot))
+ except Error, e:
+ logging.warning(_("Compressing man pages did not complete successfully."))
+
def cleanup(self):
if os.path.exists(self.buildroot):
util.rm(self.buildroot)
SCRIPTS_SHELL = \
chroot-shell \
cleanup \
+ compress-man-pages \
dependency-tracker \
pakfire-multicall.py \
py-compile \
--- /dev/null
+#!/bin/bash
+
+echo "Compressing man pages..."
+
+BUILDROOT=${1}
+shift
+
+for file in $(find ${BUILDROOT}/usr/share/man -type f); do
+ case "${file}" in
+ *.gz)
+ gzip -d ${file}
+ file=${file%*.gz}
+ ;;
+ *.bz2)
+ bzip2 -d ${file}
+ file=${file%*.bz2}
+ ;;
+ esac
+
+ echo " Compressing man page ${file//${BUILDROOT}/}..."
+ xz ${file}
+done
+
+exit 0
for dir in ${dirs}; do
dir="${prefix}${dir}"
for file in $(find ${dir} -type f -not -name "*.ko" 2>/dev/null); do
+ case "${file}" in
+ # Skip kernel modules.
+ */lib/modules/*)
+ continue
+ ;;
+ esac
+
if file_is_elf ${file} && ! file_is_static ${file}; then
files="${files} ${file}"
fi
+++ /dev/null
-#!/bin/bash
-
-. $(dirname ${0})/qa-include
-
-DESC="Decompressing man-pages..."
-
-function check() {
- for file in $(find ${BUILDROOT}/usr/share/man -type f 2>/dev/null); do
- log DEBUG " Processing: ${file}"
- if [[ ${file} =~ \.gz$ ]]; then
- gzip -d ${file}
- fi
- done
-}
-
-run
-