PageRenderTime 132ms CodeModel.GetById 70ms app.highlight 2ms RepoModel.GetById 59ms app.codeStats 0ms

/scripts/rpm-install.sh

https://code.google.com/p/mango-py/
Shell | 28 lines | 16 code | 4 blank | 8 comment | 3 complexity | c29f633bb297c15596295fd5a01391a4 MD5 | raw file
 1#! /bin/sh
 2#
 3# This file becomes the install section of the generated spec file.
 4#
 5
 6# This is what dist.py normally does.
 7python setup.py install --root=${RPM_BUILD_ROOT} --record="INSTALLED_FILES"
 8
 9# Sort the filelist so that directories appear before files. This avoids
10# duplicate filename problems on some systems.
11touch DIRS
12for i in `cat INSTALLED_FILES`; do
13  if [ -f ${RPM_BUILD_ROOT}/$i ]; then
14    echo $i >>FILES
15  fi
16  if [ -d ${RPM_BUILD_ROOT}/$i ]; then
17    echo %dir $i >>DIRS
18  fi
19done
20
21# Make sure we match foo.pyo and foo.pyc along with foo.py (but only once each)
22sed -e "/\.py[co]$/d" -e "s/\.py$/.py*/" DIRS FILES >INSTALLED_FILES
23
24mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man1/
25cp docs/man/* ${RPM_BUILD_ROOT}/%{_mandir}/man1/
26cat << EOF >> INSTALLED_FILES
27%doc %{_mandir}/man1/*"
28EOF