source: projects/specs/trunk/lib/libd/libdmtx/libdmtx-vl.spec @ 8721

Revision 8721, 6.2 KB checked in by Takemikaduchi, 10 years ago (diff)

cinnamon-2.2.14, python-2.7.7, ImageMagick?-6.8.9.5

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