Rev | Line | |
---|
[4939] | 1 | # |
---|
| 2 | # Plugin for Python package |
---|
| 3 | # |
---|
| 4 | # vi:syntax=sh |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | # |
---|
[5177] | 8 | # get basic info |
---|
| 9 | # |
---|
| 10 | GetBasicInfo() |
---|
| 11 | { |
---|
| 12 | if [ -f ${BUILDDIR}/${PKGDIR}/PKG-INFO ]; then |
---|
| 13 | SUMMARY=`grep 'Summary:' ${BUILDDIR}/${PKGDIR}/PKG-INFO | sed -e 's/Summary: *//'` |
---|
| 14 | URI=`grep 'Home-page:' ${BUILDDIR}/${PKGDIR}/PKG-INFO | sed -e 's/Home-page: *//'` |
---|
| 15 | grep -v "^[a-zA-Z\-]*:" ${BUILDDIR}/${PKGDIR}/PKG-INFO | sed -e 's/^ //' > ${SOURCEDIR}/description.mkrpmspec |
---|
| 16 | fi |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | # |
---|
[4939] | 20 | # output dependency |
---|
| 21 | # |
---|
| 22 | OutputDependency() |
---|
| 23 | { |
---|
| 24 | echo "# Dependency" >> ${SPECFILE} |
---|
| 25 | echo "# `eval_gettext "Please describe a dependency below. "`" >> ${SPECFILE} |
---|
[5171] | 26 | echo "Requires: python" >> ${SPECFILE} |
---|
[6723] | 27 | echo "BuildRequires: python-devel" >> ${SPECFILE} |
---|
[4939] | 28 | echo >> ${SPECFILE} |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | # |
---|
| 32 | # Output build section |
---|
| 33 | # |
---|
| 34 | OutputBuild() |
---|
| 35 | { |
---|
| 36 | cat >> ${SPECFILE} << 'EOL' |
---|
| 37 | %build |
---|
| 38 | %{__python} setup.py build |
---|
| 39 | |
---|
| 40 | EOL |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | # |
---|
| 44 | # Output install section |
---|
| 45 | # |
---|
| 46 | OutputInstall() |
---|
| 47 | { |
---|
| 48 | cat >> ${SPECFILE} << 'EOL' |
---|
| 49 | %install |
---|
| 50 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 51 | %{__python} setup.py install --root=${RPM_BUILD_ROOT} |
---|
| 52 | |
---|
| 53 | EOL |
---|
| 54 | } |
---|
| 55 | |
---|
Note: See
TracBrowser
for help on using the repository browser.