Make setup.py install the iotop script in sbin/ instead of bin/.
[iotop.git] / .install-rpm.sh
blob9b6fc3e326b4a7c2742ca2328da3ed42b408b746
1 #!/bin/bash
3 # http://bugs.python.org/issue644744
5 python setup.py install -O1 --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES
6 # 'brp-compress' gzips the man pages without distutils knowing... fix this
7 sed -i -e 's@man/man\([[:digit:]]\)/\(.\+\.[[:digit:]]\)$@man/man\1/\2.gz@g' INSTALLED_FILES
8 # actually, it doesn't on all distributions so just compress unconditionally
9 # before brp-compress is run
10 find "$RPM_BUILD_ROOT" -type f -name iotop.8 -exec gzip '{}' \;
12 # move from bin/ to sbin/
13 sed -i -e 's@/bin/iotop@/sbin/iotop@g' INSTALLED_FILES
14 cd "$(find "$RPM_BUILD_ROOT" -type d -name bin)/.."
15 mv bin sbin
16 cd -