From a58895db0f037bf3a28e33e950a3cfc3d22f45ff Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 15 Nov 2010 17:05:31 -0600 Subject: redhat: Sync some upstream changes for the spec file Signed-off-by: Sol Jerome --- redhat/bcfg2.spec.in | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'redhat') diff --git a/redhat/bcfg2.spec.in b/redhat/bcfg2.spec.in index 40f2d6df2..9378e9267 100644 --- a/redhat/bcfg2.spec.in +++ b/redhat/bcfg2.spec.in @@ -1,4 +1,6 @@ -# This file is licensed under the GPL +%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%endif Name: @PACKAGE@ Version: @VERSION@ @@ -7,23 +9,15 @@ Release: @RELEASE@ %define __python python %{!?py_ver: %define py_ver %(%{__python} -c 'import sys;print(sys.version[0:3])')} %define pythonversion %{py_ver} -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?_initrddir: %define _initrddir %{_sysconfdir}/rc.d/init.d} -# Most rpm-based distributions include the lxml package a 'python-lxml', -# but some distributions and some people who roll their own lxml packages -# call it just 'lxml'. We'll try to catch both. -%define dfl_lxml python-lxml -%define alt_lxml lxml -%define lxmldep %(rpm -q %{alt_lxml} 2>&1 > /dev/null && echo %{alt_lxml} || echo %{dfl_lxml}) - Summary: Configuration management system + Group: Applications/System License: BSD URL: http://trac.mcs.anl.gov/projects/bcfg2 Source0: %{name}-%{version}-%{release}.tar.gz -BuildRoot: %{_builddir}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if 0%{?fedora} >= 8 @@ -35,7 +29,7 @@ BuildRequires: python-setuptools %if "%{py_ver}" == "2.4" Requires: python-elementtree %else if "%{py_ver}" < "2.5" -Requires: %{lxmldep} >= 0.9 +Requires: python-lxml %endif Requires: initscripts Requires(post): /sbin/chkconfig @@ -43,7 +37,6 @@ Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service - %description Bcfg2 helps system administrators produce a consistent, reproducible, and verifiable description of their environment, and offers @@ -77,7 +70,7 @@ Requires: bcfg2 = %{version}-%{release} %if "%{py_ver}" < "2.6" Requires: python-ssl %endif -Requires: %{lxmldep} >= 0.9 +Requires: python-lxml >= 0.9 Requires: /usr/bin/openssl Requires: gamin-python Requires(post): /sbin/chkconfig @@ -93,6 +86,7 @@ Configuration management server # fixup some paths %{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' debian/bcfg2.init +%{__perl} -pi -e 's@/etc/default@%{_sysconfdir}/sysconfig@g' debian/bcfg2-server.init %{__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 @@ -111,10 +105,9 @@ done %build %{__python} -c 'import setuptools; execfile("setup.py")' build - %install rm -rf %{buildroot} -%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} --prefix=/usr +%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_initrddir} @@ -200,7 +193,6 @@ fi %dir %{_var}/cache/bcfg2 - %files server %defattr(-,root,root,-) @@ -220,11 +212,7 @@ fi %{_sbindir}/bcfg2-reports %{_sbindir}/bcfg2-server -%{_mandir}/man8/bcfg2-admin.8* -%{_mandir}/man8/bcfg2-build-reports.8* -%{_mandir}/man8/bcfg2-info.8* -%{_mandir}/man8/bcfg2-repo-validate.8* -%{_mandir}/man8/bcfg2-server.8* +%{_mandir}/man8/*.8* %dir %{_var}/lib/bcfg2 -- cgit v1.2.3-1-g7c22