Proj and gdla are now in /usr/local prefix
This commit is contained in:
@@ -1,9 +1,17 @@
|
|||||||
%define bashcompletiondir %{_sysconfdir}/bash_completion.d
|
%define bashcompletiondir %{_sysconfdir}/bash_completion.d
|
||||||
%define realname gdal
|
%define realname gdal
|
||||||
|
Prefix: /opt
|
||||||
|
%define sysprefix /usr
|
||||||
|
%define _prefix /usr/local
|
||||||
|
%define _includedir %{_prefix}/include
|
||||||
|
%define _datadir %{_prefix}/share
|
||||||
|
%define _bindir %{_prefix}/bin
|
||||||
|
%define _libdir %{_prefix}/lib64
|
||||||
|
%define _mandir %{_prefix}/man
|
||||||
|
|
||||||
Name: gdal3
|
Name: gdal3
|
||||||
Version: 3.0.2
|
Version: 3.0.2
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
#define debug_package #{nil}
|
#define debug_package #{nil}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@@ -24,9 +32,9 @@ BuildRequires: perl-generators
|
|||||||
BuildRequires: openjpeg2-devel
|
BuildRequires: openjpeg2-devel
|
||||||
BuildRequires: openjpeg-devel
|
BuildRequires: openjpeg-devel
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||||
BuildRequires: %{_bindir}/pkg-config
|
BuildRequires: %{sysprefix}/bin/pkg-config
|
||||||
BuildRequires: libpq-devel
|
BuildRequires: libpq-devel
|
||||||
BuildRequires: proj-devel >= 6.0.2
|
BuildRequires: proj6-devel >= 6.0.2
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-numpy
|
BuildRequires: python2-numpy
|
||||||
@@ -38,8 +46,6 @@ BuildRequires: python3-numpy
|
|||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
|
|
||||||
Obsoletes: gdal < 3
|
|
||||||
|
|
||||||
%global DONT_REMOVE_RPATH 1
|
%global DONT_REMOVE_RPATH 1
|
||||||
# don't check for rpath:
|
# don't check for rpath:
|
||||||
%global __arch_install_post /usr/lib/rpm/check-buildroot
|
%global __arch_install_post /usr/lib/rpm/check-buildroot
|
||||||
@@ -77,8 +83,8 @@ This package contains the GDAL file format library.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
./configure \
|
./configure \
|
||||||
--datadir=%{_datadir}/%{name} \
|
--datadir=%{_datadir}/%{realname} \
|
||||||
--includedir=%{_includedir}/%{name} \
|
--includedir=%{_includedir}/%{realname} \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--sysconfdir=%{_sysconfdir} \
|
--sysconfdir=%{_sysconfdir} \
|
||||||
@@ -86,17 +92,17 @@ This package contains the GDAL file format library.
|
|||||||
--with-curl \
|
--with-curl \
|
||||||
--with-freexl \
|
--with-freexl \
|
||||||
--with-geos \
|
--with-geos \
|
||||||
--with-png=%{_prefix} \
|
--with-png=%{sysprefix} \
|
||||||
--with-gif \
|
--with-gif \
|
||||||
--with-gta \
|
--with-gta \
|
||||||
--with-jpeg \
|
--with-jpeg \
|
||||||
--without-jpeg12 \
|
--without-jpeg12 \
|
||||||
--with-liblzma \
|
--with-liblzma \
|
||||||
--with-libtiff=%{_prefix} \
|
--with-libtiff=%{sysprefix} \
|
||||||
--with-libz \
|
--with-libz \
|
||||||
--without-mdb \
|
--without-mdb \
|
||||||
--without-msg \
|
--without-msg \
|
||||||
--with-proj \
|
--with-proj=%{_prefix} \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--enable-shared
|
--enable-shared
|
||||||
|
|
||||||
@@ -142,13 +148,13 @@ mv %{buildroot}%{_prefix}/etc %{buildroot}/
|
|||||||
%doc LICENSE.TXT NEWS PROVENANCE.TXT COMMITTERS
|
%doc LICENSE.TXT NEWS PROVENANCE.TXT COMMITTERS
|
||||||
%{_libdir}/libgdal.so.26
|
%{_libdir}/libgdal.so.26
|
||||||
%{_libdir}/libgdal.so.26.*
|
%{_libdir}/libgdal.so.26.*
|
||||||
%{_datadir}/%{name}/*
|
%{_datadir}/%{realname}/*
|
||||||
#TODO: Possibly remove files like .dxf, .dgn, ...
|
#TODO: Possibly remove files like .dxf, .dgn, ...
|
||||||
%dir %{_libdir}/%{realname}plugins
|
%dir %{_libdir}/%{realname}plugins
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_bindir}/%{name}-config
|
%{_bindir}/%{realname}-config
|
||||||
%{_includedir}/%{name}/*.h
|
%{_includedir}/%{realname}/*.h
|
||||||
%{_libdir}/*.a
|
%{_libdir}/*.a
|
||||||
%{_libdir}/*.la
|
%{_libdir}/*.la
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
%global proj_version 6.3.0
|
%global proj_version 6.3.0
|
||||||
%global datumgrid_version 1.8
|
%global datumgrid_version 1.8
|
||||||
%define realname proj
|
%define realname proj
|
||||||
|
%define _prefix /usr/local
|
||||||
|
%define _includedir %{_prefix}/include
|
||||||
|
%define _datadir %{_prefix}/share
|
||||||
|
%define _bindir %{_prefix}/bin
|
||||||
|
%define _libdir %{_prefix}/lib64
|
||||||
|
%define _mandir %{_datadir}/man
|
||||||
|
|
||||||
Name: proj6
|
Name: proj6
|
||||||
Version: %{proj_version}
|
Version: %{proj_version}
|
||||||
@@ -21,7 +27,7 @@ projection functions.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for PROJ.4
|
Summary: Development files for PROJ.4
|
||||||
Requires: %{realname}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains libproj and the appropriate header files and man pages.
|
This package contains libproj and the appropriate header files and man pages.
|
||||||
@@ -29,21 +35,23 @@ This package contains libproj and the appropriate header files and man pages.
|
|||||||
|
|
||||||
%package static
|
%package static
|
||||||
Summary: Development files for PROJ.4
|
Summary: Development files for PROJ.4
|
||||||
Requires: %{realname}-devel%{?_isa} = %{version}-%{release}
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description static
|
%description static
|
||||||
This package contains libproj static library.
|
This package contains libproj static library.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%setup -q -n %{realname}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# rebuild due to patch
|
# rebuild due to patch
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
%configure \
|
./configure \
|
||||||
--includedir=%{_includedir}/%{name} \
|
--prefix=%{_prefix} \
|
||||||
--datarootdir=%{_datadir}/%{name}
|
--libdir=%{_libdir} \
|
||||||
|
--includedir=%{_includedir} \
|
||||||
|
--datarootdir=%{_datadir}
|
||||||
|
|
||||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||||
@@ -51,13 +59,8 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
make install DESTDIR=%{buildroot}
|
||||||
chmod -x %{buildroot}%{_libdir}/libproj.la
|
chmod -x %{buildroot}%{_libdir}/libproj.la
|
||||||
install -p -m 0644 nad/README.DATUMGRID %{buildroot}%{_datadir}/%{name}
|
|
||||||
for f in $(egrep '^\/usr' datumgrid.files); do
|
|
||||||
bf=$(basename $f)
|
|
||||||
install -m 0644 nad/$bf %{buildroot}%{_datadir}/%{name}/$bf
|
|
||||||
done
|
|
||||||
|
|
||||||
# Install cmake config manually because we use autotools for building
|
# Install cmake config manually because we use autotools for building
|
||||||
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/
|
mkdir -p %{buildroot}%{_datadir}/cmake/Modules/
|
||||||
@@ -67,9 +70,9 @@ set(PROJ4_FOUND 1)
|
|||||||
set(PROJ4_INCLUDE_DIRS %{_includedir})
|
set(PROJ4_INCLUDE_DIRS %{_includedir})
|
||||||
set(PROJ4_LIBRARIES proj)
|
set(PROJ4_LIBRARIES proj)
|
||||||
if(\${LIB_SUFFIX} MATCHES 64)
|
if(\${LIB_SUFFIX} MATCHES 64)
|
||||||
set(PROJ4_LIBRARY_DIRS /usr/lib64)
|
set(PROJ4_LIBRARY_DIRS %{_libdir})
|
||||||
else()
|
else()
|
||||||
set(PROJ4_LIBRARY_DIRS /usr/lib)
|
set(PROJ4_LIBRARY_DIRS %{_prefix}/lib)
|
||||||
endif()
|
endif()
|
||||||
set(PROJ4_BINARY_DIRS %{_bindir})
|
set(PROJ4_BINARY_DIRS %{_bindir})
|
||||||
set(PROJ4_VERSION %{proj_version})
|
set(PROJ4_VERSION %{proj_version})
|
||||||
@@ -79,7 +82,7 @@ EOF
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
||||||
make PROJ_LIB=%{buildroot}%{_datadir}/%{name} check || ( cat src/test-suite.log; exit 1 )
|
make PROJ_LIB=%{buildroot}%{_datadir}/%{realname} check || ( cat src/test-suite.log; exit 1 )
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@@ -87,27 +90,27 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
|||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
%{_libdir}/libproj.so.15*
|
%{_libdir}/libproj.so.15*
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{realname}
|
||||||
%{_datadir}/%{name}/CH
|
%{_datadir}/%{realname}/CH
|
||||||
%{_datadir}/%{name}/GL27
|
%{_datadir}/%{realname}/GL27
|
||||||
%{_datadir}/%{name}/ITRF2000
|
%{_datadir}/%{realname}/ITRF2000
|
||||||
%{_datadir}/%{name}/ITRF2008
|
%{_datadir}/%{realname}/ITRF2008
|
||||||
%{_datadir}/%{name}/ITRF2014
|
%{_datadir}/%{realname}/ITRF2014
|
||||||
%{_datadir}/%{name}/nad.lst
|
%{_datadir}/%{realname}/nad.lst
|
||||||
%{_datadir}/%{name}/nad27
|
%{_datadir}/%{realname}/nad27
|
||||||
%{_datadir}/%{name}/nad83
|
%{_datadir}/%{realname}/nad83
|
||||||
%{_datadir}/%{name}/null
|
%{_datadir}/%{realname}/null
|
||||||
%{_datadir}/%{name}/other.extra
|
%{_datadir}/%{realname}/other.extra
|
||||||
%{_datadir}/%{name}/world
|
%{_datadir}/%{realname}/world
|
||||||
%{_datadir}/%{name}/projjson.schema.json
|
%{_datadir}/%{realname}/projjson.schema.json
|
||||||
%{_datadir}/%{name}/%{name}.db
|
%{_datadir}/%{realname}/%{realname}.db
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_mandir}/man3/*.3*
|
%{_mandir}/man3/*.3*
|
||||||
%{_includedir}/*.h
|
%{_includedir}/*.h
|
||||||
%{_includedir}/%{name}/*.hpp
|
%{_includedir}/%{realname}/*.hpp
|
||||||
%{_libdir}/libproj.so
|
%{_libdir}/libproj.so
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{realname}.pc
|
||||||
%{_datadir}/cmake/Modules/FindPROJ4.cmake
|
%{_datadir}/cmake/Modules/FindPROJ4.cmake
|
||||||
%exclude %{_libdir}/libproj.a
|
%exclude %{_libdir}/libproj.a
|
||||||
%exclude %{_libdir}/libproj.la
|
%exclude %{_libdir}/libproj.la
|
||||||
@@ -118,6 +121,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 11 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||||
|
- New name proj6 and relocation to /usr/local.
|
||||||
|
|
||||||
* Mon Jan 6 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
* Mon Jan 6 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
|
||||||
- Initial build
|
- Initial build
|
||||||
|
|
||||||
Reference in New Issue
Block a user