# # spec file for package geotiff # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: geotiff Version: 1.4.1 Release: 0 Summary: Library to handle georeferenced TIFF License: MIT and SUSE-Public-Domain Group: Productivity/Scientific/Other Url: http://trac.osgeo.org/geotiff Source0: http://download.osgeo.org/%{name}/lib%{name}/lib%{name}-%{version}.tar.gz BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: graphviz BuildRequires: libjpeg-devel BuildRequires: libproj-devel BuildRequires: libtiff-devel BuildRequires: pkg-config BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This library is designed to permit the extraction and parsing of the "GeoTIFF" Key directories, as well as definition and installation of GeoTIFF keys in new files. %package -n lib%{name}-devel Summary: GeoTIFF header files Group: Development/Libraries/C and C++ Requires: lib%{name}2 = %{version} Requires: libproj-devel Requires: libtiff-devel %description -n lib%{name}-devel Header files for GeoTIFF library. This library is designed to permit the extraction and parsing of the "GeoTIFF" Key directories, as well as definition and installation of GeoTIFF keys in new files. %package -n lib%{name}2 Summary: Shared libraries for GeoTIFF library Group: System/Libraries Provides: lib%{name} %description -n lib%{name}2 Shared libraries for GeoTIFF library. This library is designed to permit the extraction and parsing of the "GeoTIFF" Key directories, as well as definition and installation of GeoTIFF keys in new files. %prep %setup -q -n lib%{name}-%{version} for f in `find . -type f` ; do if file $f | grep -q ISO-8859 ; then echo "Fix encoding for $f" set -x iconv -f ISO-8859-1 -t UTF-8 $f > ${f}.tmp && \ mv -f ${f}.tmp $f set +x fi if file $f | grep -q CRLF ; then echo "Fix line ends for $f" set -x sed -i -e 's|\r||g' $f set +x fi done %build export CFLAGS="%{optflags} $CFLAGS -g -fstack-protector -fno-strict-aliasing -D _BSD_SOURCE" export CXXFLAGS="%{optflags} $CXXFLAGS -g -fstack-protector -fno-strict-aliasing" %configure \ --prefix=%{_prefix} \ --includedir=%{_includedir}/lib%{name} \ --with-proj \ --with-jpeg \ --with-zip \ --with-pic \ --enable-static=no \ --enable-debug=yes make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} INSTALL="install -p" # install pkgconfig file cat > libgeotiff.pc <> %{buildroot}%{_datadir}/epsg_csv/codes.csv # do not ship la files find %{buildroot}%{_libdir} -name "*.la" -delete -print %post -n lib%{name}2 -p /sbin/ldconfig %postun -n lib%{name}2 -p /sbin/ldconfig %files %defattr(-,root,root) %doc ChangeLog LICENSE README COPYING %{_bindir}/geotifcp %{_bindir}/listgeo %{_bindir}/applygeo %{_bindir}/makegeo %{_mandir}/man1/listgeo.1.* %dir %{_datadir}/epsg_csv %attr(0755,root,root) %{_datadir}/epsg_csv/csv2c.py* %attr(0755,root,root) %{_datadir}/epsg_csv/csv_tools.py* %attr(0644,root,root) %{_datadir}/epsg_csv/*.csv %files -n lib%{name}2 %defattr(-,root,root) %doc ChangeLog LICENSE README COPYING %{_libdir}/lib%{name}.so.* %files -n lib%{name}-devel %defattr(0644,root,root,0755) %doc ChangeLog LICENSE README COPYING %dir %{_includedir}/lib%{name} %{_includedir}/lib%{name}/*.h %{_includedir}/lib%{name}/*.inc %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/lib%{name}.pc %changelog