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