]> git.pld-linux.org Git - packages/fpm.git/blob - ruby-fpm.spec
cleanup backups after patching
[packages/fpm.git] / ruby-fpm.spec
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}
8 Version:        1.4.0
9 Release:        2
10 License:        MIT-like
11 Group:          Development/Languages
12 Source0:        http://rubygems.org/downloads/%{pkgname}-%{version}.gem
13 # Source0-md5:  4d82b0484db150928330b04bb44c92a2
14 Patch0:         templates.patch
15 URL:            https://github.com/jordansissel/fpm
16 BuildRequires:  rpm-rubyprov
17 BuildRequires:  rpmbuild(macros) >= 1.665
18 BuildRequires:  sed >= 4.0
19 %if %{with tests}
20 BuildRequires:  ruby-insist < 0.1
21 BuildRequires:  ruby-insist >= 0.0.5
22 BuildRequires:  ruby-pry
23 BuildRequires:  ruby-rspec < 3.1
24 BuildRequires:  ruby-rspec >= 3.0.0
25 BuildRequires:  ruby-stud
26 %endif
27 Requires:       ruby-arr-pm < 0.1
28 Requires:       ruby-arr-pm >= 0.0.10
29 Requires:       ruby-backports >= 2.6.2
30 Requires:       ruby-cabin >= 0.6.0
31 Requires:       ruby-childprocess
32 Requires:       ruby-clamp < 1
33 Requires:       ruby-clamp >= 0.6
34 Requires:       ruby-ffi
35 Requires:       ruby-json >= 1.7.7
36 Suggests:       rpm-build
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
45 %prep
46 %setup -q -n %{pkgname}-%{version}
47 %patch0 -p1
48 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
49
50 # cleanup backups after patching
51 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
52
53 %build
54 # write .gemspec
55 %__gem_helper spec
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
60 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
61 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
62 cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{pkgname}
63 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
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
71 %{ruby_vendorlibdir}/%{pkgname}.rb
72 %{ruby_vendorlibdir}/%{pkgname}
73 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.09101 seconds and 3 git commands to generate.