3 %bcond_with tests # build without tests
5 Summary: fpm - package building and mangling
10 Group: Development/Languages
11 Source0: https://github.com/jordansissel/fpm/archive/v%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5: 1aae7b53d0e6470183222a7634b7d799
13 Source1: filesystem_list
14 Patch0: templates.patch
16 Patch2: config-attrs.patch
17 Patch3: pld-init.d-dir.patch
18 URL: https://github.com/jordansissel/fpm
19 BuildRequires: rpm-rubyprov
20 BuildRequires: rpmbuild(macros) >= 1.665
21 BuildRequires: sed >= 4.0
23 BuildRequires: ruby-insist >= 0.0.6
24 BuildRequires: ruby-pry
25 BuildRequires: ruby-rspec < 3.1
26 BuildRequires: ruby-rspec >= 3.0.0
27 BuildRequires: ruby-stud
29 Requires: ruby-arr-pm < 0.1
30 Requires: ruby-arr-pm >= 0.0.10
31 Requires: ruby-backports >= 2.6.2
32 Requires: ruby-cabin >= 0.6.0
33 Requires: ruby-childprocess
34 Requires: ruby-clamp < 1
35 Requires: ruby-clamp >= 0.6
37 Requires: ruby-json >= 1.7.7
39 Obsoletes: ruby-fpm <= 1.4.0-2
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 Convert directories, rpms, python eggs, rubygems, and more to rpms,
45 debs, solaris packages and more. Win at package management without
46 wasting pointless hours debugging bad rpm specs!
54 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
56 # replace filesystem_list with pld version
57 cp -p %{SOURCE1} templates/rpm/filesystem_list
59 # cleanup backups after patching
60 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
63 # make gemspec self-contained
64 ruby -r rubygems -e 'spec = eval(File.read("%{name}.gemspec"))
65 File.open("%{name}-%{version}.gemspec", "w") do |file|
66 file.puts spec.to_ruby_for_cache
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
76 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
77 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
78 cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name}
79 cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
82 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
86 %attr(755,root,root) %{_bindir}/fpm
87 %{ruby_vendorlibdir}/%{name}.rb
88 %{ruby_vendorlibdir}/%{name}
89 %{ruby_specdir}/%{name}-%{version}.gemspec