]> git.pld-linux.org Git - packages/ruby-rpm.git/blob - ruby-rpm.spec
87ec750a4e944995d08b562a4fd915bb5059aab0
[packages/ruby-rpm.git] / ruby-rpm.spec
1 %define pkgname rpm
2 Summary:        An interface to access RPM database for Ruby
3 Name:           ruby-%{pkgname}
4 Version:        1.3.1
5 Release:        7
6 License:        GPL v2
7 Group:          Development/Languages
8 Source0:        http://rubygems.org/downloads/ruby-rpm-%{version}.gem
9 # Source0-md5:  f62501746a7f13399c4d9dab917d0ee4
10 Patch0:         ruby-deprecated.patch
11 Patch1:         rpm5.patch
12 URL:            http://gitorious.org/ruby-rpm
13 BuildRequires:  rpm-devel
14 BuildRequires:  rpm-rubyprov
15 BuildRequires:  rpmbuild(macros) >= 1.656
16 BuildRequires:  ruby-devel >= 1.8.6
17 %if %{with tests}
18 BuildRequires:  ruby-rake-compiler >= 0.7
19 BuildRequires:  ruby-rdiscount >= 1.6
20 BuildRequires:  ruby-rdoc >= 3.9
21 %endif
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Provides bindings for accessing RPM packages and databases from Ruby.
26 It includes the low-level C API to talk to rpm as well as Ruby classes
27 to model the various objects that RPM deals with (such as packages,
28 dependencies, and files).
29
30 %prep
31 %setup -q -n %{pkgname}-%{version}
32 %patch0 -p1
33 %patch1 -p1
34
35 %build
36 cd ext/%{pkgname}
37 ruby extconf.rb
38 %{__make} V=1 \
39         CC="%{__cc}" \
40         cppflags=-I/usr/include/rpm \
41         LDFLAGS="%{rpmldflags}" \
42         CFLAGS="%{rpmcflags} -fPIC -D_GNU_SOURCE"
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_vendorarchdir}}
47 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
48 install -p ext/%{pkgname}/%{pkgname}.so $RPM_BUILD_ROOT%{ruby_vendorarchdir}
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %files
54 %defattr(644,root,root,755)
55 %doc README.rdoc CHANGELOG.rdoc
56 %{ruby_vendorlibdir}/rpm.rb
57 %{ruby_vendorlibdir}/rpm
58 %attr(755,root,root) %{ruby_vendorarchdir}/rpm.so
This page took 0.108736 seconds and 2 git commands to generate.