3 %bcond_with gala # use gala graph functions (broken build when using gala snapshot 20181110 + boost 1.70)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Tree decomposition algorithms
8 Summary(pl.UTF-8): Algorytmy do rozkładu drzewiastego
10 # configure.ac /AC_INIT
12 %define gitref aceed466aebd2e9f898172f3a5c3d9f481dfdb63
15 License: GPL v2, GPL v3
17 #Source0Download: https://github.com/freetdi/tdlib/releases
18 Source0: https://github.com/freetdi/tdlib/archive/%{gitref}/%{name}-%{snap}.tar.gz
19 # Source0-md5: dedb02819869f08c1035d23f47883d69
20 Patch0: %{name}-python.patch
21 URL: https://github.com/freetdi/tdlib
22 BuildRequires: autoconf >= 2.69
23 BuildRequires: automake
24 BuildRequires: boost-devel >= 1.55
25 %{?with_gala:BuildRequires: freetdi-gala-devel}
26 BuildRequires: libstdc++-devel >= 6:4.7
27 BuildRequires: libtool >= 2:2
28 BuildRequires: stx-btree-devel
30 BuildRequires: python-Cython >= 0.20.0
31 BuildRequires: python-devel >= 1:2.7
34 BuildRequires: python3-Cython >= 0.20.0
35 BuildRequires: python3-devel >= 1:3.2
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 treedec provides tree decomposition algorithms.
42 %description -l pl.UTF-8
43 Biblioteka treedec udostępnia algorytmy rozkładu drzewiastego.
46 Summary: Tree decomposition algorithms
47 Summary(pl.UTF-8): Algorytmy do rozkładu drzewiastego
49 Group: Development/Libraries
50 Requires: libstdc++-devel >= 6:4.7
53 treedec provides tree decomposition algorithms.
55 %description devel -l pl.UTF-8
56 Biblioteka treedec udostępnia algorytmy rozkładu drzewiastego.
58 %package -n python-tdlib
59 Summary: Python 2 tree decomposition module
60 Summary(pl.UTF-8): Moduł do rozkładu drzewiastego dla Pythona 2
61 Group: Libraries/Python
63 %description -n python-tdlib
64 Python 2 tree decomposition module.
66 %description -n python-tdlib -l pl.UTF-8
67 Moduł do rozkładu drzewiastego dla Pythona 2.
69 %package -n python3-tdlib
70 Summary: Python 3 tree decomposition module
71 Summary(pl.UTF-8): Moduł do rozkładu drzewiastego dla Pythona 3
72 Group: Libraries/Python
74 %description -n python3-tdlib
75 Python 3 tree decomposition module.
77 %description -n python3-tdlib -l pl.UTF-8
78 Moduł do rozkładu drzewiastego dla Pythona 3.
81 %setup -q -n tdlib-%{gitref}
94 %{!?with_gala:--without-gala} \
95 --with-python-include-dir=%{py_incdir} \
96 %{!?with_python2:--without-python}
105 PYTHON=%{__python3} \
107 %{!?with_gala:--without-gala} \
108 --with-python-include-dir=%{py3_incdir} \
109 %{!?with_python3:--without-python}
115 rm -rf $RPM_BUILD_ROOT
118 %{__make} -C build-py3 install \
119 DESTDIR=$RPM_BUILD_ROOT
121 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/tdlib/cytdlib.la
124 %{__make} -C build-py2 install \
125 DESTDIR=$RPM_BUILD_ROOT
127 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tdlib/cytdlib.la
131 rm -rf $RPM_BUILD_ROOT
134 %defattr(644,root,root,755)
135 %doc AUTHORS BUGS COPYING NEWS README THANKS TODO
136 %{_includedir}/treedec
139 %files -n python-tdlib
140 %defattr(644,root,root,755)
141 %dir %{py_sitedir}/tdlib
142 %attr(755,root,root) %{py_sitedir}/tdlib/cytdlib.so
143 %{py_sitedir}/tdlib/*.py[co]
147 %files -n python3-tdlib
148 %defattr(644,root,root,755)
149 %dir %{py_sitedir}/tdlib
150 %attr(755,root,root) %{py3_sitedir}/tdlib/cytdlib.so
151 %{py3_sitedir}/tdlib/*.py
152 %{py3_sitedir}/tdlib/__pycache__