BZ 910689: dependency on bitstream-vera-sans-fonts changed to dejavu-sans-fonts

- BZ 747421: Move CGI executable from /usr/sbin to /usr/libexec
This commit is contained in:
Pavel Lisý 2013-05-20 10:52:42 +02:00
parent 346c8c8730
commit 47d9b57bff

View File

@ -1,18 +1,22 @@
Name: mapserver
%define MS_REL %{nil}
Name: mapserver%{MS_REL}
Version: 6.0.3
Release: 6%{?dist}
Summary: Environment for building spatially-enabled internet applications
Group: Development/Tools
License: BSD
URL: http://www.mapserver.org
Source: http://download.osgeo.org/mapserver/mapserver-%{version}.tar.gz
Source: http://download.osgeo.org/mapserver/mapserver-%{version}.tar.gz
Patch0: mapserver-6.0.3-for-swig_2.0.4_up.patch
Patch1: mapserver-6.0.3-php4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: httpd
Requires: bitstream-vera-sans-fonts
Requires: dejavu-sans-fonts
BuildRequires: libXpm-devel readline-devel
BuildRequires: httpd-devel php-devel libxslt-devel pam-devel fcgi-devel
@ -33,12 +37,12 @@ map images in real time. With appropriate interface pages,
Mapserver can provide an interactive internet map based on
custom GIS data.
%package -n php-mapserver
%package -n php-%{name}
Summary: PHP/Mapscript map making extensions to PHP
Group: Development/Languages
Requires: httpd php-gd
%description -n php-mapserver
%description -n php-%{name}
The PHP/Mapscript extension provides full map customization capabilities within
the PHP scripting language.
@ -96,8 +100,8 @@ chmod -x mapscript/php/README
rm -rf tests/vera/Vera.ttf
rm -rf tests/vera/VeraBd.ttf
pushd tests/vera/
ln -sf /usr/share/fonts/bitstream-vera/Vera.ttf Vera.ttf
ln -sf /usr/share/fonts/bitstream-vera/VeraBd.ttf VeraBd.ttf
ln -sf /usr/share/fonts/dejavu/DejaVuSans.ttf Vera.ttf
ln -sf /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf VeraBd.ttf
popd
%build
@ -152,37 +156,48 @@ done
# WARNING !!!
# using %{?_smp_mflags} may break build
make
# build perl
cd mapscript/perl
pushd mapscript/perl
perl Makefile.PL
make
make DESTDIR=%{buildroot} pure_vendor_install
popd
# build python
cd ../python
pushd mapscript/python
python setup.py build
popd
# # build java
# cd ../java
# pushd mapscript/java
# make interface JAVA_HOME=/etc/alternatives/java_sdk
# make JAVA_HOME=/etc/alternatives/java_sdk
# popd
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_sbindir}
mkdir -p %{buildroot}%{_libexecdir}
mkdir -p %{buildroot}/%{_sysconfdir}/php.d
mkdir -p %{buildroot}%{_libdir}/php/modules
mkdir -p %{buildroot}/%{_bindir}
install -p -m 755 mapserv %{buildroot}/%{_sbindir}
install -p -m 755 shp2img %{buildroot}/%{_bindir}
install -p -m 755 shptree %{buildroot}/%{_bindir}
install -p -m 755 sortshp %{buildroot}/%{_bindir}
install -p -m 755 tile4ms %{buildroot}/%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
install -p -m 755 mapserv %{buildroot}%{_libexecdir}/mapserv%{MS_REL}
install -p -m 755 legend %{buildroot}/%{_bindir}/legend%{MS_REL}
install -p -m 755 msencrypt %{buildroot}/%{_bindir}/msencrypt%{MS_REL}
install -p -m 755 scalebar %{buildroot}/%{_bindir}/scalebar%{MS_REL}
install -p -m 755 shp2img %{buildroot}/%{_bindir}/shp2img%{MS_REL}
install -p -m 755 shptree %{buildroot}/%{_bindir}/shptree%{MS_REL}
install -p -m 755 shptreetst %{buildroot}/%{_bindir}/shptreetst%{MS_REL}
install -p -m 755 shptreevis %{buildroot}/%{_bindir}/shptreevis%{MS_REL}
install -p -m 755 sortshp %{buildroot}/%{_bindir}/sortshp%{MS_REL}
install -p -m 755 tile4ms %{buildroot}/%{_bindir}/tile4ms%{MS_REL}
install -p -m 755 mapscript/php/php_mapscript.so %{buildroot}/%{_libdir}/php/modules/
install -p -m 644 xmlmapfile/mapfile.xsd %{buildroot}%{_datadir}/%{name}
install -p -m 644 xmlmapfile/mapfile.xsl %{buildroot}%{_datadir}/%{name}
install -p -m 755 mapscript/php/php_mapscript.so %{buildroot}/%{_libdir}/php/modules/php_mapscript%{MS_REL}.so
# install perl module
pushd mapscript/perl
@ -196,13 +211,14 @@ popd
# # install java
# mkdir -p %{buildroot}%{_javadir}
# install -p -m 644 mapscript/java/mapscript.jar %{buildroot}%{_javadir}/
# install -p -m 644 mapscript/java/mapscript%{MS_REL}.jar %{buildroot}%{_javadir}/
# install -p -m 755 mapscript/java/.libs/libjavamapscript-%{version}.so %{buildroot}%{_libdir}/
# install php config file
mkdir -p %{buildroot}%{_sysconfdir}/php.d/
cat > %{buildroot}%{_sysconfdir}/php.d/%{name}.ini <<EOF
; Enable %{name} extension module
extension=php_mapscript.so
extension=php_mapscript%{MS_REL}.so
EOF
# cleanup junks
@ -211,7 +227,7 @@ find %{buildroot} -name "$junk" -exec rm -rf '{}' \;
done
# fix some exec bits
chmod 755 %{buildroot}/%{perl_vendorarch}/auto/mapscript/mapscript.so
chmod 755 %{buildroot}/%{perl_vendorarch}/auto/mapscript%{MS_REL}/mapscript%{MS_REL}.so
%clean
rm -rf %{buildroot}
@ -222,25 +238,33 @@ rm -rf %{buildroot}
%doc INSTALL MIGRATION_GUIDE.txt
%doc symbols tests
%doc fonts
%{_bindir}/shp2img
%{_bindir}/shptree
%{_bindir}/sortshp
%{_bindir}/tile4ms
%{_sbindir}/mapserv
/%{_bindir}/legend%{MS_REL}
/%{_bindir}/msencrypt%{MS_REL}
/%{_bindir}/scalebar%{MS_REL}
/%{_bindir}/shp2img%{MS_REL}
/%{_bindir}/shptree%{MS_REL}
/%{_bindir}/shptreetst%{MS_REL}
/%{_bindir}/shptreevis%{MS_REL}
/%{_bindir}/sortshp%{MS_REL}
/%{_bindir}/tile4ms%{MS_REL}
%{_libexecdir}/mapserv%{MS_REL}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%files -n php-mapserver
%files -n php-%{name}
%defattr(-,root,root)
%doc mapscript/php/README
%doc mapscript/php/examples
%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini
%{_libdir}/php/modules/php_mapscript.so
%{_libdir}/php/modules/php_mapscript%{MS_REL}.so
%files perl
%defattr(-,root,root)
%doc mapscript/perl/examples
%dir %{perl_vendorarch}/auto/mapscript
%{perl_vendorarch}/auto/mapscript/*
%{perl_vendorarch}/mapscript.pm
%dir %{perl_vendorarch}/auto/mapscript%{MS_REL}
%{perl_vendorarch}/auto/mapscript%{MS_REL}/*
%{perl_vendorarch}/mapscript%{MS_REL}.pm
%files python
%defattr(-,root,root)
@ -257,6 +281,10 @@ rm -rf %{buildroot}
# %{_javadir}/*.jar
%changelog
* Mon May 20 2013 Pavel Lisý <pali@fedoraproject.org> - 6.0.3-7
- BZ 910689: dependency on bitstream-vera-sans-fonts changed to dejavu-sans-fonts
- BZ 747421: Move CGI executable from /usr/sbin to /usr/libexec
* Tue Oct 16 2012 Pavel Lisý <pali@fedoraproject.org> - 6.0.3-6
- temporary removed mapserver-java (mapscript) due to build problem
with jdk7