6ffe3b6ed59ff0bb6f68acb97686ba102dec04f2
[platform/upstream/libzypp-bindings.git] / libzypp-bindings.spec.cmake
1 #
2 # spec file for package libzypp-bindings
3 #
4 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8 # Please submit bugfixes or comments via http://bugs.opensuse.org/
9 #
10
11 # nodebuginfo
12
13 Name:           @PACKAGE@
14 Version:        @VERSION@
15 Release:        0
16 License:        GPL v2 or later
17 Summary:        Bindings for libzypp
18 Group:          Development/Sources
19 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
20 BuildRequires:  cmake gcc-c++ python-devel ruby-devel swig
21 BuildRequires:  libzypp-devel >= 5.8.0
22 Source:         %{name}-%{version}.tar.bz2
23
24 %if 0%{?suse_version} == 1110
25 # not present on sle11-sp1:
26 %define python_sitelib %{_libdir}/python%{python_version}/site-packages
27 %endif
28
29 %description
30 This package provides bindings for libzypp, the library for package management.
31
32 %prep
33 %setup -q
34
35 %build
36 mkdir build
37 cd build
38 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
39       -DLIB=%{_lib} \
40       -DCMAKE_VERBOSE_MAKEFILE=TRUE \
41       -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
42       -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
43       -DCMAKE_BUILD_TYPE=Release \
44       -DCMAKE_SKIP_RPATH=1 \
45       ..
46 make %{?jobs:-j %jobs}
47
48 %install
49 cd build
50 make install DESTDIR=$RPM_BUILD_ROOT
51
52 %clean
53 %{__rm} -rf %{buildroot}
54
55 %package -n ruby-zypp
56 Summary:        Ruby bindings for libzypp
57 Group:          Development/Languages/Ruby
58
59 %description -n ruby-zypp
60 -
61
62 %files -n ruby-zypp
63 %defattr(-,root,root,-)
64 %if 0%{?suse_version}
65 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
66 %endif
67 %if 0%{?mandriva_version}
68 %{ruby_sitearchdir}/zypp.so
69 %endif
70
71 %package -n python-zypp
72 Summary:        Python bindings for libzypp
73 Group:          Development/Languages/Python
74 %description -n python-zypp
75 -
76
77 %files -n python-zypp
78 %defattr(-,root,root,-)
79 %{python_sitelib}/_zypp.so
80 %{python_sitelib}/zypp.py
81
82 %package -n perl-zypp
83 Requires:       perl = %{perl_version}
84 Summary:        Perl bindings for libzypp
85 Group:          Development/Languages/Perl
86
87 %description -n perl-zypp
88 -
89
90 %files -n perl-zypp
91 %defattr(-,root,root,-)
92 %{perl_vendorlib}/zypp.pm
93 %{perl_vendorarch}/zypp.so
94
95 %changelog