LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File rubygem-chef-server-webui.spec of Package rubygem-chef-server-webui (Project home:nkrinner)

#
# spec file for package rubygem-chef-server-webui
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           rubygem-chef-server-webui
Version:        10.24.0
Release:        0
%define mod_name chef-server-webui
#
Group:          Development/Languages/Ruby

License:        Apache-2.0
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  rubygems_with_buildroot_patch

BuildRequires:  pwdutils
Requires:       pwdutils

BuildRequires: ruby(abi) >= 1.9
Requires:      ruby(abi) >= 1.9


#BuildRequires:  rubygem-rake
#Requires:       rubygem-rake

# coderay >= 0
BuildRequires:  rubygem-coderay >= 0
Requires:       rubygem-coderay >= 0

# eventmachine ~>0.12.0
BuildRequires: rubygem-eventmachine-0_12 >= 0.12.6
Requires:      rubygem-eventmachine-0_12 >= 0.12.6
BuildRequires: rubygem-eventmachine-0_12 <  0.13.0
Requires:      rubygem-eventmachine-0_12 <  0.13.0

# haml >= 0
BuildRequires:  rubygem-haml >= 0
Requires:       rubygem-haml >= 0

# merb-assets ~> 1.1.0
BuildRequires:  rubygem-merb-assets >= 1.1.0
Requires:       rubygem-merb-assets >= 1.1.0
BuildRequires:  rubygem-merb-assets <  1.2.0
Requires:       rubygem-merb-assets <  1.2.0

# merb-core ~> 1.1.0
BuildRequires:  rubygem-merb-core-1_1 >= 1.1.0
Requires:       rubygem-merb-core-1_1 >= 1.1.0
BuildRequires:  rubygem-merb-core-1_1 <  1.2.0
Requires:       rubygem-merb-core-1_1 <  1.2.0

# merb-haml ~> 1.1.0
BuildRequires:  rubygem-merb-haml >= 1.1.0
Requires:       rubygem-merb-haml >= 1.1.0
BuildRequires:  rubygem-merb-haml <  1.2.0
Requires:       rubygem-merb-haml <  1.2.0

# merb-helpers ~> 1.1.0
BuildRequires:  rubygem-merb-helpers >= 1.1.0
Requires:       rubygem-merb-helpers >= 1.1.0
BuildRequires:  rubygem-merb-helpers <  1.2.0
Requires:       rubygem-merb-helpers <  1.2.0

# merb-param-protection ~> 1.1.0
BuildRequires:  rubygem-merb-param-protection >= 1.1.0
Requires:       rubygem-merb-param-protection >= 1.1.0
BuildRequires:  rubygem-merb-param-protection <  1.2.0
Requires:       rubygem-merb-param-protection <  1.2.0

# ruby-openid >= 0
BuildRequires:  rubygem-ruby-openid >= 0
Requires:       rubygem-ruby-openid >= 0

# thin >= 0
BuildRequires:  rubygem-thin >= 0
Requires:       rubygem-thin >= 0

# BuildRequires:  rubygem-json >= 1.4.6
# Requires:       rubygem-json >= 1.4.6
#
Url:            http://wiki.opscode.com/display/chef
Source:         %{mod_name}-%{version}.gem
Source1:        chef-webui-example.rb
Source2:        chef-server-webui.init
#
Summary:        A systems integration framework

%description
A systems integration framework, built to bring the benefits of
configuration management to your entire infrastructure.



%package doc
License:        Apache-2.0
Summary:        RDoc documentation for chef-server-webui
Group:          Development/Languages/Ruby
Requires:       %{name} = %{version}

%description doc
Documentation generated at gem installation time. Usually in RDoc and
RI formats.



%prep

%build

%install
%gem_install %{S:0}
mkdir -p %{buildroot}/etc/chef
mkdir -p %{buildroot}/etc/init.d/
mkdir -p %{buildroot}/var/log/chef
mkdir -p %{buildroot}/var/lib/chef
mkdir -p %{buildroot}/var/cache/chef
mkdir -p %{buildroot}/var/run/chef
install -m 0640 %{S:1} %{buildroot}/etc/chef/webui.rb
install -m 0750 %{S:2} %{buildroot}%{_sysconfdir}/init.d/chef-server-webui
mkdir -p %{buildroot}%{_sbindir}
ln -s %{_sysconfdir}/init.d/chef-server-webui %{buildroot}%{_sbindir}/rcchef-server-webui

%clean
%{__rm} -rf %{buildroot}

%pre
getent group chef >/dev/null || groupadd -r chef
getent passwd chef >/dev/null || useradd -r -g chef -d %{_localstatedir}/lib/chef -s /sbin/nologin -c "Opscode Chef Daemon" chef
exit 0

%post
%fillup_and_insserv chef-server-webui

%preun
%stop_on_removal chef-server-webui

%postun
%restart_on_update chef-server-webui
%insserv_cleanup

%files
%defattr(-,root,root,-)
%config(noreplace) %attr(0640, root, chef) /etc/chef/webui.rb
%config %attr(0750, root, root) %{_sysconfdir}/init.d/chef-server-webui
%{_sbindir}/rcchef-server-webui
%{_bindir}/chef-server-webui
%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_name}-%{version}.gem
%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_name}-%{version}.gemspec
%dir %attr(0750, root, chef) %{_sysconfdir}/chef
%dir %attr(0750, chef, chef) %{_localstatedir}/log/chef
%dir %attr(0750, chef, chef) %{_localstatedir}/lib/chef
%dir %attr(0750, chef, chef) %{_localstatedir}/cache/chef
%ghost %dir %attr(0750, chef, chef) %{_localstatedir}/run/chef

%files doc
%defattr(-,root,root,-)
%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_name}-%{version}/

%changelog