]> git.pld-linux.org Git - packages/geos.git/blob - geos.spec
- added ruby bcond
[packages/geos.git] / geos.spec
1 # Conditional build:
2 %bcond_without ruby # build without ruby
3 #
4 Summary:        Geometry Engine - Open Source
5 Summary(pl.UTF-8):      GEOS - silnik geometryczny z otwartymi źródłami
6 Name:           geos
7 Version:        2.2.3
8 Release:        2
9 License:        LGPL
10 Group:          Libraries
11 Source0:        http://geos.refractions.net/%{name}-%{version}.tar.bz2
12 # Source0-md5:  440be2b11fd3d711e950a47ea6f1b424
13 Patch0:         %{name}-swig.patch
14 URL:            http://geos.refractions.net/
15 BuildRequires:  automake
16 BuildRequires:  libstdc++-devel
17 BuildRequires:  python >= 1:2.5
18 BuildRequires:  python-devel >= 1:2.5
19 BuildRequires:  rpm-pythonprov
20 %{?with_ruby:BuildRequires:     ruby-devel}
21 BuildRequires:  swig-python >= 1.3.29
22 %{?with_ruby:BuildRequires:     swig-ruby >= 1.3.29}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 GEOS (Geometry Engine - Open Source) is a C++ port of the Java
27 Topology Suite (JTS). As such, it aims to contain the complete
28 functionality of JTS in C++. This includes all the OpenGIS "Simple
29 Features for SQL" spatial predicate functions and spatial operators,
30 as well as specific JTS topology functions such as IsValid().
31
32 %description -l pl.UTF-8
33 GEOS (Geometry Engine - Open Source, czyli silnik geometryczny z
34 otwartymi źródłami) to port C++ biblioteki Java Topology Suite (JTS).
35 Celem biblioteki jako takiej jest implementacja pełnej funkcjonalności
36 JTS w C++. Obejmuje to wszystkie funkcje predykatów przestrzennych
37 wg "Simple Features for SQL" OpenGIS oraz operatory przestrzenne, a
38 także specyficzne dla JTS funkcje topologiczne takie jak IsValid().
39
40 %package devel
41 Summary:        Header files for GEOS library
42 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki GEOS
43 Group:          Development/Libraries
44 Requires:       %{name} = %{version}-%{release}
45 Requires:       libstdc++-devel
46
47 %description devel
48 Header files for GEOS library.
49
50 %description devel -l pl.UTF-8
51 Pliki nagłówkowe biblioteki GEOS.
52
53 %package static
54 Summary:        Static GEOS library
55 Summary(pl.UTF-8):      Statyczna biblioteka GEOS
56 Group:          Development/Libraries
57 Requires:       %{name}-devel = %{version}-%{release}
58
59 %description static
60 Static GEOS library.
61
62 %description static -l pl.UTF-8
63 Statyczna biblioteka GEOS.
64
65 %package -n python-geos
66 Summary:        Python bindings for Geometry Engine - Open Source
67 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki GEOS
68 Group:          Development/Languages/Python
69 Requires:       %{name} = %{version}-%{release}
70
71 %description -n python-geos
72 Python bindings for Geometry Engine - Open Source.
73
74 %description -n python-geos -l pl.UTF-8
75 Wiązania Pythona do biblioteki GEOS.
76
77 %package -n ruby-geos
78 Summary:        Ruby bindings for Geometry Engine - Open Source
79 Summary(pl.UTF-8):      Wiązania języka Ruby do biblioteki GEOS
80 Group:          Development/Languages/Python
81 Requires:       %{name} = %{version}-%{release}
82
83 %description -n ruby-geos
84 Ruby bindings for Geometry Engine - Open Source.
85
86 %description -n ruby-geos -l pl.UTF-8
87 Wiązania języka Ruby do biblioteki GEOS.
88
89 %prep
90 %setup -q
91 %patch0 -p1
92
93 %build
94 cp -f /usr/share/automake/config.* .
95 %configure
96 %{__make} \
97         pkglibdir=%{_libdir}
98
99 cd swig/python
100 swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
101 python setup.py build
102
103 %if %{with ruby}
104 cd ../ruby
105 swig -c++ -ruby -autorename -o geos_wrap.cxx ../geos.i
106 %{__cxx} %{rpmcxxflags} -I../../source/headers -I%{ruby_archdir} -c geos_wrap.cxx
107 %{__cxx} -shared -o geos.so geos_wrap.o -lruby -L../../source/geom/.libs -lgeos
108 %endif
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT \
115         pkglibdir=%{_libdir}
116
117 cd swig
118 %if %{with ruby}
119 install -D ruby/geos.so $RPM_BUILD_ROOT%{ruby_archdir}/geos.so
120 %endif
121
122 cd python
123 python setup.py install \
124         --optimize=2 \
125         --root=$RPM_BUILD_ROOT
126
127 %py_postclean
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post   -p /sbin/ldconfig
133 %postun -p /sbin/ldconfig
134
135 %files
136 %defattr(644,root,root,755)
137 %doc AUTHORS ChangeLog NEWS README TODO
138 %attr(755,root,root) %{_libdir}/libgeos.so.*.*.*
139 %attr(755,root,root) %{_libdir}/libgeos_c.so.*.*.*
140
141 %files devel
142 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_bindir}/geos-config
144 %attr(755,root,root) %{_libdir}/libgeos.so
145 %attr(755,root,root) %{_libdir}/libgeos_c.so
146 %{_libdir}/libgeos.la
147 %{_libdir}/libgeos_c.la
148 %{_includedir}/geos
149 %{_includedir}/geos.h
150 %{_includedir}/geos_c.h
151
152 %files static
153 %defattr(644,root,root,755)
154 %{_libdir}/libgeos.a
155 %{_libdir}/libgeos_c.a
156
157 %files -n python-geos
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{py_sitedir}/_geos.so
160 %{py_sitedir}/geos.py[co]
161 %{py_sitedir}/PyGEOS-*.egg-info
162
163 %if %{with ruby}
164 %files -n ruby-geos
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{ruby_archdir}/geos.so
167 %endif
This page took 0.072242 seconds and 3 git commands to generate.