2012-04-09 10:05:48 +00:00
|
|
|
python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
|
|
|
|
# 'brp-compress' compresses the manpages without distutils knowing.
|
|
|
|
# The sed scripts append ".gz", ".bz2" or ".xz" suffixes to the affected
|
|
|
|
# manpage filenames.
|
2012-04-11 16:21:22 +00:00
|
|
|
RPM_MANDIR=usr/share/man
|
|
|
|
RPM_LOCALMANDIR=usr/local/share/man
|
2012-04-09 10:05:48 +00:00
|
|
|
|
2012-04-11 16:21:22 +00:00
|
|
|
if [ -n "$( ls $RPM_BUILD_ROOT/$RPM_MANDIR/man*/*.bz2 2>/dev/null )" \
|
|
|
|
-o -n "$( ls $RPM_BUILD_ROOT/$RPM_LOCALMANDIR/man*/*.bz2 2>/dev/null )" ]; then
|
2012-04-09 10:05:48 +00:00
|
|
|
# add .bz2 suffix
|
|
|
|
sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.bz2@g' INSTALLED_FILES
|
2012-04-11 16:21:22 +00:00
|
|
|
elif [ -n "$( ls $RPM_BUILD_ROOT/$RPM_MANDIR/man*/*.xz 2>/dev/null )" \
|
|
|
|
-o -n "$( ls $RPM_BUILD_ROOT/$RPM_LOCALMANDIR/man*/*.xz 2>/dev/null )" ]; then
|
2012-04-09 10:05:48 +00:00
|
|
|
# add .xz suffix
|
|
|
|
sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.xz@g' INSTALLED_FILES
|
2012-04-11 16:21:22 +00:00
|
|
|
elif [ -n "$( ls $RPM_BUILD_ROOT/$RPM_MANDIR/man*/*.gz 2>/dev/null )" \
|
|
|
|
-o -n "$( ls $RPM_BUILD_ROOT/$RPM_LOCALMANDIR/man*/*.gz 2>/dev/null )" ]; then
|
|
|
|
# add .gz suffix
|
2012-04-09 10:05:48 +00:00
|
|
|
sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.gz@g' INSTALLED_FILES
|
|
|
|
fi
|