Bump to libzypp-bindings 0.7.4
[platform/upstream/libzypp-bindings.git] / libzypp-bindings.spec.cmake
1 #
2 # spec file for package libzypp-bindings
3 #
4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
16 #
17
18 # nodebuginfo
19
20 Name:           @PACKAGE@
21 Version:        @VERSION@
22 Release:        0
23 License:        GPL-2.0+
24 Summary:        Bindings for libzypp
25 Group:          Development/Sources
26 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
27 BuildRequires:  cmake
28 BuildRequires:  gcc-c++ >= 4.5
29 BuildRequires:  libzypp-devel >= 15.11.0
30 BuildRequires:  python-devel < 3
31 BuildRequires:  ruby-devel
32 BuildRequires:  swig >= 2
33 Source:         %{name}-%{version}.tar.bz2
34
35 %description
36 This package provides bindings for libzypp, the library for package management.
37
38 %prep
39 %setup -q
40
41 %build
42 mkdir build
43 cd build
44 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
45       -DPYTHON_SITEDIR=%{py_sitedir} \
46       -DLIB=%{_lib} \
47       -DCMAKE_VERBOSE_MAKEFILE=TRUE \
48       -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
49       -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
50       -DCMAKE_BUILD_TYPE=Release \
51       -DCMAKE_SKIP_RPATH=1 \
52       ..
53 # the swig compile jobs take a lot of memory, so don't use jobs here
54 make -j1
55
56 %check
57 cd build
58 make test
59
60 %install
61 cd build
62 make install DESTDIR=$RPM_BUILD_ROOT
63
64 %clean
65 %{__rm} -rf %{buildroot}
66
67 %package -n ruby-zypp
68 Summary:        Ruby bindings for libzypp
69 Group:          Development/Languages/Ruby
70
71 %description -n ruby-zypp
72 Ruby bindings for libzypp.
73
74 %files -n ruby-zypp
75 %defattr(-,root,root,-)
76 %if 0%{?suse_version}
77 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
78 %endif
79 %if 0%{?mandriva_version}
80 %{ruby_sitearchdir}/zypp.so
81 %endif
82
83 %package -n python-zypp
84 Summary:        Python bindings for libzypp
85 Group:          Development/Languages/Python
86 %description -n python-zypp
87 Python bindings for libzypp.
88
89 %files -n python-zypp
90 %defattr(-,root,root,-)
91 %{py_sitedir}/_zypp.so
92 %{py_sitedir}/zypp.py
93
94 %package -n perl-zypp
95 Requires:       perl = %{perl_version}
96 Summary:        Perl bindings for libzypp
97 Group:          Development/Languages/Perl
98
99 %description -n perl-zypp
100 Perl bindings for libzypp.
101
102 %files -n perl-zypp
103 %defattr(-,root,root,-)
104 %{perl_vendorlib}/zypp.pm
105 %{perl_vendorarch}/zypp.so
106
107 %changelog