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