]> git.pld-linux.org Git - SPECS.git/blob - ruby-di-ruby-lvm-attrib.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / ruby-di-ruby-lvm-attrib.spec
1 %define pkgname di-ruby-lvm-attrib
2 Summary:        A list of attributes for LVM objects
3 Name:           ruby-%{pkgname}
4 Version:        0.0.27
5 Release:        3
6 License:        GPL v2+ or Ruby
7 Group:          Development/Languages
8 Source0:        http://rubygems.org/downloads/%{pkgname}-%{version}.gem
9 # Source0-md5:  fa1a4db8d5eac9ef7e82b8c03b90eaf1
10 Patch0:         lvmv2.02.166.patch
11 Patch1:         lvmv2.02.170.patch
12 URL:            https://github.com/gregsymons/di-ruby-lvm-attrib
13 BuildRequires:  device-mapper-devel
14 BuildRequires:  rpm-rubyprov
15 BuildRequires:  rpmbuild(macros) >= 1.656
16 BuildRequires:  sed >= 4.0
17 # requires specific lvm2 version, because attributes need to be generated for each version
18 # https://github.com/gregsymons/di-ruby-lvm-attrib#adding-attributes
19 %requires_eq_to lvm2 device-mapper-devel
20 BuildArch:      noarch
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 A list of attributes for LVM objects.
25
26 %prep
27 %setup -q -n %{pkgname}-%{version}
28 %patch0 -p1
29 %patch1 -p1
30
31 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
32
33 # as we have strict dep on lvm2 package, we do not need other versions
34 install -d extra-attributes
35 mv lib/lvm/attributes/* extra-attributes
36 ver=$(rpm -q --qf '%{V}' device-mapper-devel)
37 mv extra-attributes/$ver* lib/lvm/attributes
38
39 %build
40 # write .gemspec
41 %__gem_helper spec
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
46 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
47 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %files
53 %defattr(644,root,root,755)
54 %dir %{ruby_vendorlibdir}/lvm
55 %{ruby_vendorlibdir}/lvm/attributes.rb
56 %{ruby_vendorlibdir}/lvm/attributes
57 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.471765 seconds and 3 git commands to generate.