summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorJohn Morris <john@zultron.com>2013-08-04 17:00:24 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-10-28 08:05:23 -0400
commit09d4793eed6e5e7b0e217059e1ecb6805bcf299c (patch)
tree7addcaa558bbbbb0edd0681535a735b64cbc7f0d /misc
parent61e32136bb806959b46c292564b7998f6aced3eb (diff)
downloadbcfg2-09d4793eed6e5e7b0e217059e1ecb6805bcf299c.tar.gz
bcfg2-09d4793eed6e5e7b0e217059e1ecb6805bcf299c.tar.bz2
bcfg2-09d4793eed6e5e7b0e217059e1ecb6805bcf299c.zip
misc/bcfg2.spec: reconcile: %prep and %build
Diffstat (limited to 'misc')
-rw-r--r--misc/bcfg2.spec23
1 files 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