]> git.pld-linux.org Git - packages/fpm.git/blob - fpm.spec
cleanup backups after patching
[packages/fpm.git] / fpm.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 Summary:        fpm - package building and mangling
6 Name:           fpm
7 Version:        1.4.0
8 Release:        1
9 License:        MIT-like
10 Group:          Development/Languages
11 Source0:        http://rubygems.org/downloads/%{name}-%{version}.gem
12 # Source0-md5:  4d82b0484db150928330b04bb44c92a2
13 Patch0:         templates.patch
14 URL:            https://github.com/jordansissel/fpm
15 BuildRequires:  rpm-rubyprov
16 BuildRequires:  rpmbuild(macros) >= 1.665
17 BuildRequires:  sed >= 4.0
18 %if %{with tests}
19 BuildRequires:  ruby-insist < 0.1
20 BuildRequires:  ruby-insist >= 0.0.5
21 BuildRequires:  ruby-pry
22 BuildRequires:  ruby-rspec < 3.1
23 BuildRequires:  ruby-rspec >= 3.0.0
24 BuildRequires:  ruby-stud
25 %endif
26 Requires:       ruby-arr-pm < 0.1
27 Requires:       ruby-arr-pm >= 0.0.10
28 Requires:       ruby-backports >= 2.6.2
29 Requires:       ruby-cabin >= 0.6.0
30 Requires:       ruby-childprocess
31 Requires:       ruby-clamp < 1
32 Requires:       ruby-clamp >= 0.6
33 Requires:       ruby-ffi
34 Requires:       ruby-json >= 1.7.7
35 Suggests:       rpm-build
36 Obsoletes:      ruby-fpm <= 1.4.0-2
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
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}/%{name}
63 cp -p %{name}-%{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}/%{name}.rb
72 %{ruby_vendorlibdir}/%{name}
73 %{ruby_specdir}/%{name}-%{version}.gemspec
This page took 0.089326 seconds and 3 git commands to generate.