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