]>
Commit | Line | Data |
---|---|---|
df5364cd ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
5 | %define pkgname fpm | |
6 | Summary: fpm - package building and mangling | |
7 | Name: ruby-%{pkgname} | |
a2e7f0b9 | 8 | Version: 1.4.0 |
4b357396 | 9 | Release: 2 |
a2e7f0b9 | 10 | License: MIT-like |
df5364cd ER |
11 | Group: Development/Languages |
12 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem | |
a2e7f0b9 | 13 | # Source0-md5: 4d82b0484db150928330b04bb44c92a2 |
1459f1e6 | 14 | Patch0: templates.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 |
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 ER |
45 | %prep |
46 | %setup -q -n %{pkgname}-%{version} | |
1459f1e6 | 47 | %patch0 -p1 |
df5364cd ER |
48 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* |
49 | ||
cdc18754 | 50 | %build |
a2e7f0b9 | 51 | # write .gemspec |
cdc18754 ER |
52 | %__gem_helper spec |
53 | ||
df5364cd ER |
54 | %install |
55 | rm -rf $RPM_BUILD_ROOT | |
cdc18754 | 56 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}} |
df5364cd ER |
57 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} |
58 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
1459f1e6 | 59 | cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{pkgname} |
cdc18754 | 60 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} |
df5364cd ER |
61 | |
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %attr(755,root,root) %{_bindir}/fpm | |
68 | %{ruby_vendorlibdir}/%{pkgname}.rb | |
69 | %{ruby_vendorlibdir}/%{pkgname} | |
cdc18754 | 70 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |