]> git.pld-linux.org Git - packages/chef.git/blob - chef.spec
update plist patch
[packages/chef.git] / chef.spec
1 # NOTE:
2 # - check releases here: https://downloads.chef.io/chef-client/debian/
3 #   the versions tagged in github are somewhat newer, perhaps dev-releases
4
5 # Conditional build:
6 %bcond_with     tests           # build without tests
7
8 Summary:        A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure
9 Name:           chef
10 Version:        14.1.36
11 Release:        0.3
12 License:        Apache v2.0
13 Group:          Networking/Admin
14 Source0:        https://github.com/chef/chef/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  442169a1a824b3335376a88723e133a0
16 Source2:        %{name}.tmpfiles
17 Source3:        https://raw.github.com/stevendanna/knife-hacks/master/shell/knife_completion.sh
18 # Source3-md5:  a4c1e41370be8088a59ddb3b2e7ea397
19 Patch0:         platform-pld.patch
20 Patch1:         FHS.patch
21 Patch2:         poldek.patch
22 Patch3:         https://github.com/glensc/chef/compare/pld-knife-boostrap.patch
23 # Patch3-md5:   8ff0fdfde6dc90018698775bf8f13062
24 Patch4:         optional-plist.patch
25 Patch5:         gemdeps.patch
26 URL:            https://wiki.opscode.com/display/chef/
27 BuildRequires:  rpm-rubyprov
28 BuildRequires:  rpmbuild(macros) >= 1.673
29 BuildRequires:  sed >= 4.0
30 %if %{with tests}
31 BuildRequires:  ruby-rack
32 BuildRequires:  ruby-rake
33 BuildRequires:  ruby-rspec-core < 2.15
34 BuildRequires:  ruby-rspec-core >= 2.14.0
35 BuildRequires:  ruby-rspec-expectations < 2.15
36 BuildRequires:  ruby-rspec-expectations >= 2.14.0
37 BuildRequires:  ruby-rspec-mocks < 2.15
38 BuildRequires:  ruby-rspec-mocks >= 2.14.0
39 BuildRequires:  ruby-rspec_junit_formatter
40 %endif
41 Requires:       lsb-release
42 Requires:       poldek >= 0.30
43 Requires:       ruby >= 1:1.9.3.429-4
44 Requires:       ruby-chef-config = %{version}-%{release}
45 Requires:       ruby-erubis >= 2.7.0-3
46 Requires:       ruby-json
47 Requires:       ruby-mime-types < 2
48 Requires:       ruby-mime-types >= 1.16
49 Requires:       ruby-mixlib-config < 3
50 Requires:       ruby-mixlib-config >= 2.0
51 Requires:       ruby-rest-client >= 1.0.4
52 Requires:       ruby-rubygems
53 Suggests:       chef-zero >= 2.1.4
54 Suggests:       ruby-plist >= 3.1.0
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 # do not generate python dependency, yum support is optional
59 %define         _noautoreqfiles %{ruby_vendorlibdir}/chef/provider/package/yum-dump.py
60
61 %description
62 A systems integration framework, built to bring the benefits of
63 configuration management to your entire infrastructure.
64
65 %package -n ruby-chef-config
66 Summary:        Chef's default configuration and config loading
67 Group:          Development/Languages
68
69 %description -n ruby-chef-config
70 Chef's default configuration and config loading.
71
72 %package -n bash-completion-knife
73 Summary:        bash-completion for knife
74 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla knifea
75 Group:          Applications/Shells
76 Requires:       %{name} >= 0.10
77 Requires:       bash-completion >= 2.0
78
79 %description -n bash-completion-knife
80 This package provides bash-completion for knife.
81
82 %description -n bash-completion-knife -l pl.UTF-8
83 Pakiet ten dostarcza bashowe uzupełnianie nazw dla knifea.
84
85 %package -n knife
86 Summary:        knife - Chef Server API client utility
87 Group:          Networking/Admin
88 Requires:       %{name} = %{version}-%{release}
89
90 %description -n knife
91 Knife is a command-line utility used to manage data on a Chef server
92 through the HTTP(S) API. Knife is organized into groups of subcommands
93 centered around the various object types in Chef. Each category of
94 subcommand is documented in its own manual page.
95
96 %prep
97 %setup -q
98 #%patch0 -p1 # UPDATE
99 %patch1 -p1
100 %patch2 -p1
101 %patch3 -p1
102 %patch4 -p1
103 %patch5 -p1
104
105 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
106
107 %ifos linux
108 # those do not match s.executables from .gemspec
109 rm bin/chef-service-manager
110 rm bin/chef-windows-service
111 %endif
112
113 # don't package this, a maintainer's rake task
114 rm chef-config/lib/chef-config/package_task.rb
115
116 # cleanup backups after patching
117 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
118
119 grep --exclude-dir=spec --exclude-dir=distro --exclude=CHANGELOG.md -r /var/chef . && exit 1
120
121 %build
122 # make gemspec self-contained
123 %__gem_helper spec-dump %{name}.gemspec
124
125 %if %{with tests}
126 rspec spec
127 %endif
128
129 cd chef-config
130 # make gemspec self-contained
131 %__gem_helper spec-dump %{name}-config.gemspec
132
133 %install
134 rm -rf $RPM_BUILD_ROOT
135 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir},%{systemdtmpfilesdir}} \
136         $RPM_BUILD_ROOT%{ruby_vendorlibdir}/chef/reporting \
137         $RPM_BUILD_ROOT%{ruby_specdir} \
138         $RPM_BUILD_ROOT/var/{run/%{name},cache/%{name},lib/%{name}/{roles,data_bags,environments,reports,backup}}
139
140 # chef
141 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
142 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
143 cp -p chef-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
144
145 # chef-config
146 cp -a chef-config/lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
147 cp -p chef-config/chef-config-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
148
149 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
150
151 install -d $RPM_BUILD_ROOT%{bash_compdir}
152 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{bash_compdir}/knife
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %files
158 %defattr(644,root,root,755)
159 %doc README.md CONTRIBUTING.md
160 %dir %{_sysconfdir}/%{name}
161 %attr(755,root,root) %{_bindir}/chef-apply
162 %attr(755,root,root) %{_bindir}/chef-client
163 %attr(755,root,root) %{_bindir}/chef-resource-inspector
164 %attr(755,root,root) %{_bindir}/chef-shell
165 %attr(755,root,root) %{_bindir}/chef-solo
166 %{ruby_vendorlibdir}/chef.rb
167 %{ruby_vendorlibdir}/chef
168 %{ruby_specdir}/chef-%{version}.gemspec
169 %exclude %{ruby_vendorlibdir}/chef/knife
170 %exclude %{ruby_vendorlibdir}/chef/application/knife.rb
171 %exclude %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
172 %exclude %{ruby_vendorlibdir}/chef/knife.rb
173 %{systemdtmpfilesdir}/chef.conf
174
175 %dir /var/lib/%{name}
176 %dir /var/lib/%{name}/roles
177 %dir /var/lib/%{name}/data_bags
178 %dir /var/lib/%{name}/environments
179 %dir /var/lib/%{name}/reports
180 %dir %attr(750,root,root) /var/lib/%{name}/backup
181
182 %dir /var/cache/%{name}
183 %dir /var/run/%{name}
184
185 %files -n ruby-chef-config
186 %defattr(644,root,root,755)
187 %{ruby_vendorlibdir}/chef-config.rb
188 %{ruby_vendorlibdir}/chef-config
189 %{ruby_specdir}/chef-config-%{version}.gemspec
190
191 %files -n knife
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_bindir}/knife
194 %{ruby_vendorlibdir}/chef/knife.rb
195 %{ruby_vendorlibdir}/chef/knife
196 %{ruby_vendorlibdir}/chef/application/knife.rb
197 %{ruby_vendorlibdir}/chef/chef_fs/knife.rb
198
199 %files -n bash-completion-knife
200 %defattr(644,root,root,755)
201 %{bash_compdir}/knife
This page took 0.071476 seconds and 3 git commands to generate.