70e2d69ff0358de2ea0bc386a4224126a7ab3227
[platform/upstream/libsolv.git] / package / libsatsolver.spec.in
1
2 Name:           libsatsolver
3 Version:        @VERSION@
4 Release:        1
5 License:        BSD 3-Clause
6 Url:            http://svn.opensuse.org/svn/zypp/trunk/sat-solver
7 Source:         satsolver-%{version}.tar.bz2
8 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
9 Group:          Development/Libraries/C and C++
10 Prefix:         /usr
11
12 %if 0%{?mandriva_version}
13 # force this version on mandriva
14 BuildRequires: libneon0.26-devel
15 %endif
16 %if 0%{?fedora_version}
17 BuildRequires: perl-devel
18 %endif
19 %if 0%{?suse_version}
20 BuildRequires: libexpat-devel
21 %else
22 BuildRequires: expat-devel
23 %endif
24 BuildRequires:  cmake rpm-devel gcc-c++ ruby-devel swig perl python-devel
25 Summary:        A new approach to package dependency solving
26
27 %description
28 A new approach to package dependency solving
29
30 Authors:
31 --------
32     Michael Schroeder <mls@suse.de>
33     Klaus Kaempf <kkaempf@suse.de>
34
35 %package devel
36 Summary:        A new approach to package dependency solving
37 Group:          Development/Libraries/C and C++
38 Requires:       satsolver-tools = %version
39
40 %description devel
41 A new approach to package dependency solving
42
43 Authors:
44 --------
45     Michael Schroeder <mls@suse.de>
46     Klaus Kaempf <kkaempf@suse.de>
47
48 %package -n satsolver-tools
49 Summary:        A new approach to package dependency solving
50 Group:          Development/Libraries/C and C++
51 Obsoletes:      libsatsolver <= 0.0.15
52 Provides:       libsatsolver = %{version}-%{release}
53 Requires:       gzip bzip2 coreutils
54
55 %description -n satsolver-tools
56
57
58 %package -n ruby-satsolver
59 Summary:        Ruby bindings for sat solver
60 Group:          Development/Languages/Ruby
61
62 %description -n ruby-satsolver
63 .
64
65 %package -n python-satsolver
66 %py_requires
67 Summary:        Python bindings for sat solver
68 Group:          Development/Languages/Python
69
70 %description -n python-satsolver
71 .
72
73 %package -n perl-satsolver
74 Requires:       perl = %{perl_version}
75 Summary:        Perl bindings for sat solver
76 Group:          Development/Languages/Perl
77
78 %description -n perl-satsolver
79 .
80
81 %prep
82 %setup -n satsolver-%{version}
83
84 %build
85 export CFLAGS="$RPM_OPT_FLAGS"
86 export CXXFLAGS="$CFLAGS"
87
88 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
89       -DPYTHON_SITEDIR=%{py_sitedir} \
90       -DLIB=%{_lib} \
91       -DCMAKE_VERBOSE_MAKEFILE=TRUE \
92       -DCMAKE_BUILD_TYPE=Release \
93       -DCMAKE_SKIP_RPATH=1 
94 make %{?jobs:-j %jobs}
95
96 %install
97 make DESTDIR=$RPM_BUILD_ROOT install
98 # we want to leave the .a file untouched
99 export NO_BRP_STRIP_DEBUG=true
100
101 %clean
102 rm -rf "$RPM_BUILD_ROOT"
103
104 %files -n satsolver-tools
105 %defattr(-,root,root)
106 %doc LICENSE*
107 %exclude /usr/bin/deptestomatic
108 %exclude /usr/bin/helix2solv
109 /usr/bin/*
110
111 %files devel
112 %defattr(-,root,root)
113 %_libdir/libsatsolver.a
114 %_libdir/libappsatsolver.a
115 %doc doc/README*
116 %doc doc/THEORY
117 %doc doc/PLANNING
118 %dir /usr/include/satsolver
119 /usr/include/satsolver/*
120 /usr/bin/deptestomatic
121 /usr/bin/helix2solv
122
123 %files -n ruby-satsolver
124 %defattr(-,root,root,-)
125 %if 0%{?suse_version}
126 %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/satsolver.so
127 %endif
128 %if 0%{?mandriva_version}
129 %{ruby_sitearchdir}/satsolverx.so
130 %endif
131
132 %files -n python-satsolver
133 %defattr(-,root,root,-)
134 #%doc swig/python/examples/*.py
135 %{py_sitedir}/_satsolver.so
136 %{py_sitedir}/satsolver.py
137
138 %files -n perl-satsolver
139 %defattr(-,root,root,-)
140 %{perl_vendorarch}/satsolver.so
141 %{perl_vendorlib}/satsolver.pm
142 %changelog