3 Summary: Library for working with Data Matrix 2D bar-codes
9 URL: http://www.libdmtx.org/
10 Source0: http://downloads.sourceforge.net/libdmtx/%{name}-%{version}.tar.bz2
11 # Source0-md5: 0684cf3857591e777b57248d652444ae
12 BuildRequires: ImageMagick-devel
13 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 BuildRequires: OpenGL-GLU-devel
16 BuildRequires: SDL_image-devel
17 BuildRequires: libpng-devel
19 #BuildRequires: java-1.6.0-devel
20 BuildRequires: php-devel
21 BuildRequires: python-devel
24 BuildRequires: ruby-devel
28 libdmtx is open source software for reading and writing Data Matrix 2D
29 bar-codes on Linux, Unix, OS X, Windows, and mobile devices. At its
30 core libdmtx is a shared library, allowing C/C++ programs to use its
31 capabilities without restrictions or overhead.
33 The included utility programs, dmtxread and dmtxwrite, provide the
34 official interface to libdmtx from the command line, and also serve as
35 a good reference for programmers who wish to write their own programs
36 that interact with libdmtx. All of the software in the libdmtx package
37 is distributed under the LGPLv2 and can be used freely under these
41 Summary: Development files for %{name}
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
46 The %{name}-devel package contains libraries and header files for
47 developing applications that use %{name}.
50 Summary: Utilities for %{name}
51 Group: Applications/System
52 Requires: %{name} = %{version}-%{release}
55 The %{name}-utils package contains utilities that use %{name}.
58 %package -n php-libdmtx
59 Summary: PHP bindings for %{name}
62 Requires: %{name} = %{version}-%{release}
65 %description -n php-libdmtx
66 The php-%{name} package contains bindings for using %{name} from PHP.
68 %package -n python-libdmtx
69 Summary: Python bindings for %{name}
71 Requires: %{name} = %{version}-%{release}
73 %description -n python-libdmtx
74 The python-%{name} package contains bindings for using %{name} from
77 %package -n ruby-libdmtx
78 Summary: Ruby bindings for %{name}
80 Requires: %{name} = %{version}-%{release}
81 Provides: ruby(%{name}) = %{version}
83 %description -n ruby-libdmtx
84 The ruby-%{name} package contains bindings for using %{name} from
91 chmod a-x wrapper/{php,python}/README
97 %{__make} %{?_smp_mflags}
99 # temporary installation required by the language wrappers
104 # language wrappers must be built separately
111 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
112 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
115 EXTRA_CFLAGS="-I$(pwd)/../../tmp%{_includedir}" \
116 DMTX_SHARED_LIBADD="-L$(pwd)/../../tmp%{_libdir} -ldmtx"
121 sed -i.orig -e "s|%{_prefix}/local/include|$(pwd)/../../tmp%{_includedir}|" -e "s|%{_prefix}/local/lib|$(pwd)/../../tmp%{_libdir}|" setup.py
122 python setup.py build
123 chmod 0755 build/lib.*/*.so
130 CPPFLAGS="-I$(pwd)/../../tmp%{_includedir}" \
131 LIBPATH="-L$(pwd)/../../tmp%{_libdir} -ldmtx"
136 #make LIBDMTX_LA="/tmp%{_libdir}/libdmtx.so"
145 ./${t}_test/${t}_test
150 rm -rf $RPM_BUILD_ROOT
153 DESTDIR=$RPM_BUILD_ROOT
155 find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
158 %{__make} -C php install \
159 INSTALL_ROOT=$RPM_BUILD_ROOT
162 python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
166 %{__make} -C ruby install \
167 DESTDIR=$RPM_BUILD_ROOT
175 rm -rf $RPM_BUILD_ROOT
177 %post -p /sbin/ldconfig
178 %postun -p /sbin/ldconfig
182 %defattr(644,root,root,755)
183 %doc AUTHORS COPYING.LESSER ChangeLog KNOWNBUG NEWS README README.linux TODO
184 %attr(755,root,root) %{_libdir}/%{name}.so.*
187 %defattr(644,root,root,755)
189 %attr(755,root,root) %{_libdir}/%{name}.so
190 %{_pkgconfigdir}/%{name}.pc
191 %{_mandir}/man3/%{name}.3*
194 %defattr(644,root,root,755)
195 %attr(755,root,root) %{_bindir}/dmtx*
196 %{_mandir}/man1/dmtx*.1*
198 %files -n php-libdmtx
199 %defattr(644,root,root,755)
200 %doc COPYING wrapper/php/README
201 %attr(755,root,root) %{_libdir}/php/*.so
203 %files -n python-libdmtx
204 %defattr(644,root,root,755)
205 %doc wrapper/python/README
209 %files -n ruby-libdmtx
210 %defattr(644,root,root,755)
211 %doc wrapper/ruby/README
212 %attr(755,root,root) %{ruby_sitearchdir}/*.so