-
Notifications
You must be signed in to change notification settings - Fork 10
/
ruby-libvirt.spec.in
50 lines (37 loc) · 1.29 KB
/
ruby-libvirt.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
%{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
Name: ruby-libvirt
Version: @VERSION@
Release: 1%{?dist}%{?extra_release}
Summary: Ruby bindings for libvirt
Group: Development/Languages
License: LGPLv2+
URL: https://ruby.libvirt.org/
Source0: https://download.libvirt.org/ruby/ruby-libvirt-@[email protected]
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ruby ruby-devel rubygem(rake)
BuildRequires: libvirt-devel >= 0.4.0
BuildRequires: rubygem-rdoc
Requires: ruby(abi) = 1.8
Provides: ruby(libvirt) = %{version}
%description
Ruby bindings for libvirt.
%prep
%setup -q
%build
export CFLAGS="$RPM_OPT_FLAGS"
rake build
%install
rm -rf %{buildroot}
install -d -m0755 %{buildroot}%{ruby_sitelib}
install -d -m0755 %{buildroot}%{ruby_sitearch}
install -p -m0644 lib/libvirt.rb %{buildroot}%{ruby_sitelib}
install -p -m0755 ext/libvirt/_libvirt.so %{buildroot}%{ruby_sitearch}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING NEWS.rst README.rst
%{ruby_sitelib}/libvirt.rb
%{ruby_sitearch}/_libvirt.so
%changelog