Fix RPM generation.

This commit is contained in:
Bastian Kleineidam 2012-04-09 12:05:48 +02:00
parent 0c652e63c3
commit c790c5c7b9
2 changed files with 26 additions and 0 deletions

15
install-rpm.sh Normal file
View File

@ -0,0 +1,15 @@
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.
if [ -n "$( ls $RPM_BUILD_ROOT/usr/share/man/man*/*.bz2 2>/dev/null )" ]; then
# add .bz2 suffix
sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.bz2@g' INSTALLED_FILES
elif [ -n "$( ls $RPM_BUILD_ROOT/usr/share/man/man*/*.xz 2>/dev/null )" ]; then
# add .xz suffix
sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.xz@g' INSTALLED_FILES
else
# assume that man pages have a ".gz" suffix
sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.gz@g' INSTALLED_FILES
fi

11
setup.cfg Normal file
View File

@ -0,0 +1,11 @@
[global]
;command_packages = distcmds
[bdist_rpm]
release = 1
packager = Bastian Kleineidam <calvin@users.sourceforge.net>
doc_files = doc/
provides = patool
group = Web/Utilities
install_script = install-rpm.sh
python = python