]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
drop unneccessary pinned deps from .gem
[packages/chef.git] / chef.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 Summary:        A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
6 Name:           chef
7 Version:        11.8.2
8 Release:        0.14
9 License:        Apache v2.0
10 Group:          Development/Languages
11 Source0:        http://rubygems.org/downloads/%{name}-%{version}.gem
12 # Source0-md5:  7d3c2e8b98ec8df050d92686f1429d8f
13 Source1:        %{name}.rb
14 Source2:        %{name}.tmpfiles
15 Patch0:         platform-pld.patch
16 Patch1:         FHS.patch
17 Patch2:         https://github.com/glensc/chef/compare/poldek.patch
18 # Patch2-md5:   5a0fc35de33910b41cba4e87dcb4bf9a
19 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
20 # Patch3-md5:   bfc884469fad7b5aa46341402be5fccd
21 URL:            http://wiki.opscode.com/display/chef
22 BuildRequires:  rpm-rubyprov
23 BuildRequires:  rpmbuild(macros) >= 1.656
24 BuildRequires:  sed >= 4.0
25 %if %{with tests}
26 BuildRequires:  ruby-abstract
27 BuildRequires:  ruby-mixlib-authentication >= 1.3.0
28 BuildRequires:  ruby-net-ssh-multi >= 1.1.0
29 BuildRequires:  ruby-rack
30 BuildRequires:  ruby-rake
31 #BuildRequires: ruby-rdoc
32 BuildRequires:  ruby-rest-client >= 1.0.4
33 BuildRequires:  ruby-rspec-core < 2.14
34 BuildRequires:  ruby-rspec-core >= 2.13.0
35 BuildRequires:  ruby-rspec-expectations < 2.14
36 BuildRequires:  ruby-rspec-expectations >= 2.13.0
37 BuildRequires:  ruby-rspec-mocks < 2.14
38 BuildRequires:  ruby-rspec-mocks >= 2.13.0
39 #BuildRequires: ruby-rspec_junit_formatter
40 #BuildRequires: ruby-sdoc
41 %endif
42 Requires:       lsb-release
43 Requires:       poldek >= 0.30
44 Requires:       ruby >= 1:1.9.3.429-4
45 Requires:       ruby-diff-lcs < 2
46 Requires:       ruby-diff-lcs >= 1.2
47 Requires:       ruby-diff-lcs >= 1.2.4
48 Requires:       ruby-erubis
49 Requires:       ruby-highline >= 1.6.9
50 Requires:       ruby-json >= 1.4.4
51 Requires:       ruby-mime-types < 2
52 Requires:       ruby-mime-types >= 1.16
53 Requires:       ruby-mixlib-authentication >= 1.3.0
54 Requires:       ruby-mixlib-cli >= 1.3.0
55 Requires:       ruby-mixlib-config < 3
56 Requires:       ruby-mixlib-config >= 2.0
57 Requires:       ruby-mixlib-log >= 1.3.0
58 Requires:       ruby-mixlib-shellout >= 1.2
59 Requires:       ruby-net-ssh >= 2.6
60 Requires:       ruby-net-ssh-multi >= 1.1.0
61 Requires:       ruby-ohai < 7
62 Requires:       ruby-ohai >= 6.0
63 Requires:       ruby-rest-client >= 1.0.4
64 Requires:       ruby-rubygems
65 Requires:       ruby-yajl >= 1.1
66 Suggests:       chef-zero >= 1.6.2
67 BuildArch:      noarch
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 # do not generate python dependency, yum support is optional
71 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
72
73 %description
74 A systems integration framework, built to bring the benefits of
75 configuration management to your entire infrastructure.
76
77 %package -n knife
78 Summary:        knife - Chef Server API client utility
79 Group:          Development/Languages
80 Requires:       %{name} = %{version}-%{release}
81
82 %description -n knife
83 Knife is a command-line utility used to manage data on a Chef server
84 through the HTTP(S) API. Knife is organized into groups of subcommands
85 centered around the various object types in Chef. Each category of
86 subcommand is documented in its own manual page.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %patch1 -p1
92 %patch2 -p1
93 %patch3 -p1
94
95 grep --exclude-dir=spec --exclude-dir=distro -r /var/chef . && exit 1
96
97 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
98
99 %build
100 %if %{with tests}
101 rspec spec
102 %endif
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir},%{_mandir}/man1,%{systemdtmpfilesdir}} \
107         $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments}}}
108
109 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
110 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
111 cp -a distro/common/man/* $RPM_BUILD_ROOT%{_mandir}
112 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/README.md
113
114 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/chef.rb
115 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %doc README.md CONTRIBUTING.md
123 %dir %{_sysconfdir}/%{name}
124 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/chef.rb
125 %attr(755,root,root) %{_bindir}/chef-apply
126 %attr(755,root,root) %{_bindir}/chef-client
127 %attr(755,root,root) %{_bindir}/chef-service-manager
128 %attr(755,root,root) %{_bindir}/chef-shell
129 %attr(755,root,root) %{_bindir}/chef-solo
130 %attr(755,root,root) %{_bindir}/shef
131 %{_mandir}/man1/chef-shell.1*
132 %{_mandir}/man8/chef-client.8*
133 %{_mandir}/man8/chef-solo.8*
134 %{ruby_vendorlibdir}/chef.rb
135 %{ruby_vendorlibdir}/chef
136 %exclude %{ruby_vendorlibdir}/chef/knife
137 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
138 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
139 %exclude %{ruby_vendorlibdir}/chef/knife.rb
140 %{systemdtmpfilesdir}/chef.conf
141
142 %dir /var/lib/%{name}
143 %dir /var/lib/%{name}/roles
144 %dir /var/lib/%{name}/data_bags
145 %dir /var/lib/%{name}/environments
146
147 %dir /var/cache/%{name}
148 %dir /var/run/%{name}
149
150 %files -n knife
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_bindir}/knife
153 %{ruby_vendorlibdir}/chef/knife.rb
154 %{ruby_vendorlibdir}/chef/knife
155 %{ruby_vendorlibdir}/chef/application/knife.rb
156 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
157 %{_mandir}/man1/knife-bootstrap.1*
158 %{_mandir}/man1/knife-client.1*
159 %{_mandir}/man1/knife-configure.1*
160 %{_mandir}/man1/knife-cookbook-site.1*
161 %{_mandir}/man1/knife-cookbook.1*
162 %{_mandir}/man1/knife-data-bag.1*
163 %{_mandir}/man1/knife-delete.1*
164 %{_mandir}/man1/knife-deps.1*
165 %{_mandir}/man1/knife-diff.1*
166 %{_mandir}/man1/knife-download.1*
167 %{_mandir}/man1/knife-edit.1*
168 %{_mandir}/man1/knife-environment.1*
169 %{_mandir}/man1/knife-exec.1*
170 %{_mandir}/man1/knife-index-rebuild.1*
171 %{_mandir}/man1/knife-list.1*
172 %{_mandir}/man1/knife-node.1*
173 %{_mandir}/man1/knife-raw.1*
174 %{_mandir}/man1/knife-recipe-list.1*
175 %{_mandir}/man1/knife-role.1*
176 %{_mandir}/man1/knife-search.1*
177 %{_mandir}/man1/knife-show.1*
178 %{_mandir}/man1/knife-ssh.1*
179 %{_mandir}/man1/knife-status.1*
180 %{_mandir}/man1/knife-tag.1*
181 %{_mandir}/man1/knife-upload.1*
182 %{_mandir}/man1/knife-user.1*
183 %{_mandir}/man1/knife-xargs.1*
184 %{_mandir}/man1/knife.1*
This page took 0.065937 seconds and 4 git commands to generate.