8c1ca95f097b2aa31f7054c92b1cb891fda50046
[platform/upstream/libzypp-bindings.git] / packaging / libzypp-bindings.spec
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 Name:           libzypp-bindings
11 Version:        0.7.4
12 Release:        0
13 License:        GPL-2.0+
14 Summary:        Bindings for libzypp
15 Group:          Development/Sources
16 Source:         %{name}-%{version}.tar.gz
17 Source1001:     libzypp-bindings.manifest
18
19 BuildRequires:  cmake gcc-c++ python-devel
20 BuildRequires:  swig
21
22 BuildRequires:  libzypp-devel
23
24 %description
25 This package provides bindings for libzypp, the library for package management.
26
27 %prep
28 %setup -q
29 cp %{SOURCE1001} .
30
31 %build
32 mkdir build
33 cd build
34 %cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
35       -DPYTHON_SITEDIR=%{python_sitearch} \
36       -DLIB=%{_lib} \
37       -DCMAKE_VERBOSE_MAKEFILE=TRUE \
38       -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
39       -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
40       -DCMAKE_BUILD_TYPE=Release \
41       -DCMAKE_SKIP_RPATH=1 \
42       ..
43 make -j1
44
45 %install
46 cd build
47 make install DESTDIR=$RPM_BUILD_ROOT
48
49 %clean
50
51 %package -n python-zypp
52 Summary:        Python bindings for libzypp
53 Group:          Development/Languages/Python
54 Requires:  libzypp
55
56 %description -n python-zypp
57 Python bindings of libzypp
58
59
60 %files -n python-zypp
61 %manifest %{name}.manifest
62 %defattr(-,root,root,-)
63 %{python_sitearch}/_zypp.so
64 %{python_sitearch}/zypp.py*