]> git.pld-linux.org Git - packages/fpm.git/blame - fpm.spec
add tmppath.patch
[packages/fpm.git] / fpm.spec
CommitLineData
df5364cd
ER
1#
2# Conditional build:
3%bcond_with tests # build without tests
4
df5364cd 5Summary: fpm - package building and mangling
73f35394 6Name: fpm
a2e7f0b9 7Version: 1.4.0
73f35394 8Release: 1
a2e7f0b9 9License: MIT-like
df5364cd 10Group: Development/Languages
beabb477
ER
11Source0: https://github.com/jordansissel/fpm/archive/v%{version}/%{name}-%{version}.tar.gz
12# Source0-md5: 1aae7b53d0e6470183222a7634b7d799
ded550f8 13Source1: filesystem_list
1459f1e6 14Patch0: templates.patch
18532f9c 15Patch1: tmppath.patch
c978479a 16Patch2: config-attrs.patch
94ae8157 17Patch3: pld-init.d-dir.patch
df5364cd
ER
18URL: https://github.com/jordansissel/fpm
19BuildRequires: rpm-rubyprov
cdc18754 20BuildRequires: rpmbuild(macros) >= 1.665
df5364cd
ER
21BuildRequires: sed >= 4.0
22%if %{with tests}
72329b5a 23BuildRequires: ruby-insist >= 0.0.6
df5364cd 24BuildRequires: ruby-pry
a2e7f0b9
ER
25BuildRequires: ruby-rspec < 3.1
26BuildRequires: ruby-rspec >= 3.0.0
b02e0e5b 27BuildRequires: ruby-stud
df5364cd
ER
28%endif
29Requires: ruby-arr-pm < 0.1
a2e7f0b9 30Requires: ruby-arr-pm >= 0.0.10
df5364cd
ER
31Requires: ruby-backports >= 2.6.2
32Requires: ruby-cabin >= 0.6.0
33Requires: ruby-childprocess
b02e0e5b
ER
34Requires: ruby-clamp < 1
35Requires: ruby-clamp >= 0.6
36Requires: ruby-ffi
df5364cd 37Requires: ruby-json >= 1.7.7
ea9475af 38Suggests: rpm-build
73f35394 39Obsoletes: ruby-fpm <= 1.4.0-2
df5364cd
ER
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44Convert directories, rpms, python eggs, rubygems, and more to rpms,
45debs, solaris packages and more. Win at package management without
46wasting pointless hours debugging bad rpm specs!
47
df5364cd 48%prep
73f35394 49%setup -q
1459f1e6 50%patch0 -p1
18532f9c 51%patch1 -p1
c978479a 52%patch2 -p1
94ae8157 53%patch3 -p1
df5364cd
ER
54%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
55
ded550f8
ER
56# replace filesystem_list with pld version
57cp -p %{SOURCE1} templates/rpm/filesystem_list
58
44e2d7b0
ER
59# cleanup backups after patching
60find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
61
cdc18754 62%build
beabb477
ER
63# make gemspec self-contained
64ruby -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
67end'
cdc18754 68
cb102ddc
ER
69%if %{with tests}
70rspec
71%endif
72
df5364cd
ER
73%install
74rm -rf $RPM_BUILD_ROOT
cdc18754 75install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
df5364cd
ER
76cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
77cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
73f35394
ER
78cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name}
79cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
df5364cd
ER
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%files
85%defattr(644,root,root,755)
86%attr(755,root,root) %{_bindir}/fpm
73f35394
ER
87%{ruby_vendorlibdir}/%{name}.rb
88%{ruby_vendorlibdir}/%{name}
89%{ruby_specdir}/%{name}-%{version}.gemspec
This page took 0.062687 seconds and 4 git commands to generate.