tomh / rpms / postgis

Forked from rpms/postgis 4 years ago
Clone
a628dc6
%{!?javabuild:%define	javabuild 1}
a628dc6
%{!?utils:%define	utils 1}
a628dc6
%{!?gcj_support:%define	gcj_support 1}
a628dc6
a628dc6
Summary:	Geographic Information Systems Extensions to PostgreSQL
a628dc6
Name:		postgis
50ceeae
Version:	1.3.5
b98c52f
Release:	1%{?dist}
dfb512a
License:	GPLv2+
a628dc6
Group:		Applications/Databases
a628dc6
Source0:	http://postgis.refractions.net/download/%{name}-%{version}.tar.gz
a628dc6
Source4:	filter-requires-perl-Pg.sh
a628dc6
URL:		http://postgis.refractions.net/
a628dc6
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a628dc6
df472e4
BuildRequires:	postgresql-devel, proj-devel, geos-devel, byacc, proj-devel, flex, sinjdoc, java, java-devel, ant
282b705
a628dc6
Requires:	postgresql, geos, proj
a628dc6
a628dc6
%description
a628dc6
PostGIS adds support for geographic objects to the PostgreSQL object-relational
a628dc6
database. In effect, PostGIS "spatially enables" the PostgreSQL server,
a628dc6
allowing it to be used as a backend spatial database for geographic information
a628dc6
systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS 
a628dc6
follows the OpenGIS "Simple Features Specification for SQL" and has been 
a628dc6
certified as compliant with the "Types and Functions" profile.
a628dc6
a628dc6
%if %javabuild
a628dc6
%package jdbc
a628dc6
Summary:	The JDBC driver for PostGIS
a628dc6
Group:		Applications/Databases
dfb512a
License:	LGPLv2+
7c4834e
Requires:	%{name} = %{version}-%{release}, postgresql-jdbc
282b705
BuildRequires:  ant >= 0:1.6.2, junit >= 0:3.7, postgresql-jdbc
a628dc6
a628dc6
%if %{gcj_support}
a628dc6
BuildRequires:		gcc-java
df472e4
Requires(post):		%{_bindir}/rebuild-gcj-db
df472e4
Requires(postun):	%{_bindir}/rebuild-gcj-db
a628dc6
%endif
a628dc6
a628dc6
%description jdbc
a628dc6
The postgis-jdbc package provides the essential jdbc driver for PostGIS.
a628dc6
%endif
a628dc6
a628dc6
%if %utils
a628dc6
%package utils
a628dc6
Summary:	The utils for PostGIS
a628dc6
Group:		Applications/Databases
a628dc6
Requires:	%{name} = %{version}-%{release}, perl-DBD-Pg
a628dc6
a628dc6
%description utils
a628dc6
The postgis-utils package provides the utilities for PostGIS.
a628dc6
%endif
a628dc6
a628dc6
%define __perl_requires %{SOURCE4}
a628dc6
a628dc6
%prep
a628dc6
%setup -q
a628dc6
a628dc6
%build
a628dc6
%configure 
a628dc6
make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so"
a628dc6
a628dc6
%if %javabuild
df472e4
export BUILDXML_DIR=%{_builddir}/%{name}-%{version}/java/jdbc
ecf93b6
JDBC_VERSION_RPM=`rpm -ql postgresql-jdbc| grep 'jdbc2.jar$'|awk -F '/' '{print $5}'`
df472e4
sed 's/postgresql.jar/'${JDBC_VERSION_RPM}'/g' $BUILDXML_DIR/build.xml > $BUILDXML_DIR/build.xml.new
df472e4
mv -f $BUILDXML_DIR/build.xml.new $BUILDXML_DIR/build.xml
df472e4
pushd java/jdbc
df472e4
ant
df472e4
popd
a628dc6
%endif
a628dc6
a628dc6
%if %utils
a628dc6
 make -C utils
