hdf-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. Name: hdf
  2. Version: 4.2.10
  3. Release: 1%{?_dist_release}
  4. Summary: A general purpose library and file format for storing scientific data
  5. License: BSD-ish
  6. Group: System Environment/Libraries
  7. URL: http://hdfgroup.org/products/hdf4/index.html
  8. Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}-%{version}.tar.bz2
  9. Patch0: hdf-4.2.5-maxavailfiles.patch
  10. Patch1: hdf-ppc.patch
  11. Patch2: hdf-4.2.4-sparc.patch
  12. Patch3: hdf-s390.patch
  13. Patch4: hdf-arm.patch
  14. # Support DESTDIR in install-examples
  15. Patch5: hdf-destdir.patch
  16. # Install examples into the right location
  17. Patch6: hdf-examplesdir.patch
  18. # Fix build with -Werror=format-security
  19. # https://bugzilla.redhat.com/show_bug.cgi?id=1037120
  20. Patch7: hdf-format.patch
  21. # Add AArch64 definitions
  22. Patch8: hdf-4.2.10-aarch64.patch
  23. # ppc64le support
  24. # https://bugzilla.redhat.com/show_bug.cgi?id=1134385
  25. Patch9: hdf-ppc64le.patch
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  27. # For destdir/examplesdir patches
  28. BuildRequires: automake libtool
  29. BuildRequires: flex byacc libjpeg-turbo-devel zlib-devel
  30. BuildRequires: gcc-gfortran
  31. %description
  32. HDF is a general purpose library and file format for storing scientific data.
  33. HDF can store two primary objects: datasets and groups. A dataset is
  34. essentially a multidimensional array of data elements, and a group is a
  35. structure for organizing objects in an HDF file. Using these two basic
  36. objects, one can create and store almost any kind of scientific data
  37. structure, such as images, arrays of vectors, and structured and unstructured
  38. grids. You can also mix and match them in HDF files according to your needs.
  39. %package devel
  40. Summary: HDF development files
  41. Group: Development/Libraries
  42. Requires: %{name} = %{version}-%{release}
  43. Requires: libjpeg-devel
  44. Requires: zlib-devel
  45. %description devel
  46. HDF development headers and libraries.
  47. %prep
  48. %setup -q
  49. %patch0 -p1 -b .maxavailfiles
  50. %patch1 -p1 -b .ppc
  51. %patch5 -p1 -b .destdir
  52. %patch6 -p1 -b .examplesdir
  53. %patch7 -p1 -b .format
  54. chmod a-x *hdf/*/*.c hdf/*/*.h
  55. # restore include file timestamps modified by patching
  56. touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
  57. %build
  58. # For destdir/examplesdir patches
  59. autoreconf -vif
  60. # avoid upstream compiler flags settings
  61. rm config/*linux-gnu
  62. export CFLAGS="$RPM_OPT_FLAGS -fPIC"
  63. export FFLAGS="$RPM_OPT_FLAGS -fPIC -ffixed-line-length-none"
  64. %configure --disable-production --disable-netcdf \
  65. --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}
  66. make
  67. # correct the timestamps based on files used to generate the header files
  68. touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90
  69. touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
  70. touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
  71. # netcdf fortran include need same treatement, but they are not shipped
  72. %install
  73. rm -rf $RPM_BUILD_ROOT
  74. make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
  75. #Don't conflict with netcdf
  76. #rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc*
  77. for file in ncdump ncgen; do
  78. mv $RPM_BUILD_ROOT%{_bindir}/$file $RPM_BUILD_ROOT%{_bindir}/h$file
  79. # man pages are the same than netcdf ones
  80. rm $RPM_BUILD_ROOT%{_mandir}/man1/${file}.1
  81. done
  82. # this is done to have the same timestamp on multiarch setups
  83. touch -c -r README.txt $RPM_BUILD_ROOT/%{_includedir}/hdf/h4config.h
  84. # Remove an autoconf conditional from the API that is unused and cause
  85. # the API to be different on x86 and x86_64
  86. pushd $RPM_BUILD_ROOT/%{_includedir}/hdf
  87. grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp
  88. touch -c -r h4config.h h4config.h.tmp
  89. mv h4config.h.tmp h4config.h
  90. popd
  91. %check
  92. make check
  93. %clean
  94. rm -rf $RPM_BUILD_ROOT
  95. %files
  96. %defattr(-,root,root,0755)
  97. %doc COPYING MANIFEST README.txt release_notes/*.txt
  98. %{_bindir}/*
  99. %{_mandir}/man1/*.gz
  100. %exclude %{_defaultdocdir}/%{name}/examples
  101. %files devel
  102. %defattr(-,root,root,0755)
  103. %{_includedir}/%{name}/
  104. %{_libdir}/%{name}/
  105. %{_defaultdocdir}/%{name}/examples
  106. %changelog
  107. * Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.2.10-1
  108. - updated to 4.2.10
  109. - built on current VineSeed
  110. * Sat Oct 25 2008 Shu KONNO <owa@bg.wakwak.com> 4.2r2-1vl5
  111. - applied new versioning policy
  112. * Fri Feb 01 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.2r2-0vl1
  113. - updated to 4.2r2 (imported patches from 4.2r2-2.fc8)
  114. * Thu Dec 20 2007 Shu KONNO <owa@bg.wakwak.com> 4.2r1-0vl2
  115. - s/gcc-g77/gcc-gfortran/
  116. * Sat Oct 22 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2r1-0vl1
  117. - initial build for Vine Linux
  118. * Wed Oct 05 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-5
  119. - Add Requires: libjpeg-devel zlib-devel to -devel package
  120. * Tue Aug 23 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-4
  121. - Use -fPIC
  122. - Fix project URL
  123. * Fri Jul 29 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-3
  124. - Exclude ppc/ppc64 - HDF does not recognize it
  125. * Wed Jul 20 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-2
  126. - Fix BuildRequires to have autoconf
  127. * Fri Jul 15 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-1
  128. - inital package for Fedora Extras