Fix the 'remove start' callback'
[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
21 BuildRequires:  swig >= 1.3.40
22 BuildRequires:  libzypp-devel >= 5.8.0
23 Source:         %{name}-%{version}.tar.bz2
24
25 %description
26 This package provides bindings for libzypp, the library for package management.
27
28 %prep
29 %setup -q
30
31 %build
32 mkdir build
33 cd build
34 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
35       -DPYTHON_SITEDIR=%{py_sitedir} \
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 # the swig compile jobs take a lot of memory, so don't use %jobs here
44 make -j1
45
46 %check
47 cd build
48 make test
49
50 %install
51 cd build
52 make install DESTDIR=$RPM_BUILD_ROOT
53
54 %clean
55 %{__rm} -rf %{buildroot}
56
57 %package -n ruby-zypp
58 Summary:        Ruby bindings for libzypp
59 Group:          Development/Languages/Ruby
60
61 %description -n ruby-zypp
62 -
63
64 %files -n ruby-zypp
65 %defattr(-,root,root,-)
66 %if 0%{?suse_version}
67 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
68 %endif
69 %if 0%{?mandriva_version}
70 %{ruby_sitearchdir}/zypp.so
71 %endif
72
73 %package -n python-zypp
74 Summary:        Python bindings for libzypp
75 Group:          Development/Languages/Python
76 %description -n python-zypp
77 -
78
79 %files -n python-zypp
80 %defattr(-,root,root,-)
81 %{py_sitedir}/_zypp.so
82 %{py_sitedir}/zypp.py
83
84 %package -n perl-zypp
85 Requires:       perl = %{perl_version}
86 Summary:        Perl bindings for libzypp
87 Group:          Development/Languages/Perl
88
89 %description -n perl-zypp
90 -
91
92 %files -n perl-zypp
93 %defattr(-,root,root,-)
94 %{perl_vendorlib}/zypp.pm
95 %{perl_vendorarch}/zypp.so
96
97 %changelog