From 09d4793eed6e5e7b0e217059e1ecb6805bcf299c Mon Sep 17 00:00:00 2001 From: John Morris Date: Sun, 4 Aug 2013 17:00:24 -0500 Subject: misc/bcfg2.spec: reconcile: %prep and %build --- misc/bcfg2.spec | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index 160f986da..c5388ebfc 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -389,16 +389,29 @@ This package includes the examples files for Bcfg2. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name}-%{version}%{?_pre_rc} -%build -%{__python}%{pythonversion} setup.py build +# Fixup some paths +%{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' tools/bcfg2-cron + +%{__perl} -pi -e 's@/usr/lib/bcfg2@%{_libexecdir}@g' debian/bcfg2.cron.daily +%{__perl} -pi -e 's@/usr/lib/bcfg2@%{_libexecdir}@g' debian/bcfg2.cron.hourly -%{?pythonpath: export PYTHONPATH="%{pythonpath}"} -%{__python}%{pythonversion} setup.py build_sphinx +# Get rid of extraneous shebangs +for f in `find src/lib -name \*.py` +do + %{__sed} -i -e '/^#!/,1d' $f +done sed -i "s/apache2/httpd/g" misc/apache/bcfg2.conf + +%build +%{__python} setup.py build +%{?pythonpath: PYTHONPATH="%{pythonpath}"} \ + %{__python} setup.py build_sphinx + + %install rm -rf %{buildroot} %{__python}%{pythonversion} setup.py install --root=%{buildroot} --record=INSTALLED_FILES --prefix=/usr -- cgit v1.2.3-1-g7c22