]>
Commit | Line | Data |
---|---|---|
df5364cd ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
df5364cd | 5 | Summary: fpm - package building and mangling |
73f35394 | 6 | Name: fpm |
a2e7f0b9 | 7 | Version: 1.4.0 |
73f35394 | 8 | Release: 1 |
a2e7f0b9 | 9 | License: MIT-like |
df5364cd | 10 | Group: Development/Languages |
73f35394 | 11 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem |
a2e7f0b9 | 12 | # Source0-md5: 4d82b0484db150928330b04bb44c92a2 |
1459f1e6 | 13 | Patch0: templates.patch |
df5364cd ER |
14 | URL: https://github.com/jordansissel/fpm |
15 | BuildRequires: rpm-rubyprov | |
cdc18754 | 16 | BuildRequires: rpmbuild(macros) >= 1.665 |
df5364cd ER |
17 | BuildRequires: sed >= 4.0 |
18 | %if %{with tests} | |
19 | BuildRequires: ruby-insist < 0.1 | |
20 | BuildRequires: ruby-insist >= 0.0.5 | |
df5364cd | 21 | BuildRequires: ruby-pry |
a2e7f0b9 ER |
22 | BuildRequires: ruby-rspec < 3.1 |
23 | BuildRequires: ruby-rspec >= 3.0.0 | |
b02e0e5b | 24 | BuildRequires: ruby-stud |
df5364cd ER |
25 | %endif |
26 | Requires: ruby-arr-pm < 0.1 | |
a2e7f0b9 | 27 | Requires: ruby-arr-pm >= 0.0.10 |
df5364cd ER |
28 | Requires: ruby-backports >= 2.6.2 |
29 | Requires: ruby-cabin >= 0.6.0 | |
30 | Requires: ruby-childprocess | |
b02e0e5b ER |
31 | Requires: ruby-clamp < 1 |
32 | Requires: ruby-clamp >= 0.6 | |
33 | Requires: ruby-ffi | |
df5364cd | 34 | Requires: ruby-json >= 1.7.7 |
ea9475af | 35 | Suggests: rpm-build |
73f35394 | 36 | Obsoletes: ruby-fpm <= 1.4.0-2 |
df5364cd ER |
37 | BuildArch: noarch |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | Convert directories, rpms, python eggs, rubygems, and more to rpms, | |
42 | debs, solaris packages and more. Win at package management without | |
43 | wasting pointless hours debugging bad rpm specs! | |
44 | ||
df5364cd | 45 | %prep |
73f35394 | 46 | %setup -q |
1459f1e6 | 47 | %patch0 -p1 |
df5364cd ER |
48 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
49 | ||
44e2d7b0 ER |
50 | # cleanup backups after patching |
51 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
52 | ||
cdc18754 | 53 | %build |
a2e7f0b9 | 54 | # write .gemspec |
cdc18754 ER |
55 | %__gem_helper spec |
56 | ||
df5364cd ER |
57 | %install |
58 | rm -rf $RPM_BUILD_ROOT | |
cdc18754 | 59 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}} |
df5364cd ER |
60 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
61 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
73f35394 ER |
62 | cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name} |
63 | cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
df5364cd ER |
64 | |
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %attr(755,root,root) %{_bindir}/fpm | |
73f35394 ER |
71 | %{ruby_vendorlibdir}/%{name}.rb |
72 | %{ruby_vendorlibdir}/%{name} | |
73 | %{ruby_specdir}/%{name}-%{version}.gemspec |