]> git.pld-linux.org Git - packages/dmtx-wrappers.git/blob - dmtx-wrappers.spec
- autotools dependencies
[packages/dmtx-wrappers.git] / dmtx-wrappers.spec
1 # TODO
2 # - fix PHP bindings
3 # - java bindings
4 # - .Net bindings
5 #
6 # Conditional build:
7 %bcond_with     dotnet  # .NET binding
8 %bcond_with     java    # Java binding
9 %bcond_with     php     # PHP binding (not ready for 7+)
10 %bcond_without  python  # Python binding
11 %bcond_without  ruby    # Ruby binding
12 %bcond_without  vala    # Vala binding
13
14 Summary:        libdmtx wrappers
15 Summary(pl.UTF-8):      Przejściówki do libdmtx
16 Name:           dmtx-wrappers
17 Version:        0.7.3
18 %define gitref  61072c30ebbc7bb11a54fbc8869af3e868879a40
19 %define snap    20141125
20 Release:        0.%{snap}.1
21 License:        LGPL v2.1+, GPL v2+
22 Group:          Libraries
23 Source0:        https://github.com/dmtx/dmtx-wrappers/archive/%{gitref}/%{name}-%{snap}.tar.gz
24 # Source0-md5:  cb19f1ead190d8183cc36f41f4919224
25 URL:            https://github.com/dmtx/dmtx-wrappers
26 BuildRequires:  autoconf >= 2.50
27 BuildRequires:  automake
28 BuildRequires:  libdmtx-devel >= 0.7.3
29 BuildRequires:  libtool
30 BuildRequires:  rpm-build >= 4.6
31 BuildRequires:  rpmbuild(macros) >= 1.410
32 %if %{with php}
33 BuildRequires:  %{php_name}-devel
34 %endif
35 %if %{with python}
36 BuildRequires:  python-devel >= 1:2.5
37 %endif
38 %if %{with ruby}
39 BuildRequires:  ruby
40 BuildRequires:  ruby-devel
41 %endif
42 %if %{with vala}
43 BuildRequires:  pkgconfig
44 BuildRequires:  vala
45 %endif
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 libdmtx wrappers.
50
51 %description -l pl.UTF-8
52 Przejściówki do libdmtx.
53
54 %package -n %{php_name}-dmtx
55 Summary:        PHP bindings for libdmtx
56 Summary(pl.UTF-8):      Wiązania PHP do libdmtx
57 License:        GPL v2+
58 Group:          Development/Languages/PHP
59 Requires:       libdmtx >= 0.7.3
60 %{?requires_php_extension}
61 Provides:       php(dmtx) = %{version}
62 Obsoletes:      php-libdmtx < 0.7.2-4
63
64 %description -n %{php_name}-dmtx
65 This package contains bindings for using libdmtx from PHP.
66
67 %description -n %{php_name}-dmtx -l pl.UTF-8
68 Ten pakiet zawiera wiązania pozwalające na używanie biblioteki libdmtx
69 z poziomu PHP.
70
71 %package -n python-pydmtx
72 Summary:        Python bindings for libdmtx
73 Summary(pl.UTF-8):      Wiązania Pyhona do libdmtx
74 License:        LGPL v2.1+
75 Group:          Libraries/Python
76 Requires:       libdmtx >= 0.7.3
77 Obsoletes:      python-libdmtx < 0.7.2-4
78
79 %description -n python-pydmtx
80 This package contains bindings for using libdmtx from Python.
81
82 %description -n python-pydmtx -l pl.UTF-8
83 Ten pakiet zawiera wiązania pozwalające na używanie biblioteki libdmtx
84 z poziomu Pythona.
85
86 %package -n ruby-Rdmtx
87 Summary:        Ruby bindings for libdmtx
88 Summary(pl.UTF-8):      Wiązania języka Ruby do libdmtx
89 License:        LGPL v2.1+
90 Group:          Libraries
91 Requires:       libdmtx >= 0.7.3
92 Obsoletes:      ruby-libdmtx < 0.7.3
93
94 %description -n ruby-Rdmtx
95 This package contains bindings for using libdmtx from Ruby.
96
97 %description -n ruby-Rdmtx -l pl.UTF-8
98 Ten pakiet zawiera wiązania pozwalające na używanie biblioteki libdmtx
99 z poziomu języka Ruby.
100
101 %package -n vala-libdmtx
102 Summary:        Vala bindings for libdmtx
103 Summary(pl.UTF-8):      Wiązania języka Vala do libdmtx
104 License:        LGPL v2.1+
105 Group:          Libraries
106 Requires:       libdmtx-devel >= 0.7.3
107 Requires:       vala
108 BuildArch:      noarch
109
110 %description -n vala-libdmtx
111 This package contains bindings for using libdmtx from Vala.
112
113 %description -n vala-libdmtx -l pl.UTF-8
114 Ten pakiet zawiera wiązania pozwalające na używanie biblioteki libdmtx
115 z poziomu języka Vala.
116
117 %prep
118 %setup -q -n %{name}-%{gitref}
119
120 %build
121 %{__libtoolize}
122 %{__aclocal} -I m4
123 %{__autoconf}
124 %{__autoheader}
125 %{__automake}
126 %configure \
127         %{?with_java:--enable-java} \
128         %{?with_dotnet:--enable-net} \
129         %{?with_vala:--enable-vala}
130
131 %{__make}
132
133 %if %{with php}
134 cd php
135 phpize
136 %configure \
137        --disable-static
138
139 %{__make}
140 cd ..
141 %endif
142
143 %if %{with python}
144 cd python
145 %py_build
146
147 # not ready for py3 currently
148 cd ..
149 %endif
150
151 %if %{with ruby}
152 cd ruby
153 %{__ruby} extconf.rb
154 %{__make}
155 cd ..
156 %endif
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 %{__make} install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 %if %{with php}
165 %{__make} -C php install \
166         INSTALL_ROOT=$RPM_BUILD_ROOT
167
168 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
169 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/dmtx.ini
170 ; Enable dmtx extension module
171 extension=dmtx.so
172 EOF
173 %endif
174
175 %if %{with python}
176 cd python
177 %py_install
178
179 %py_postclean
180 cd ..
181 %endif
182
183 %if %{with ruby}
184 %{__make} -C ruby install \
185         DESTDIR=$RPM_BUILD_ROOT \
186         RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir}
187 %endif
188
189 %clean
190 rm -rf $RPM_BUILD_ROOT
191
192 %if %{with php}
193 %files -n %{php_name}-dmtx
194 %defattr(644,root,root,755)
195 %doc AUTHORS ChangeLog KNOWNBUG NEWS TODO php/README
196 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/dmtx.ini
197 %attr(755,root,root) %{php_extensiondir}/dmtx.so
198 %endif
199
200 %if %{with python}
201 %files -n python-pydmtx
202 %defattr(644,root,root,755)
203 %doc AUTHORS ChangeLog KNOWNBUG NEWS TODO python/README
204 %{py_sitedir}/pydmtx.py[co]
205 %attr(755,root,root) %{py_sitedir}/_pydmtx.so
206 %{py_sitedir}/pydmtx-0.1-py*.egg-info
207 %endif
208
209 %if %{with ruby}
210 %files -n ruby-Rdmtx
211 %defattr(644,root,root,755)
212 %doc AUTHORS ChangeLog KNOWNBUG NEWS TODO ruby/README
213 %attr(755,root,root) %{ruby_vendorarchdir}/Rdmtx.so
214 %endif
215
216 %if %{with vala}
217 %files -n vala-libdmtx
218 %defattr(644,root,root,755)
219 %doc AUTHORS ChangeLog KNOWNBUG NEWS TODO vala/README
220 %{_datadir}/vala/vapi/libdmtx.vapi
221 %endif
This page took 0.069973 seconds and 3 git commands to generate.