pkubat / rpms / postgis

Forked from rpms/postgis 5 years ago
Clone
a628dc6
%{!?javabuild:%define	javabuild 1}
a628dc6
%{!?utils:%define	utils 1}
a628dc6
%{!?gcj_support:%define	gcj_support 1}
a628dc6
4f6415f
%global majorversion 1.5
4f6415f
a628dc6
Summary:	Geographic Information Systems Extensions to PostgreSQL
a628dc6
Name:		postgis
ec19fb7
Version:	1.5.0
fbae717
Release:	rc2_1%{?dist}
dfb512a
License:	GPLv2+
a628dc6
Group:		Applications/Databases
fbae717
Source0:	http://postgis.refractions.net/download/%{name}-%{version}rc2.tar.gz
fbae717
Source2:	http://www.postgis.org/download/%{name}-%{version}rc2.pdf
a628dc6
Source4:	filter-requires-perl-Pg.sh
a628dc6
URL:		http://postgis.refractions.net/
a628dc6
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a628dc6
54ac7f1
BuildRequires:	postgresql-devel >= 8.2, proj-devel, geos-devel >= 3.1.1, byacc, proj-devel, flex, sinjdoc, java, java-devel, ant
d127e95
BuildRequires:	gtk2-devel, libxml2-devel
54ac7f1
Requires:	postgresql >= 8.2, geos >= 3.1.1, 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
8efcdc5
%package docs
8efcdc5
Summary:	Extra documentation for PostGIS
8efcdc5
Group:		Applications/Databases
8efcdc5
%description docs
8efcdc5
The postgis-docs package includes PDF documentation of PostGIS.
8efcdc5
a628dc6
%if %javabuild
a628dc6
%package jdbc
a628dc6
Summary:	The JDBC driver for PostGIS
a628dc6
Group:		Applications/Databases
dfb512a
License:	LGPLv2+
5a1b740
Requires:	%{name} = %{version}-%{release}, postgresql-jdbc
ec19fb7
BuildRequires:	ant >= 0:1.6.2, junit >= 0:3.7, postgresql-jdbc
a628dc6
a628dc6
%if %{gcj_support}
a628dc6
BuildRequires:		gcc-java
3a86df9
BuildRequires:		java-1.5.0-gcj-devel
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
5a1b740
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
fbae717
%setup -q -n %{name}-%{version}rc2
8efcdc5
# Copy .pdf file to top directory before installing.
8efcdc5
cp -p %{SOURCE2} .
a628dc6
a628dc6
%build
e143cfd
%configure --with-gui
826edaf
#make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so"
826edaf
make LPATH=`pg_config --pkglibdir` shlib="%{name}.so"
a628dc6
a628dc6
%if %javabuild
fbae717
export BUILDXML_DIR=%{_builddir}/%{name}-%{version}rc2/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 -d  %{buildroot}%{_datadir}/pgsql/contrib/
a628dc6
install -m 644 *.sql %{buildroot}%{_datadir}/pgsql/contrib/
ec19fb7
install -m 755 loader/shp2pgsql loader/shp2pgsql-gui %{buildroot}%{_bindir}/
a628dc6
rm -f  %{buildroot}%{_datadir}/*.sql
a628dc6
e5c9330
if [ "%{_libdir}" = "/usr/lib64" ] ; then
4f6415f
	mv %{buildroot}%{_datadir}/pgsql/contrib/%{name}-%{majorversion}/postgis.sql %{buildroot}%{_datadir}/pgsql/contrib/postgis-64.sql
4f6415f
	mv %{buildroot}%{_datadir}/pgsql/contrib/%{name}-%{majorversion}/postgis_upgrade_13_to_15.sql %{buildroot}%{_datadir}/pgsql/contrib/%{name}-%{majorversion}/postgis_upgrade_13_to_15-64.sql
4f6415f
	mv %{buildroot}%{_datadir}/pgsql/contrib/%{name}-%{majorversion}/postgis_upgrade_14_to_15.sql %{buildroot}%{_datadir}/pgsql/contrib/%{name}-%{majorversion}/postgis_upgrade_14_to_15-64.sql
e5c9330
fi
e5c9330
a628dc6
%if %javabuild
a628dc6
install -d %{buildroot}%{_javadir}
fbae717
install -m 755 java/jdbc/%{name}-%{version}rc2.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}
ec19fb7
install -m 755 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)
54ac7f1
%doc COPYING CREDITS NEWS TODO README.%{name} doc/html loader/README.* doc/%{name}.xml doc/ZMSgeoms.txt 
a628dc6
%attr(755,root,root) %{_bindir}/*
54ac7f1
%attr(755,root,root) %{_libdir}/pgsql/postgis-*.so
a628dc6
%{_datadir}/pgsql/contrib/*.sql
4f6415f
%{_datadir}/pgsql/contrib/%{name}-%{majorversion}/*.sql
a628dc6
a628dc6
%if %javabuild
a628dc6
%files jdbc
a628dc6
%defattr(-,root,root)
a628dc6
%doc java/jdbc/COPYING_LGPL java/jdbc/README
fbae717
%attr(755,root,root) %{_javadir}/%{name}-%{version}rc2.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
ec19fb7
%defattr(755,root,root)
a628dc6
%doc utils/README
8efcdc5
%dir %{_datadir}/%{name}/
ec19fb7
%{_datadir}/%{name}/test_estimation.pl
ec19fb7
%{_datadir}/%{name}/profile_intersects.pl
ec19fb7
%{_datadir}/%{name}/test_joinestimation.pl
ec19fb7
%{_datadir}/%{name}/create_undef.pl
ec19fb7
%{_datadir}/%{name}/%{name}_proc_upgrade.pl
ec19fb7
%{_datadir}/%{name}/%{name}_restore.pl
ec19fb7
%{_datadir}/%{name}/new_postgis_restore.pl
ec19fb7
%{_datadir}/%{name}/read_scripts_version.pl
ec19fb7
%{_datadir}/%{name}/test_geography_estimation.pl
ec19fb7
%{_datadir}/%{name}/test_geography_joinestimation.pl
a628dc6
%endif
a628dc6
8efcdc5
%files docs
8efcdc5
%defattr(-,root,root)
8efcdc5
%doc postgis*.pdf
8efcdc5
a628dc6
%changelog
fbae717
* Wed Feb 3 2010 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.5.0rc2-1
fbae717
- Update to 1.5.0 rc2
fbae717
84bbe99
* Thu Jan 21 2010 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.5.0rc1-1
84bbe99
- Update to 1.5.0 rc1
84bbe99
ec19fb7
* Tue Jan 19 2010 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.5.0b2-1
ec19fb7
- Update to 1.5.0 beta2
ec19fb7
ec19fb7
* Tue Jan 12 2010 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.5.0-b1-1
ec19fb7
- Update to 1.5.0 beta1
ec19fb7
e143cfd
* Wed Jan 6 2010 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.4.1-2
e143cfd
- Add shp2pgsql-{cli-gui} among installed files.
e143cfd
968aa2e
* Sun Dec 20 2009 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.4.1-1
968aa2e
- Update to 1.4.1
968aa2e
5a1b740
* Thu Dec 03 2009 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.4.1-rc2_1.2
5a1b740
- Fix spec per rawhide report.
5a1b740
be29958
* Tue Dec 01 2009 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.4.1-rc2_1.1
be29958
- Update spec for rc2 changes.
be29958
728fb5c
* Mon Nov 30 2009 Devrim GUNDUZ <devrim@gunduz.org> - 1.4.1rc2-1
728fb5c
- Update to 1.4.1rc2
728fb5c
469d214
* Mon Nov 23 2009 Devrim GUNDUZ <devrim@gunduz.org> - 1.4.1rc1-1
469d214
- Update to 1.4.1rc1
469d214
b1c9de9
* Sun Nov 22 2009 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.4.0-2
b1c9de9
- Fix spec, per bz #536860
b1c9de9
a6bbec9
* Mon Jul 27 2009 Devrim GUNDUZ <devrim@gunduz.org> - 1.4.0-1
a6bbec9
- Update to 1.4.0
a6bbec9
494f794
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0rc1-2
494f794
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
494f794
54ac7f1
* Mon Jul 6 2009 Devrim GUNDUZ <devrim@gunduz.org> - 1.4.0rc1-1
54ac7f1
- Update to 1.4.0rc1
54ac7f1
- Fix spec for 1.4
54ac7f1
8efcdc5
* Thu Jun 18 2009 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.6-2
8efcdc5
- Add a new subpackage: -docs, and add postgis pdf file to it.
8efcdc5
- Own /usr/share/postgis, per bugzilla #474686
8efcdc5
bc5f9b1
* Fri May 8 2009 Devrim GUNDUZ <devrim@commandprompt.com> - 1.3.6-1
bc5f9b1
- Update to 1.3.6
bc5f9b1
3a86df9
* Fri Apr 24 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 1.3.5-3
3a86df9
- Fix FTBFS: added BR: java-1.5.0-gcj-devel in case of gcj_support
3a86df9
f1ce9ca
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-2
f1ce9ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f1ce9ca
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)
ec19fb7
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.