]> git.pld-linux.org Git - SPECS.git/blob - mapserver.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / mapserver.spec
1 #
2 # TODO:
3 # - add conditional builds for all mapscript variants
4 # - test php mapscript
5 # - fix perl mapscript
6 # - fix tcl mapscript
7 #
8 # Contitional build:
9 %bcond_with     ms_php                  # PHP mapscript module
10 %bcond_with     ms_perl                 # Perl mapscript module
11 %bcond_with     ms_tcl                  # Tcl mapscript module
12 #
13 #%%define       apxs    /usr/sbin/apxs1
14 Summary:        Web-enabled mapping application development
15 Summary(pl.UTF-8):      Generowanie map poprzez WWW
16 Name:           mapserver
17 Version:        7.6.1
18 Release:        0.1
19 License:        BSD-like
20 Group:          Applications
21 Source0:        http://download.osgeo.org/mapserver/%{name}-%{version}.tar.gz
22 # Source0-md5:  204ae6e90e25601656756b2e24a73f72
23 Patch1:         %{name}-fastcgi-cmake.patch
24 Patch2:         %{name}-fribidi-cmake.patch
25 URL:            http://mapserver.org/
26 BuildRequires:  rpmbuild(macros) >= 1.344
27 BuildRequires:  cmake
28 BuildRequires:  libjpeg-devel
29 BuildRequires:  libpng-devel
30 BuildRequires:  freetype-devel >= 2.0.0
31 BuildRequires:  gdal-devel >= 1.3.0
32 BuildRequires:  giflib-devel
33 BuildRequires:  fribidi-devel
34 BuildRequires:  harfbuzz-devel
35 BuildRequires:  proj-devel >= 4
36 BuildRequires:  fcgi-devel
37 %{?with_ms_php:BuildRequires:   php-devel}
38 %if %{with ms_perl}
39 BuildRequires:  perl-devel
40 BuildRequires:  swig-perl
41 %endif
42
43 #BuildRequires: apache-devel
44 #BuildRequires: bison
45 #BuildRequires: curl-devel >= 7.10.1
46 #BuildRequires: gd-devel >= 2.0.16
47 #BuildRequires: geos-devel >= 2.0.0
48 #BuildRequires: libtiff-devel
49 #BuildRequires: ming-devel
50 #BuildRequires: pdflib-devel
51 #BuildRequires: rpm-perlprov
52 #%{?with_ms_tcl:BuildRequires:  tcl-devel}
53 #BuildRequires: zlib-devel
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %description
57 MapServer is a CGI based Web mapping application development tool. It
58 processes user defined configuration files and templates to allow for
59 a wide variety of applications to be developed, including interactive
60 mapping, and spatial query definition and processing. It supports
61 several data formats. Key features include scale dependent map
62 rendering, automatic scalebar and legend building, feature labeling
63 with collision avoidance, logical and thematic classifications, and
64 on-the-fly projection of raster and vector data. The application can
65 also access other WMS servers as a cascading map server.
66
67 %description -l pl.UTF-8
68 MapServer to narzędzie do tworzenia aplikacji z mapami dostępnymi
69 przez WWW bazujących na CGI. Przetwarza zdefiniowane przez użytkownika
70 pliki konfiguracyjne i wzorce, pozwalając na tworzenie dużego zakresu
71 aplikacji, w tym interaktywne mapy oraz definicje i przetwarzanie
72 zapytań przestrzennych. Obsługuje kilka formatów danych. Podstawowe
73 możliwości to renderowanie map w zależności od skali, automatyczny
74 suwak skalujący i tworzenie legendy, nanoszenie nazw z unikaniem
75 kolizji, klasyfikacja logiczna i tematyczna oraz tworzone w locie
76 rzuty danych rastrowych i wektorowych. Aplikacja może także korzystać
77 z innych serwerów WMS jako kaskadowy serwer map.
78
79 %package devel
80 Summary:        MapServer development package
81 Summary(pl.UTF-8):      Pakiet programistyczny MapServer
82 Group:          Development/Libraries
83
84 %description devel
85 This package contains static library and header file for developing
86 programs that use libmap.
87
88 %description devel -l pl.UTF-8
89 Ten pakiet zawiera bibliotekę statyczną i plik nagłówkowy do tworzenia
90 programów używających libmap.
91
92 %package -n perl-mapscript
93 Summary:        Perl MapScript module
94 Summary(pl.UTF-8):      Moduł Perla MapScript
95 Group:          Development/Languages/Perl
96 #%requires_eq   perl
97
98 %description -n perl-mapscript
99 Perl MapScript module.
100
101 %description -n perl-mapscript -l pl.UTF-8
102 Moduł Perla MapScript.
103
104 %package -n php-mapscript
105 Summary:        MapScript module for PHP
106 Summary(pl.UTF-8):      Moduł MapScript dla PHP
107 Group:          Libraries
108 %{?requires_php_extension}
109 Requires:       php-common >= 4:5.0.4
110
111 %description -n php-mapscript
112 MapScript extension module for PHP.
113
114 %description -n php-mapscript -l pl.UTF-8
115 Moduł MapScript dla PHP.
116
117 %package -n tcl-mapscript
118 Summary:        Tcl MapScript module
119 Summary(pl.UTF-8):      Moduł Tcl MapScript
120 Group:          Development/Languages/Tcl
121
122 %description -n tcl-mapscript
123 Tcl MapScript module.
124
125 %description -n tcl-mapscript -l pl.UTF-8
126 Moduł Tcl MapScript.
127
128 %prep
129 %setup -q
130 %patch1 -p1
131 %patch2 -p1
132
133 %build
134
135 install -d build
136 cd build
137 %cmake \
138         -DINSTALL_LIB_DIR=%{_libdir} \
139         -DINSTALL_BIN_DIR=%{_bindir} \
140         -DINSTALL_INCLUDE_DIR=%{_includedir} \
141         -DWITH_PHP=0%{?with_ms_php:1} \
142         -DWITH_PERL=0%{?with_ms_perl:1} \
143         ../
144 %{__make}
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT
149
150 %{__make} -C build install \
151         DESTDIR=$RPM_BUILD_ROOT
152
153 %if %{with ms_php}
154 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
155 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/mapscript.ini
156 ; Enable mapscript extension module
157 extension=php_mapscript.so
158 EOF
159 %endif
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %post   -p /sbin/ldconfig
165 %postun -p /sbin/ldconfig
166
167 %post -n php-mapscript
168 %php_webserver_restart
169
170 %postun -n php-mapscript
171 if [ "$1" = 0 ]; then
172         %php_webserver_restart
173 fi
174
175 %files
176 %defattr(644,root,root,755)
177 %doc README.rst HISTORY.TXT
178 %attr(755,root,root) %{_bindir}/*
179 %attr(755,root,root) %{_libdir}/libmapserver.so.*.*.*
180 %ghost %{_libdir}/libmapserver.so.2
181
182 %files devel
183 %defattr(644,root,root,755)
184 %{_libdir}/libmapserver.so
185 %{_includedir}/mapserver
186 %dir %{_datadir}/mapserver
187 %{_datadir}/mapserver/cmake
188
189 %if %{with ms_perl}
190 %files -n perl-mapscript
191 %defattr(644,root,root,755)
192 %doc mapscript/perl/examples/*.pl
193 #%{perl_vendorarch}/mapscript.pm
194 #%dir %{perl_vendorarch}/auto/mapscript
195 #%{perl_vendorarch}/auto/mapscript/mapscript.bs
196 #%attr(755,root,root) %{perl_vendorarch}/auto/mapscript/mapscript.so
197 %endif
198
199 %if %{with ms_php}
200 %files -n php-mapscript
201 %defattr(644,root,root,755)
202 %doc mapscript/php/README mapscript/php/examples/*.phtml
203 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/mapscript.ini
204 %attr(755,root,root) %{php_extensiondir}/php_mapscript.so
205 %endif
206
207 %if %{with ms_tcl}
208 %files -n tcl-mapscript
209 %defattr(644,root,root,755)
210 %doc mapscript/tcl/README mapscript/tcl/examples/*.tcl
211 %dir %{_libdir}/MapscriptTcl1.1
212 %attr(755,root,root) %{_libdir}/MapscriptTcl1.1/*.so
213 %{_libdir}/MapscriptTcl1.1/*.tcl
214 %{_libdir}/MapscriptTcl1.1/*.html
215 %endif
This page took 0.136687 seconds and 3 git commands to generate.