/[packages]/cauldron/ogdi/current/SPECS/ogdi.spec
ViewVC logotype

Contents of /cauldron/ogdi/current/SPECS/ogdi.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 76965 - (show annotations) (download)
Thu Mar 24 15:58:22 2011 UTC (10 years, 7 months ago) by ennael
File size: 5843 byte(s)
clean spec file

1 # TODO: separate gltpd to -server package, add init script (requires portmap)
2
3 %define name ogdi
4 %define major 3
5 %define libname %mklibname %{name} %{major}
6 %define develname %mklibname -d %{name}
7
8 %define beta beta2
9
10 Summary: Open Geographic Datastore Interface
11 Name: %{name}
12 Version: 3.2.0
13 Release: %mkrel 0.%{beta}.2
14 License: BSD
15 Group: Sciences/Geosciences
16 URL: http://ogdi.sourceforge.net/
17 Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.%{beta}.tar.gz
18 Source1: http://ogdi.sourceforge.net/ogdi.pdf
19 Patch1: ogdi-3.2.0.beta2-fix-str-fmt.patch
20 BuildRequires: expat-devel
21 BuildRequires: proj-devel
22 BuildRequires: tcl-devel
23 BuildRequires: unixODBC-devel
24 BuildRequires: zlib-devel
25
26 %description
27 OGDI is the Open Geographic Datastore Interface. OGDI is an
28 application programming interface (API) that uses a standardized
29 access methods to work in conjunction with GIS software packages (the
30 application) and various geospatial data products. OGDI uses a
31 client/server architecture to facilitate the dissemination of
32 geospatial data products over any TCP/IP network, and a
33 driver-oriented approach to facilitate access to several geospatial
34 data products/formats.
35
36 %package -n %{libname}
37 Summary: Open Geographic Datastore Interface - library
38 License: BSD style
39 Group: Sciences/Geosciences
40
41 %description -n %{libname}
42 OGDI is the Open Geographic Datastore Interface. OGDI is an
43 application programming interface (API) that uses a standardized
44 access methods to work in conjunction with GIS software packages (the
45 application) and various geospatial data products. OGDI uses a
46 client/server architecture to facilitate the dissemination of
47 geospatial data products over any TCP/IP network, and a
48 driver-oriented approach to facilitate access to several geospatial
49 data products/formats.
50
51 This package contains just the library required by applications using the
52 Open Geographic Datastore Interface.
53
54 %package -n %{develname}
55 Summary: OGDI header files and documentation
56 Group: Sciences/Geosciences
57 Requires: %{libname} = %{version}-%{release}
58 Provides: %{name}-devel = %{version}-%{release}
59 Provides: lib%{name}-devel = %{version}-%{release}
60 #Manually provide these until library issues are resolved:
61 Provides: devel(libexpat_ogdi%{libminor})
62 Provides: devel(libogdi%{libminor})
63 Provides: devel(libzlib_ogdi%{libminor})
64
65 %description -n %{develname}
66 OGDI header files and developer's documentation.
67
68 %package odbc
69 Summary: ODBC driver for OGDI
70 Group: Sciences/Geosciences
71 Requires: %{name} = %{version}-%{release}
72
73 %description odbc
74 ODBC driver for OGDI.
75
76 %package -n tcl-ogdi
77 Summary: TCL wrapper for OGDI
78 Summary(pl): Interfejs TCL do OGDI
79 Group: Sciences/Geosciences
80 Requires: %{name} = %{version}-%{release}
81
82 %description -n tcl-ogdi
83 TCL wrapper for OGDI.
84
85 %prep
86
87 %setup -q -n %{name}-%{version}.%{beta}
88 #%patch0 -p1
89 %patch1 -p0
90
91 cp -f %{SOURCE1} .
92
93 %build
94
95 TOPDIR=`pwd`; TARGET=Linux; export TOPDIR TARGET
96 INST_LIB=%{_libdir}/;export INST_LIB
97 export CFG=debug # for -g
98
99 # do not compile with ssp. it will trigger internal bugs (to_fix_upstream)
100 OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g'`
101 export CFLAGS="$OPT_FLAGS -fPIC -DPIC -DDONT_TD_VOID -DUSE_TERMIO"
102
103 %configure2_5x \
104 --with-binconfigs \
105 --with-expat \
106 --with-proj \
107 --with-zlib
108
109 # use the generated .mak file ...
110 cp -af config/linux.mak{,.old}
111 cp -af config/{L,l}inux.mak
112
113 # make doesn't survive a parallell build, so stop that...
114 make
115
116 make -C ogdi/tcl_interface \
117 TCL_LINKLIB="-ltcl"
118
119 make -C contrib/gdal
120
121 make -C ogdi/attr_driver/odbc \
122 ODBC_LINKLIB="-lodbc"
123
124 %install
125 rm -rf %{buildroot}
126
127 # export env
128 TOPDIR=`pwd`; TARGET=Linux; export TOPDIR TARGET
129
130 %makeinstall \
131 INST_INCLUDE=%{buildroot}%{_includedir}/%{name} \
132 INST_LIB=%{buildroot}%{_libdir} \
133 INST_BIN=%{buildroot}%{_bindir}
134
135 #plugin install
136 %makeinstall -C ogdi/tcl_interface \
137 INST_LIB=%{buildroot}%{_libdir}
138 %makeinstall -C contrib/gdal \
139 INST_LIB=%{buildroot}%{_libdir}
140 %makeinstall -C ogdi/attr_driver/odbc \
141 INST_LIB=%{buildroot}%{_libdir}
142
143 # only lib*ogdi* is common library, the rest are dlopened drivers
144 #mv -f %{buildroot}%{_libdir}/ogdi/*ogdi*.so %{buildroot}%{_libdir}
145
146 # remove example binary
147 rm -rf %{buildroot}%{_bindir}/example?
148
149 # we have multilib ogdi-config
150 %if "%{_lib}" == "lib"
151 %define cpuarch 32
152 %else
153 %define cpuarch 64
154 %endif
155
156 # fix file(s) for multilib issue
157 touch -r ogdi-config.in ogdi-config
158
159 # install pkgconfig file and ogdi-config
160 mkdir -p %{buildroot}%{_libdir}/pkgconfig
161 install -p -m 644 ogdi.pc %{buildroot}%{_libdir}/pkgconfig/
162 install -p -m 755 ogdi-config %{buildroot}%{_bindir}/ogdi-config-%{cpuarch}
163 # ogdi-config wrapper for multiarch
164 cat > %{buildroot}%{_bindir}/%{name}-config <<EOF
165 #!/bin/bash
166
167 ARCH=\$(uname -m)
168 case \$ARCH in
169 x86_64 | ppc64 | ia64 | s390x | sparc64 | alpha | alphaev6 )
170 ogdi-config-64 \${*}
171 ;;
172 *)
173 ogdi-config-32 \${*}
174 ;;
175 esac
176 EOF
177 chmod 755 %{buildroot}%{_bindir}/%{name}-config
178 touch -r ogdi-config.in %{buildroot}%{_bindir}/%{name}-config
179
180 %clean
181 rm -rf %{buildroot}
182
183 %files
184 %defattr(-,root,root,-)
185 %doc LICENSE NEWS ChangeLog README
186 %{_bindir}/gltpd
187 %{_bindir}/ogdi_*
188 %dir %{_libdir}/ogdi
189 %exclude %{_libdir}/%{name}/liblodbc.so
190 %exclude %{_libdir}/%{name}/libecs_tcl.so
191 %{_libdir}/%{name}/lib*.so
192
193 %files -n %{libname}
194 %defattr(-,root,root)
195 %{_libdir}/libogdi.so.%{major}*
196
197 %files -n %{develname}
198 %defattr(-,root,root,-)
199 %doc ogdi.pdf
200 %doc ogdi/examples/example1/example1.c
201 %doc ogdi/examples/example2/example2.c
202 %{_bindir}/%{name}-config
203 %{_bindir}/%{name}-config-%{cpuarch}
204 %{_libdir}/pkgconfig/%{name}.pc
205 %dir %{_includedir}/%{name}
206 %{_includedir}/%{name}/*.h
207 %{_libdir}/libogdi.so
208 %files odbc
209
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_libdir}/ogdi/liblodbc.so
212
213 %files -n tcl-ogdi
214 %defattr(644,root,root,755)
215 %attr(755,root,root) %{_libdir}/ogdi/libecs_tcl.so
216
217
218

  ViewVC Help
Powered by ViewVC 1.1.28