Improve on %files section ;-)
[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
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.2.1
22 Source:         %{name}-%{version}.tar.bz2
23
24 %description
25 -
26
27 %prep
28 %setup -q
29
30 %build
31 mkdir build
32 cd build
33 cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
34       -DLIB=%{_lib} \
35       -DCMAKE_VERBOSE_MAKEFILE=TRUE \
36       -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
37       -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
38       -DCMAKE_BUILD_TYPE=Release \
39       -DCMAKE_SKIP_RPATH=1 \
40       ..
41 make %{?jobs:-j %jobs}
42
43 %install
44 cd build
45 make install DESTDIR=$RPM_BUILD_ROOT
46
47 %clean
48 %{__rm} -rf %{buildroot}
49
50 %package -n ruby-zypp
51 Summary:        Ruby bindings for libzypp
52 Group:          Development/Languages/Ruby
53
54 %description -n ruby-zypp
55 -
56
57 %files -n ruby-zypp
58 %defattr(-,root,root,-)
59 %if 0%{?suse_version}
60 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
61 %endif
62 %if 0%{?mandriva_version}
63 %{ruby_sitearchdir}/zypp.so
64 %endif
65
66 %package -n python-zypp
67 Summary:        Python bindings for libzypp
68 Group:          Development/Languages/Python
69 %description -n python-zypp
70 -
71
72 %files -n python-zypp
73 %defattr(-,root,root,-)
74 %{py_sitedir}/_zypp.so
75 %{py_sitedir}/zypp.py
76
77 %package -n perl-zypp
78 Summary:        Perl bindings for libzypp
79 Group:          Development/Languages/Perl
80
81 %description -n perl-zypp
82 -
83
84 %files -n perl-zypp
85 %defattr(-,root,root,-)
86 %{perl_vendorlib}/zypp.pm
87 %{perl_vendorarch}/zypp.so
88
89 %changelog