diff options
Diffstat (limited to 'misc/bcfg2.spec')
-rw-r--r-- | misc/bcfg2.spec | 115 |
1 files changed, 59 insertions, 56 deletions
diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index 2899b4c36..832f6b569 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -1,4 +1,4 @@ -%define release 0.1 +%define release 0.2 %define __python python %{!?py_ver: %define py_ver %(%{__python} -c 'import sys;print(sys.version[0:3])')} %define pythonversion %{py_ver} @@ -90,7 +90,7 @@ deployment strategies. This package includes the Bcfg2 client software. -%package -n bcfg2-server +%package server Version: 1.2.2 Summary: Bcfg2 Server %if 0%{?suse_version} @@ -106,9 +106,11 @@ Requires: python-lxml >= 1.2.1 %if "%{_vendor}" == "redhat" Requires: gamin-python %endif +Requires: /usr/sbin/sendmail +Requires: /usr/bin/openssl Requires: python-nose -%description -n bcfg2-server +%description server Bcfg2 helps system administrators produce a consistent, reproducible, and verifiable description of their environment, and offers visualization and reporting tools to aid in day-to-day administrative @@ -136,7 +138,7 @@ deployment strategies. This package includes the Bcfg2 server software. -%package -n bcfg2-doc +%package doc Summary: Configuration management system documentation %if 0%{?suse_version} Group: Documentation/HTML @@ -144,7 +146,7 @@ Group: Documentation/HTML Group: Documentation %endif -%description -n bcfg2-doc +%description doc Bcfg2 helps system administrators produce a consistent, reproducible, and verifiable description of their environment, and offers visualization and reporting tools to aid in day-to-day administrative @@ -172,7 +174,7 @@ deployment strategies. This package includes the Bcfg2 documentation. -%package -n bcfg2-web +%package web Version: 1.2.2 Summary: Bcfg2 Web Reporting Interface %if 0%{?suse_version} @@ -190,7 +192,7 @@ Requires: apache2-mod_wsgi %define apache_conf %{_sysconfdir}/apache2 %endif -%description -n bcfg2-web +%description web Bcfg2 helps system administrators produce a consistent, reproducible, and verifiable description of their environment, and offers visualization and reporting tools to aid in day-to-day administrative @@ -219,7 +221,7 @@ deployment strategies. This package includes the Bcfg2 reports web frontend. %prep -%setup -q -n bcfg2-%{version} +%setup -q -n %{name}-%{version} %build %{__python}%{pythonversion} setup.py build @@ -229,6 +231,7 @@ This package includes the Bcfg2 reports web frontend. %{__python}%{pythonversion} setup.py build_sphinx %install +rm -rf %{buildroot} %{__python}%{pythonversion} setup.py install --root=%{buildroot} --record=INSTALLED_FILES --prefix=/usr %{__install} -d %{buildroot}%{_bindir} %{__install} -d %{buildroot}%{_sbindir} @@ -242,7 +245,7 @@ mkdir -p %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version} %{__install} -d %{buildroot}/var/adm/fillup-templates %endif -%{__mv} %{buildroot}/usr/bin/bcfg2* %{buildroot}%{_sbindir} +%{__mv} %{buildroot}%{_bindir}/bcfg2* %{buildroot}%{_sbindir} %{__install} -m 755 debian/bcfg2.init %{buildroot}%{_initrddir}/bcfg2 %{__install} -m 755 debian/bcfg2-server.init %{buildroot}%{_initrddir}/bcfg2-server %{__install} -m 755 debian/bcfg2.default %{buildroot}%{_sysconfdir}/default/bcfg2 @@ -257,8 +260,8 @@ ln -s %{_initrddir}/bcfg2 %{buildroot}%{_sbindir}/rcbcfg2 ln -s %{_initrddir}/bcfg2-server %{buildroot}%{_sbindir}/rcbcfg2-server %endif -mv build/sphinx/html/* %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version} -mv build/dtd %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version}/ +cp -r build/sphinx/html/* %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version} +cp -r build/dtd %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version}/ %{__install} -d %{buildroot}%{apache_conf}/conf.d %{__install} -m 644 misc/apache/bcfg2.conf %{buildroot}%{apache_conf}/conf.d/wsgi_bcfg2.conf @@ -272,7 +275,7 @@ touch %{buildroot}%{_sysconfdir}/bcfg2.conf %{buildroot}%{_sysconfdir}/bcfg2-web %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} || exit 2 -%files -n bcfg2 +%files %defattr(-,root,root,-) %{_sbindir}/bcfg2 %dir %{python_sitelib}/Bcfg2 @@ -293,47 +296,7 @@ touch %{buildroot}%{_sysconfdir}/bcfg2.conf %{buildroot}%{_sysconfdir}/bcfg2-web %endif %ghost %config(noreplace,missingok) %attr(0600,root,root) %{_sysconfdir}/bcfg2.conf -%post -n bcfg2-server -# enable daemon on first install only (not on update). -if [ $1 -eq 1 ]; then -%if 0%{?suse_version} - %fillup_and_insserv -f bcfg2-server -%else - /sbin/chkconfig --add bcfg2-server -%endif -fi - -%preun -n bcfg2 -%if 0%{?suse_version} -# stop on removal (not on update). -if [ $1 -eq 0 ]; then - %stop_on_removal bcfg2 -fi -%endif - -%preun -n bcfg2-server -%if 0%{?suse_version} -if [ $1 -eq 0 ]; then - %stop_on_removal bcfg2-server -fi -%endif - -%postun -n bcfg2 -%if 0%{?suse_version} -if [ $1 -eq 0 ]; then - %insserv_cleanup -fi -%endif - -%postun -n bcfg2-server -%if 0%{?suse_version} -if [ $1 -eq 0 ]; then - # clean up on removal. - %insserv_cleanup -fi -%endif - -%files -n bcfg2-server +%files server %defattr(-,root,root,-) %{_initrddir}/bcfg2-server %dir %{python_sitelib}/Bcfg2 @@ -368,11 +331,11 @@ fi %dir %{_prefix}/lib/bcfg2 %ghost %config(noreplace,missingok) %attr(0600,root,root) %{_sysconfdir}/bcfg2.conf -%files -n bcfg2-doc +%files doc %defattr(-,root,root,-) %doc %{_defaultdocdir}/bcfg2-doc-%{version} -%files -n bcfg2-web +%files web %defattr(-,root,root,-) %{_datadir}/bcfg2/reports.wsgi %{_datadir}/bcfg2/site_media @@ -381,6 +344,46 @@ fi %config(noreplace) %{apache_conf}/conf.d/wsgi_bcfg2.conf %ghost %config(noreplace,missingok) %attr(0640,root,apache) %{_sysconfdir}/bcfg2-web.conf +%post server +# enable daemon on first install only (not on update). +if [ $1 -eq 1 ]; then +%if 0%{?suse_version} + %fillup_and_insserv -f bcfg2-server +%else + /sbin/chkconfig --add bcfg2-server +%endif +fi + +%preun +%if 0%{?suse_version} +# stop on removal (not on update). +if [ $1 -eq 0 ]; then + %stop_on_removal bcfg2 +fi +%endif + +%preun server +%if 0%{?suse_version} +if [ $1 -eq 0 ]; then + %stop_on_removal bcfg2-server +fi +%endif + +%postun +%if 0%{?suse_version} +if [ $1 -eq 0 ]; then + %insserv_cleanup +fi +%endif + +%postun server +%if 0%{?suse_version} +if [ $1 -eq 0 ]; then + # clean up on removal. + %insserv_cleanup +fi +%endif + %changelog * Sat Feb 18 2012 Christopher 'm4z' Holm <686f6c6d@googlemail.com> 1.2.1 - Added Fedora and Mandriva compatibilty (for Open Build Service). @@ -394,7 +397,7 @@ fi - Added -doc sub-package * Mon Jun 21 2010 Fabian Affolter <fabian@bernewireless.net> - 1.1.0rc3-0.1 -- Changed source0 in order that it works with spectool +- Changed source0 in order that it works with spectool * Fri Feb 2 2007 Mike Brady <mike.brady@devnull.net.nz> 0.9.1 - Removed use of _libdir due to Red Hat x86_64 issue. |