]> git.pld-linux.org Git - packages/fpm.git/blob - fpm.spec
add filesystem list from fpm-1.4.0
[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:        https://github.com/jordansissel/fpm/archive/v%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5:  1aae7b53d0e6470183222a7634b7d799
13 Patch0:         templates.patch
14 Patch1:         tmppath.patch
15 Patch2:         config-attrs.patch
16 Patch3:         pld-init.d-dir.patch
17 URL:            https://github.com/jordansissel/fpm
18 BuildRequires:  rpm-rubyprov
19 BuildRequires:  rpmbuild(macros) >= 1.665
20 BuildRequires:  sed >= 4.0
21 %if %{with tests}
22 BuildRequires:  ruby-insist >= 0.0.6
23 BuildRequires:  ruby-pry
24 BuildRequires:  ruby-rspec < 3.1
25 BuildRequires:  ruby-rspec >= 3.0.0
26 BuildRequires:  ruby-stud
27 %endif
28 Requires:       ruby-arr-pm < 0.1
29 Requires:       ruby-arr-pm >= 0.0.10
30 Requires:       ruby-backports >= 2.6.2
31 Requires:       ruby-cabin >= 0.6.0
32 Requires:       ruby-childprocess
33 Requires:       ruby-clamp < 1
34 Requires:       ruby-clamp >= 0.6
35 Requires:       ruby-ffi
36 Requires:       ruby-json >= 1.7.7
37 Suggests:       rpm-build
38 Obsoletes:      ruby-fpm <= 1.4.0-2
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Convert directories, rpms, python eggs, rubygems, and more to rpms,
44 debs, solaris packages and more. Win at package management without
45 wasting pointless hours debugging bad rpm specs!
46
47 %prep
48 %setup -q
49 %patch0 -p1
50 %patch1 -p1
51 %patch2 -p1
52 %patch3 -p1
53 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
54
55 # cleanup backups after patching
56 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
57
58 mv templates/rpm/filesystem_list .
59
60 %build
61 # replace filesystem_list with pld version
62 pkgs="filesystem FHS"
63 cat <<EOF> templates/rpm/filesystem_list
64 # List of directories from filesystem package
65 # $ rpm -ql $pkgs | LC_ALL=C sort
66 EOF
67 rpm -ql $pkgs | LC_ALL=C sort >> templates/rpm/filesystem_list
68
69 # make gemspec self-contained
70 ruby -r rubygems -e 'spec = eval(File.read("%{name}.gemspec"))
71         File.open("%{name}-%{version}.gemspec", "w") do |file|
72         file.puts spec.to_ruby_for_cache
73 end'
74
75 %if %{with tests}
76 rspec
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
82 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
83 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
84 cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name}
85 cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %files
91 %defattr(644,root,root,755)
92 %attr(755,root,root) %{_bindir}/fpm
93 %{ruby_vendorlibdir}/%{name}.rb
94 %{ruby_vendorlibdir}/%{name}
95 %{ruby_specdir}/%{name}-%{version}.gemspec
This page took 0.084215 seconds and 3 git commands to generate.