]> git.pld-linux.org Git - packages/treedec.git/blob - treedec.spec
e3cfd8eb0ab66bcd7dd5ac17b82ea5910e07b8a5
[packages/treedec.git] / treedec.spec
1 #
2 # Conditional build:
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
6 #
7 Summary:        Tree decomposition algorithms
8 Summary(pl.UTF-8):      Algorytmy do rozkładu drzewiastego
9 Name:           treedec
10 # configure.ac /AC_INIT
11 Version:        0.9.0
12 %define gitref  aceed466aebd2e9f898172f3a5c3d9f481dfdb63
13 %define snap    20181209
14 Release:        1
15 License:        GPL v2, GPL v3
16 Group:          Libraries
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
29 %if %{with python2}
30 BuildRequires:  python-Cython >= 0.20.0
31 BuildRequires:  python-devel >= 1:2.7
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-Cython >= 0.20.0
35 BuildRequires:  python3-devel >= 1:3.2
36 %endif
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 treedec provides tree decomposition algorithms.
41
42 %description -l pl.UTF-8
43 Biblioteka treedec udostępnia algorytmy rozkładu drzewiastego.
44
45 %package devel
46 Summary:        Tree decomposition algorithms
47 Summary(pl.UTF-8):      Algorytmy do rozkładu drzewiastego
48 License:        Boost v1.0
49 Group:          Development/Libraries
50 Requires:       libstdc++-devel >= 6:4.7
51
52 %description devel
53 treedec provides tree decomposition algorithms.
54
55 %description devel -l pl.UTF-8
56 Biblioteka treedec udostępnia algorytmy rozkładu drzewiastego.
57
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
62
63 %description -n python-tdlib
64 Python 2 tree decomposition module.
65
66 %description -n python-tdlib -l pl.UTF-8
67 Moduł do rozkładu drzewiastego dla Pythona 2.
68
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
73
74 %description -n python3-tdlib
75 Python 3 tree decomposition module.
76
77 %description -n python3-tdlib -l pl.UTF-8
78 Moduł do rozkładu drzewiastego dla Pythona 3.
79
80 %prep
81 %setup -q -n tdlib-%{gitref}
82 %patch0 -p1
83
84 %build
85 %{__libtoolize}
86 %{__aclocal} -I m4
87 %{__autoconf}
88 %{__autoheader}
89 %{__automake}
90 install -d build-py2
91 cd build-py2
92 ../%configure \
93         --disable-static \
94         %{!?with_gala:--without-gala} \
95         --with-python-include-dir=%{py_incdir} \
96         %{!?with_python2:--without-python}
97
98 %{__make}
99 cd ..
100
101 %if %{with python3}
102 install -d build-py3
103 cd build-py3
104 ../%configure \
105         PYTHON=%{__python3} \
106         --disable-static \
107         %{!?with_gala:--without-gala} \
108         --with-python-include-dir=%{py3_incdir} \
109         %{!?with_python3:--without-python}
110
111 %{__make}
112 %endif
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116
117 %if %{with python3}
118 %{__make} -C build-py3 install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/tdlib/cytdlib.la
122 %endif
123
124 %{__make} -C build-py2 install \
125         DESTDIR=$RPM_BUILD_ROOT
126
127 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/tdlib/cytdlib.la
128 %py_postclean
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %files devel
134 %defattr(644,root,root,755)
135 %doc AUTHORS BUGS COPYING NEWS README THANKS TODO
136 %{_includedir}/treedec
137
138 %if %{with python2}
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]
144 %endif
145
146 %if %{with python3}
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__
153 %endif
This page took 0.032396 seconds and 2 git commands to generate.