a628dc6
%endif
a628dc6
a628dc6
%install
a628dc6
rm -rf %{buildroot}
a628dc6
make install DESTDIR=%{buildroot}
a628dc6
install -d %{buildroot}%{_libdir}/pgsql/
a628dc6
install lwgeom/liblwgeom.so* %{buildroot}%{_libdir}/pgsql/
ecf93b6
install lwgeom/postgis.so* %{buildroot}%{_libdir}/pgsql/
a628dc6
install -d  %{buildroot}%{_datadir}/pgsql/contrib/
a628dc6
install -m 644 *.sql %{buildroot}%{_datadir}/pgsql/contrib/
a628dc6
rm -f  %{buildroot}%{_libdir}/liblwgeom.so*
a628dc6
rm -f  %{buildroot}%{_datadir}/*.sql
a628dc6
e5c9330
if [ "%{_libdir}" = "/usr/lib64" ] ; then
e5c9330
	mv %{buildroot}%{_datadir}/pgsql/contrib/lwpostgis.sql %{buildroot}%{_datadir}/pgsql/contrib/lwpostgis-64.sql
e5c9330
	mv %{buildroot}%{_datadir}/pgsql/contrib/lwpostgis_upgrade.sql %{buildroot}%{_datadir}/pgsql/contrib/lwpostgis_upgrade-64.sql
e5c9330
fi
e5c9330
a628dc6
%if %javabuild
a628dc6
install -d %{buildroot}%{_javadir}
a628dc6
install -m 755 java/jdbc/%{name}_%{version}.jar %{buildroot}%{_javadir}
a628dc6
%if %{gcj_support}
a628dc6
aot-compile-rpm
a628dc6
%endif
a628dc6
strip %{buildroot}/%{_libdir}/gcj/%{name}/*.jar.so
7c4834e
%endif
a628dc6
a628dc6
%if %utils
a628dc6
install -d %{buildroot}%{_datadir}/%{name}
a628dc6
install -m 644 utils/*.pl %{buildroot}%{_datadir}/%{name}
a628dc6
%endif
a628dc6
a628dc6
%clean
a628dc6
rm -rf %{buildroot}
a628dc6
7c4834e
%if %javabuild
7c4834e
%if %gcj_support
a628dc6
%post -p %{_bindir}/rebuild-gcj-db
a628dc6
%postun -p %{_bindir}/rebuild-gcj-db
7c4834e
%endif
7c4834e
%endif
a628dc6
a628dc6
%files
a628dc6
%defattr(-,root,root)
5c2a481
%doc COPYING CREDITS NEWS TODO README.%{name} doc/html loader/README.* doc/%{name}.xml  doc/ZMSgeoms.txt 
a628dc6
%attr(755,root,root) %{_bindir}/*
ecf93b6
%attr(755,root,root) %{_libdir}/pgsql/postgis.so*
a628dc6
%attr(755,root,root) %{_libdir}/pgsql/liblwgeom.so*
a628dc6
%{_datadir}/pgsql/contrib/*.sql
a628dc6
a628dc6
%if %javabuild
a628dc6
%files jdbc
a628dc6
%defattr(-,root,root)
a628dc6
%doc java/jdbc/COPYING_LGPL java/jdbc/README
a628dc6
%attr(755,root,root) %{_javadir}/%{name}_%{version}.jar
a628dc6
%if %{gcj_support}
a628dc6
%dir %{_libdir}/gcj/%{name}
a628dc6
%{_libdir}/gcj/%{name}/*.jar.so
a628dc6
%{_libdir}/gcj/%{name}/*.jar.db
a628dc6
%endif
a628dc6
%endif
a628dc6
a628dc6
%if %utils
a628dc6
%files utils
a628dc6
%defattr(-,root,root)
a628dc6
%doc utils/README
a628dc6
%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl
a628dc6
%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl
a628dc6
%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl
a628dc6
%attr(644,root,root) %{_datadir}/%{name}/create_undef.pl
a628dc6
%attr(644,root,root) %{_datadir}/%{name}/%{name}_proc_upgrade.pl
a628dc6
%attr(644,root,root) %{_datadir}/%{name}/%{name}_restore.pl
a628dc6
%endif
a628dc6
a628dc6
%changelog
50ceeae
* Tue Dec 16 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.5-1
50ceeae
- Update to 1.3.5
50ceeae
b98c52f
* Sat Nov 29 2008 Devrim GUNDUZ <devrim@gunduz.org> - 1.3.4-1
b98c52f
- Update to 1.3.4
b98c52f
e5c9330
* Mon Aug 11 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.3-4
e5c9330
- Fix #451387. Patch from Toshio.
e5c9330
0dc46a9
* Thu Jun 26 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.3-3
0dc46a9
- Rebuilt against geos 3.0.0
0dc46a9
dfb512a
* Thu May 29 2008 Todd Zullinger <tmz@pobox.com> - 1.3.3-2
dfb512a
- fix license tags
dfb512a
67455b4
* Sun Apr 13 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.3-1
67455b4
- Update to 1.3.3
67455b4
7618718
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.3.2-3.1
7618718
- Autorebuild for GCC 4.3
7618718
ffbfe87
* Mon Jan 21 2008 - Devrim GUNDUZ <devrim@commandprompt.com> 1.3.2-2.1
ffbfe87
- Rebuilt against PostgreSQL 8.3
ffbfe87
df472e4
* Sat Jan 5 2008 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.2-2
df472e4
- Various fixes from Mark Cave-Ayland
df472e4
- Removed patch2: template_gis is no longer built by default.
df472e4
- Removed patch0: Building the JDBC driver using make is now deprecated
df472e4
- Build JDBC driver using ant, rather than make.
df472e4
282b705
* Thu Dec 6 2007 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.2-1
282b705
- Update to 1.3.2
282b705
- Updated patch2
282b705
282b705
* Wed Nov 21 2007 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.1-2
282b705
- Move postgresql-jdbc dependency to the correct place, per Rob Nagler.
282b705
c45955d
* Tue Oct 16 2007 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.1-1
c45955d
- Update to 1.3.1
c45955d
- Updated patch2
c45955d
d967d46
* Tue Aug 28 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.2.1-3
d967d46
- Rebuild for selinux ppc32 issue.
d967d46
5c2a481
* Mon Jul 2 2007 - Devrim GUNDUZ <devrim@commandprompt.com> 1.2.1-2
c59502b
- Fix build problems (removed template_gis, per discussion with upstream).
5c2a481
7c4834e
* Mon Feb 19 2007 - Devrim GUNDUZ <devrim@commandprompt.com> 1.2.1-1
7c4834e
- Update to 1.2.1
7c4834e
- Removed configure patch (it is in the upstream now)
5c2a481
- Added postgresql-jdbc as as dependency to -jdbc package, per Guillaume
7c4834e
- move strip to correct place, per Guillaume
7c4834e
- Fix long-standing post/postun problem, per Guillaume
7c4834e
ecf93b6
* Wed Jan 3 2007 - Devrim GUNDUZ <devrim@commandprompt.com> 1.2.0-4
ecf93b6
- Added postgis.so among installed files, per Jon Burgess.
ecf93b6
- Fix jdbc jar dedection problem
ecf93b6
a628dc6
* Wed Dec 27 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.2.0-3
a628dc6
- Fix Requires for subpackages per bugzilla review #220743
a628dc6
a628dc6
* Mon Dec 26 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.2.0-2
a628dc6
- More spec file fixes per bugzilla review #220743
a628dc6
a628dc6
* Mon Dec 25 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.2.0-1
a628dc6
- Initial submission for Fedora Core Extras
a628dc6
- Spec file changes and fixes per FC Extras packaging guidelines
a628dc6
a628dc6
* Fri Jun 23 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.1.2-2
a628dc6
- Update to 1.1.2
a628dc6
a628dc6
* Tue Dec 22 2005 - Devrim GUNDUZ <devrim@commandprompt.com> 1.1.0-2
a628dc6
- Final fixes for 1.1.0
a628dc6
a628dc6
* Tue Dec 06 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- Update to 1.1.0
a628dc6
a628dc6
* Mon Oct 03 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- Make PostGIS build against pgxs so that we don't need PostgreSQL sources.
a628dc6
- Fixed all build errors except jdbc (so, defaulted to 0)
a628dc6
- Added new files under %%utils
a628dc6
- Removed postgis-jdbc2-makefile.patch (applied to -head)
a628dc6
                                                                                                    
a628dc6
* Tue Sep 27 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- Update to 1.0.4
a628dc6
a628dc6
* Sun Apr 20 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- 1.0.0 Gold
a628dc6
a628dc6
* Sun Apr 17 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- Modified the spec file so that we can build JDBC2 RPMs...
a628dc6
- Added -utils RPM to package list.
a628dc6
a628dc6
* Fri Apr 15 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- Added preun and postun scripts.
a628dc6
a628dc6
* Sat Apr 09 2005 - Devrim GUNDUZ <devrim@gunduz.org>
a628dc6
- Initial RPM build
a628dc6
- Fixed libdir so that PostgreSQL installations will not complain about it.
a628dc6
- Enabled --with-geos and modified the old spec.