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 Release: 1.%{snap}.%{rel}
16 License: GPL v2, GPL v3
18 #Source0Download: https://github.com/freetdi/tdlib/releases
19 Source0: https://github.com/freetdi/tdlib/archive/%{gitref}/%{name}-%{snap}.tar.gz
20 # Source0-md5: dedb02819869f08c1035d23f47883d69
21 Patch0: %{name}-python.patch
22 URL: https://github.com/freetdi/tdlib
23 BuildRequires: autoconf >= 2.69
24 BuildRequires: automake
25 BuildRequires: boost-devel >= 1.55
26 %{?with_gala:BuildRequires: freetdi-gala-devel}
27 BuildRequires: libstdc++-devel >= 6:4.7
28 BuildRequires: libtool >= 2:2
29 BuildRequires: stx-btree-devel
31 BuildRequires: python-Cython >= 0.20.0
32 BuildRequires: python-devel >= 1:2.7
35 BuildRequires: python3-Cython >= 0.20.0
36 BuildRequires: python3-devel >= 1:3.2
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 treedec provides tree decomposition algorithms.
43 %description -l pl.UTF-8
44 Biblioteka treedec udostępnia algorytmy rozkładu drzewiastego.
47 Summary: Tree decomposition algorithms
48 Summary(pl.UTF-8): Algorytmy do rozkładu drzewiastego
50 Group: Development/Libraries
51 Requires: libstdc++-devel >= 6:4.7
54 treedec provides tree decomposition algorithms.
56 %description devel -l pl.UTF-8
57 Biblioteka treedec udostępnia algorytmy rozkładu drzewiastego.
59 %package -n python-tdlib
60 Summary: Python 2 tree decomposition module
61 Summary(pl.UTF-8): Moduł do rozkładu drzewiastego dla Pythona 2
62 Group: Libraries/Python
64 %description -n python-tdlib
65 Python 2 tree decomposition module.
67 %description -n python-tdlib -l pl.UTF-8
68 Moduł do rozkładu drzewiastego dla Pythona 2.
70 %package -n python3-tdlib
71 Summary: Python 3 tree decomposition module
72 Summary(pl.UTF-8): Moduł do rozkładu drzewiastego dla Pythona 3
73 Group: Libraries/Python
75 %description -n python3-tdlib
76 Python 3 tree decomposition module.
78 %description -n python3-tdlib -l pl.UTF-8
79 Moduł do rozkładu drzewiastego dla Pythona 3.
82 %setup -q -n tdlib-%{gitref}
95 %{!?with_gala:--without-gala} \
96 --with-python-include-dir=%{py_incdir} \
97 %{!?with_python2:--without-python}
106 PYTHON=%{__python3} \
108 %{!?with_gala:--without-gala} \
109 --with-python-include-dir=%{py3_incdir} \
110 %{!?with_python3:--without-python}
116 rm -rf $RPM_BUILD_ROOT
119 %{__make} -C build-py3 install \
120 DESTDIR=$RPM_BUILD_ROOT
122 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/tdlib/cytdlib.la
125 %{__make} -C build-py2 install \
126 DESTDIR=$RPM_BUILD_ROOT
128 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tdlib/cytdlib.la
132 rm -rf $RPM_BUILD_ROOT
135 %defattr(644,root,root,755)
136 %doc AUTHORS BUGS COPYING NEWS README THANKS TODO
137 %{_includedir}/treedec
140 %files -n python-tdlib
141 %defattr(644,root,root,755)
142 %dir %{py_sitedir}/tdlib
143 %attr(755,root,root) %{py_sitedir}/tdlib/cytdlib.so
144 %{py_sitedir}/tdlib/*.py[co]
148 %files -n python3-tdlib
149 %defattr(644,root,root,755)
150 %dir %{py3_sitedir}/tdlib
151 %attr(755,root,root) %{py3_sitedir}/tdlib/cytdlib.so
152 %{py3_sitedir}/tdlib/*.py
153 %{py3_sitedir}/tdlib/__pycache__