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