[2784] | 1 | %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
---|
| 2 | %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')} |
---|
| 3 | |
---|
| 4 | %global ruby_arch %(ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]') |
---|
| 5 | |
---|
| 6 | Name: libdmtx |
---|
| 7 | Summary: Library for working with Data Matrix 2D bar-codes |
---|
| 8 | Version: 0.7.2 |
---|
[5879] | 9 | Release: 7%{?_dist_release} |
---|
[2784] | 10 | |
---|
| 11 | Group: System Environment/Libraries |
---|
| 12 | License: LGPLv2+ |
---|
| 13 | URL: http://www.libdmtx.org/ |
---|
| 14 | Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 |
---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
| 16 | |
---|
| 17 | BuildRequires: ImageMagick-devel |
---|
| 18 | # required for tests |
---|
| 19 | BuildRequires: SDL_image-devel |
---|
| 20 | BuildRequires: libGLU-devel |
---|
| 21 | BuildRequires: libpng-devel |
---|
| 22 | # language bindings |
---|
| 23 | BuildRequires: php5-devel |
---|
| 24 | BuildRequires: python-devel |
---|
| 25 | BuildRequires: ruby |
---|
| 26 | BuildRequires: ruby-devel |
---|
| 27 | #BuildRequires: java-1.6.0-devel |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | %description |
---|
| 31 | libdmtx is open source software for reading and writing Data Matrix 2D |
---|
| 32 | bar-codes on Linux, Unix, OS X, Windows, and mobile devices. At its core |
---|
| 33 | libdmtx is a shared library, allowing C/C++ programs to use its capabilities |
---|
| 34 | without restrictions or overhead. |
---|
| 35 | |
---|
| 36 | The included utility programs, dmtxread and dmtxwrite, provide the official |
---|
| 37 | interface to libdmtx from the command line, and also serve as a good reference |
---|
| 38 | for programmers who wish to write their own programs that interact with |
---|
| 39 | libdmtx. All of the software in the libdmtx package is distributed under |
---|
| 40 | the LGPLv2 and can be used freely under these terms. |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | %package devel |
---|
| 44 | Summary: Development files for %{name} |
---|
| 45 | Group: Development/Libraries |
---|
| 46 | Requires: %{name} = %{version}-%{release} |
---|
| 47 | |
---|
| 48 | %description devel |
---|
| 49 | The %{name}-devel package contains libraries and header files for |
---|
| 50 | developing applications that use %{name}. |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | %package utils |
---|
| 54 | Summary: Utilities for %{name} |
---|
| 55 | Group: Applications/System |
---|
| 56 | Requires: %{name} = %{version}-%{release} |
---|
| 57 | |
---|
| 58 | %description utils |
---|
| 59 | The %{name}-utils package contains utilities that use %{name}. |
---|
| 60 | |
---|
| 61 | # language bindings |
---|
| 62 | %package -n php-libdmtx |
---|
| 63 | Summary: PHP bindings for %{name} |
---|
| 64 | Group: System Environment/Libraries |
---|
| 65 | License: GPLv2+ |
---|
| 66 | Requires: %{name} = %{version}-%{release} |
---|
| 67 | Requires: php5 |
---|
| 68 | |
---|
| 69 | %description -n php-libdmtx |
---|
| 70 | The php-%{name} package contains bindings for using %{name} from PHP. |
---|
| 71 | |
---|
| 72 | %package -n python-libdmtx |
---|
| 73 | Summary: Python bindings for %{name} |
---|
| 74 | Group: System Environment/Libraries |
---|
| 75 | Requires: %{name} = %{version}-%{release} |
---|
| 76 | |
---|
| 77 | %description -n python-libdmtx |
---|
| 78 | The python-%{name} package contains bindings for using %{name} from Python. |
---|
| 79 | |
---|
| 80 | %package -n ruby-libdmtx |
---|
| 81 | Summary: Ruby bindings for %{name} |
---|
| 82 | Group: System Environment/Libraries |
---|
| 83 | Requires: %{name} = %{version}-%{release} |
---|
| 84 | Provides: ruby(%{name}) = %{version} |
---|
| 85 | |
---|
| 86 | %description -n ruby-libdmtx |
---|
| 87 | The ruby-%{name} package contains bindings for using %{name} from Ruby. |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | %prep |
---|
| 91 | %setup -q |
---|
| 92 | |
---|
| 93 | # fix permissions |
---|
| 94 | chmod a-x wrapper/{php,python}/README |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | %build |
---|
| 98 | %configure --disable-static |
---|
| 99 | make %{?_smp_mflags} |
---|
| 100 | |
---|
| 101 | # temporary installation required by the language wrappers |
---|
| 102 | make install DESTDIR=/tmp |
---|
| 103 | |
---|
| 104 | # language wrappers must be built separately |
---|
| 105 | pushd wrapper |
---|
| 106 | pushd php |
---|
| 107 | phpize |
---|
| 108 | %configure --disable-static |
---|
| 109 | |
---|
| 110 | # Don't use rpath! |
---|
| 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 |
---|
| 113 | |
---|
| 114 | make EXTRA_CFLAGS="-I/tmp%{_includedir}" DMTX_SHARED_LIBADD="-L/tmp%{_libdir} -ldmtx" |
---|
| 115 | popd |
---|
| 116 | |
---|
| 117 | pushd python |
---|
| 118 | # fix paths |
---|
| 119 | sed -i.orig -e "s|/usr/local/include|/tmp%{_includedir}|" -e "s|/usr/local/lib|/tmp%{_libdir}|" setup.py |
---|
| 120 | python setup.py build |
---|
| 121 | chmod 0755 build/lib.*/*.so |
---|
| 122 | popd |
---|
| 123 | |
---|
| 124 | pushd ruby |
---|
| 125 | ruby extconf.rb |
---|
| 126 | make CPPFLAGS="-I/tmp%{_includedir}" LIBPATH="-L/tmp%{_libdir} -ldmtx" |
---|
| 127 | popd |
---|
| 128 | |
---|
| 129 | #pushd java |
---|
| 130 | #make LIBDMTX_LA="/tmp%{_libdir}/libdmtx.so" |
---|
| 131 | #popd |
---|
| 132 | popd |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | %install |
---|
| 136 | rm -rf $RPM_BUILD_ROOT |
---|
| 137 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
| 138 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' |
---|
| 139 | |
---|
| 140 | pushd wrapper |
---|
| 141 | pushd php |
---|
| 142 | make install INSTALL_ROOT=$RPM_BUILD_ROOT |
---|
| 143 | popd |
---|
| 144 | |
---|
| 145 | pushd python |
---|
| 146 | python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
---|
| 147 | popd |
---|
| 148 | |
---|
| 149 | pushd ruby |
---|
| 150 | make install RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_arch} |
---|
| 151 | popd |
---|
| 152 | |
---|
| 153 | #pushd java |
---|
| 154 | #popd |
---|
| 155 | popd |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | %check |
---|
| 159 | make check |
---|
| 160 | pushd test |
---|
| 161 | for t in simple unit |
---|
| 162 | do |
---|
| 163 | ./${t}_test/${t}_test |
---|
| 164 | done |
---|
| 165 | popd |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | %clean |
---|
| 169 | rm -rf $RPM_BUILD_ROOT |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | %post -p /sbin/ldconfig |
---|
| 173 | |
---|
| 174 | %postun -p /sbin/ldconfig |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | %files |
---|
| 178 | %defattr(-,root,root,-) |
---|
| 179 | %doc AUTHORS COPYING.LESSER ChangeLog KNOWNBUG NEWS README README.linux TODO |
---|
| 180 | %{_libdir}/%{name}.so.* |
---|
| 181 | |
---|
| 182 | %files devel |
---|
| 183 | %defattr(-,root,root,-) |
---|
| 184 | %doc |
---|
| 185 | %{_includedir}/* |
---|
| 186 | %{_libdir}/%{name}.so |
---|
| 187 | %{_libdir}/pkgconfig/%{name}.pc |
---|
| 188 | %{_mandir}/man3/%{name}.3* |
---|
| 189 | |
---|
| 190 | %files utils |
---|
| 191 | %defattr(-,root,root,-) |
---|
| 192 | %{_bindir}/dmtx* |
---|
| 193 | %{_mandir}/man1/dmtx*.1* |
---|
| 194 | |
---|
| 195 | %files -n php-libdmtx |
---|
| 196 | %defattr(-,root,root,-) |
---|
| 197 | %doc COPYING wrapper/php/README |
---|
| 198 | %{_libdir}/php5/*.so |
---|
| 199 | |
---|
| 200 | %files -n python-libdmtx |
---|
| 201 | %defattr(-,root,root,-) |
---|
| 202 | %doc wrapper/python/README |
---|
| 203 | %{python_sitearch}/* |
---|
| 204 | |
---|
| 205 | %files -n ruby-libdmtx |
---|
| 206 | %defattr(-,root,root,-) |
---|
| 207 | %doc wrapper/ruby/README |
---|
| 208 | %{ruby_arch}/*.so |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | %changelog |
---|
[5879] | 212 | * Sun Mar 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.2-7 |
---|
| 213 | - rebuild with ImageMagick-6.7.5.10 |
---|
| 214 | |
---|
| 215 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.2-6 |
---|
[5701] | 216 | - rebuild with python-2.7.2 |
---|
| 217 | |
---|
| 218 | |
---|
[2784] | 219 | * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4 |
---|
| 220 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
| 221 | |
---|
| 222 | * Wed Nov 17 2010 Dan Horák <dan[at]danny.cz> 0.7.2-3 |
---|
| 223 | - updated license for the php subpackage |
---|
| 224 | - run few tests |
---|
| 225 | |
---|
| 226 | * Sat May 29 2010 Dan Horák <dan[at]danny.cz> 0.7.2-2 |
---|
| 227 | - added language bindigs |
---|
| 228 | |
---|
| 229 | * Wed Feb 3 2010 Dan Horák <dan[at]danny.cz> 0.7.2-1 |
---|
| 230 | - initial Fedora version |
---|