source: projects/specs/branches/6/lib/libd/libdmtx/libdmtx-vl.spec @ 2784

Revision 2784, 5.5 KB checked in by inagaki, 13 years ago (diff)

upload: avogadro, eet, kdeaccessibility
NEW: libdmtx, libeina

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:        5%{?_dist_release}
10
11Group:          System Environment/Libraries
12License:        LGPLv2+
13URL:            http://www.libdmtx.org/
14Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
15BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16
17BuildRequires:  ImageMagick-devel
18# required for tests
19BuildRequires:  SDL_image-devel
20BuildRequires:  libGLU-devel
21BuildRequires:  libpng-devel
22# language bindings
23BuildRequires:  php5-devel
24BuildRequires:  python-devel
25BuildRequires:  ruby
26BuildRequires:  ruby-devel
27#BuildRequires:  java-1.6.0-devel
28
29
30%description
31libdmtx is open source software for reading and writing Data Matrix 2D
32bar-codes on Linux, Unix, OS X, Windows, and mobile devices. At its core
33libdmtx is a shared library, allowing C/C++ programs to use its capabilities
34without restrictions or overhead.
35
36The included utility programs, dmtxread and dmtxwrite, provide the official
37interface to libdmtx from the command line, and also serve as a good reference
38for programmers who wish to write their own programs that interact with
39libdmtx. All of the software in the libdmtx package is distributed under
40the LGPLv2 and can be used freely under these terms.
41
42
43%package        devel
44Summary:        Development files for %{name}
45Group:          Development/Libraries
46Requires:       %{name} = %{version}-%{release}
47
48%description    devel
49The %{name}-devel package contains libraries and header files for
50developing applications that use %{name}.
51
52
53%package        utils
54Summary:        Utilities for %{name}
55Group:          Applications/System
56Requires:       %{name} = %{version}-%{release}
57
58%description    utils
59The %{name}-utils package contains utilities that use %{name}.
60
61# language bindings
62%package -n     php-libdmtx
63Summary:        PHP bindings for %{name}
64Group:          System Environment/Libraries
65License:        GPLv2+
66Requires:       %{name} = %{version}-%{release}
67Requires:       php5
68
69%description -n php-libdmtx
70The php-%{name} package contains bindings for using %{name} from PHP.
71
72%package -n     python-libdmtx
73Summary:        Python bindings for %{name}
74Group:          System Environment/Libraries
75Requires:       %{name} = %{version}-%{release}
76
77%description -n python-libdmtx
78The python-%{name} package contains bindings for using %{name} from Python.
79
80%package -n     ruby-libdmtx
81Summary:        Ruby bindings for %{name}
82Group:          System Environment/Libraries
83Requires:       %{name} = %{version}-%{release}
84Provides:       ruby(%{name}) = %{version}
85
86%description -n ruby-libdmtx
87The ruby-%{name} package contains bindings for using %{name} from Ruby.
88
89
90%prep
91%setup -q
92
93# fix permissions
94chmod a-x wrapper/{php,python}/README
95
96
97%build
98%configure --disable-static
99make %{?_smp_mflags}
100
101# temporary installation required by the language wrappers
102make install DESTDIR=/tmp
103
104# language wrappers must be built separately
105pushd wrapper
106pushd php
107phpize
108%configure --disable-static
109
110# Don't use rpath!
111sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
112sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
113
114make EXTRA_CFLAGS="-I/tmp%{_includedir}" DMTX_SHARED_LIBADD="-L/tmp%{_libdir} -ldmtx"
115popd
116
117pushd python
118# fix paths
119sed -i.orig -e "s|/usr/local/include|/tmp%{_includedir}|" -e "s|/usr/local/lib|/tmp%{_libdir}|" setup.py
120python setup.py build
121chmod 0755 build/lib.*/*.so
122popd
123
124pushd ruby
125ruby extconf.rb
126make CPPFLAGS="-I/tmp%{_includedir}" LIBPATH="-L/tmp%{_libdir} -ldmtx"
127popd
128
129#pushd java
130#make LIBDMTX_LA="/tmp%{_libdir}/libdmtx.so"
131#popd
132popd
133
134
135%install
136rm -rf $RPM_BUILD_ROOT
137make install DESTDIR=$RPM_BUILD_ROOT
138find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
139
140pushd wrapper
141pushd php
142make install INSTALL_ROOT=$RPM_BUILD_ROOT
143popd
144
145pushd python
146python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
147popd
148
149pushd ruby
150make install RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_arch}
151popd
152
153#pushd java
154#popd
155popd
156
157
158%check
159make check
160pushd test
161for t in simple unit
162do
163    ./${t}_test/${t}_test
164done
165popd
166
167
168%clean
169rm -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
212* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4
213- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
214
215* Wed Nov 17 2010 Dan Horák <dan[at]danny.cz> 0.7.2-3
216- updated license for the php subpackage
217- run few tests
218
219* Sat May 29 2010 Dan Horák <dan[at]danny.cz> 0.7.2-2
220- added language bindigs
221
222* Wed Feb  3 2010 Dan Horák <dan[at]danny.cz> 0.7.2-1
223- initial Fedora version
Note: See TracBrowser for help on using the repository browser.