Package cgns-mpi: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | %define mpiimpl openmpi %define mpidir %_libdir/%mpiimpl %define seqdir %_libdir/hdf5-seq %define seqmpi mpi %define oname cgns %if "%seqmpi" == "seq" %define altname %oname-mpi %define desc sequential %else %define altname %oname-seq %define desc parallel %endif %define longdesc The CFD General Notation System (CGNS) provides a general, portable, and \ extensible standard for the storage and retrieval of computational fluid \ dynamics (CFD) analysis data. It consists of a collection of \ conventions, and free and open software implementing those conventions. \ It is self-descriptive, machine-independent, well-documented, and \ administered by an international steering committee. It is also an \ American Institute of Aeronautics and Astronautics (AIAA) Recommended \ Practice. Name: %oname-%seqmpi Version: 3.2 Release: alt3.svn20150317 Summary: CFD General Notation System (%desc version) Group: Sciences/Mathematics License: Free (see license.txt) URL: http://cgns.sourceforge.net/ # svn://svn.code.sf.net/p/cgns/code Source: %oname-%version.tar Source1: CMakeCache.txt Source2: CGNS_docs.tar Source3: UserGuideCode.tar Source4: F77_examples.tar Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org> Provides: %oname = %version-%release Requires: lib%name = %version-%release #Requires: %oname-data = %version-%release Conflicts: %altname BuildPreReq: cmake gcc-c++ gcc-fortran zlib-devel libGL-devel tk-devel BuildPreReq: libGLU-devel xorg-xproto-devel libXmu-devel libXtst-devel BuildPreReq: libXcomposite-devel libXcursor-devel libXdamage-devel BuildPreReq: libXdmcp-devel libXfixes-devel libXft-devel libXi-devel BuildPreReq: libXpm-devel libXrandr-devel libXrender-devel libXv-devel BuildPreReq: libXxf86misc-devel libXinerama-devel libXxf86vm-devel %if "%seqmpi" == "seq" BuildPreReq: libhdf5-devel %else BuildPreReq: libhdf5-mpi-devel libsz2-devel %mpiimpl-devel chrpath %endif %description %longdesc The system consists of two parts: (1) a standard format for recording the data, and (2) software that reads, writes, and modifies data in that format. The format is a conceptual entity established by the documentation; the software is a physical product supplied to enable developers to access and produce data recorded in that format. %package -n lib%name Summary: Shared libraries of CFD General Notation System (%desc version) Group: System/Libraries Provides: lib%oname = %version-%release %if "%seqmpi" == "seq" Requires: libhdf5 %else Requires: libhdf5-mpi %endif Conflicts: lib%altname %description -n lib%name %longdesc This package contains shared libraries of CGNS. %package -n lib%name-devel Summary: Development files of CFD General Notation System (%desc version) Group: Development/C++ Requires: lib%name = %version-%release %if "%seqmpi" == "seq" Requires: libhdf5-devel %else Requires: libhdf5-mpi-devel %endif Conflicts: lib%altname-devel %description -n lib%name-devel %longdesc This package contains development files of CGNS. %package -n %oname-data Summary: Architecture independent files of CFD General Notation System (%desc version) Group: Sciences/Mathematics BuildArch: noarch %description -n %oname-data %longdesc This package contains architecture independent files of CGNS. %package -n %oname-devel-doc Summary: Documentation for CFD General Notation System (%desc version) Group: Development/Documentation BuildArch: noarch %description -n %oname-devel-doc %longdesc This package contains development documentation for CGNS. %prep %setup install %SOURCE1 . %if "%seqmpi" == "seq" sed -i 's|@CXX@|g++|' CMakeCache.txt sed -i 's|@CC@|gcc|' CMakeCache.txt sed -i 's|@FC@|f95|' CMakeCache.txt sed -i 's|@HDF5@|%seqdir|' CMakeCache.txt sed -i 's|@MPI@|OFF|' CMakeCache.txt %else sed -i 's|@CXX@|mpicxx|' CMakeCache.txt sed -i 's|@CC@|mpicc|' CMakeCache.txt sed -i 's|@FC@|mpif90|' CMakeCache.txt sed -i 's|@HDF5@|%mpidir|' CMakeCache.txt sed -i 's|@MPI@|ON|' CMakeCache.txt %endif cp CMakeCache.txt pcgns/ tar -xf %SOURCE2 tar -xf %SOURCE3 tar -xf %SOURCE4 %build %if "%seqmpi" == "mpi" mpi-selector --set %mpiimpl source %mpidir/bin/mpivars.sh export OMPI_LDFLAGS="-Wl,--as-needed,-rpath,%mpidir/lib -L%mpidir/lib" FLAGS="-I%mpidir/include" %else FLAGS="-I%seqdir/include" %endif FLAGS="%optflags %optflags_shared $FLAGS" cmake \ -DCMAKE_C_FLAGS:STRING="$FLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$FLAGS" \ -DCMAKE_Fortran_FLAGS:STRING="$FLAGS" \ . pushd pcgns cmake . %make_build popd %make_build %install %if "%seqmpi" == "mpi" source %mpidir/bin/mpivars.sh export OMPI_LDFLAGS="-Wl,--as-needed,-rpath,%mpidir/lib -L%mpidir/lib" %endif %makeinstall_std %makeinstall_std -C pcgns %if "lib" != "%_lib" install -d %buildroot%_libdir mv %buildroot/usr/lib/* %buildroot%_libdir/ %endif %if "%seqmpi" == "mpi" for i in $(find %buildroot%_bindir -type f) \ $(find %buildroot%_libdir -name '*.so.*') do FTYPE=$(file $i |sed 's|.*\(ELF\).*|\1|') if [ "$FTYPE" = "ELF" ]; then chrpath -r %mpidir/lib $i fi done %endif install -p -m644 src/cgnsKeywords.h %buildroot%_includedir #mv %buildroot%_bindir/cgnstools/* %buildroot%_bindir/ #rmdir %buildroot%_bindir/cgnstools # The package contains a CVS/.svn/.git/.hg/.bzr/_MTN directory of revision control system. # It was most likely included by accident since CVS/.svn/.hg/... etc. directories # usually don't belong in releases. # When packaging a CVS/SVN snapshot, export from CVS/SVN rather than use a checkout. find $RPM_BUILD_ROOT -type d \( -name 'CVS' -o -name '.svn' -o -name '.git' -o -name '.hg' -o -name '.bzr' -o -name '_MTN' \) -print -exec rm -rf {} \; ||: # the find below is useful in case those CVS/.svn/.git/.hg/.bzr/_MTN directory is added as %%doc find . -type d \( -name 'CVS' -o -name '.svn' -o -name '.git' -o -name '.hg' -o -name '.bzr' -o -name '_MTN' \) -print -exec rm -rf {} \; ||: %files %doc license.txt %_bindir/* %files -n lib%name %_libdir/*.so.* %files -n lib%name-devel %_libdir/*.so %_includedir/* %if "%seqmpi" == "seq" #files -n %oname-data #_datadir/cgnstools %files -n %oname-devel-doc #doc doc/html/* %doc CGNS_docs UserGuideCode F77_examples %endif %changelog * Mon Feb 11 2019 Gleb F-Malinovskiy <glebfm@altlinux.org> 3.2-alt3.svn20150317 - Fixed build on other architectures with %%_lib != lib. * Fri Mar 20 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt2.svn20150317 - New snapshot * Wed May 28 2014 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt2.svn20140522 - New snapshot * Mon Nov 11 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt2.svn20130919 - New snapshot * Wed Jun 26 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt2.svn20130201 - Rebuilt with new libhdf5 * Tue Jun 18 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt1.svn20130201 - New snapshot * Fri Feb 01 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt1.svn20121213 - New snapshot * Wed Sep 12 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.2-alt1.svn20120829 - Version 3.2 * Mon Jun 25 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.1.3-alt2.svn20111216 - Rebuilt with OpenMPI 1.6 * Fri Dec 16 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.1.3-alt1.svn20111216 - New snapshot * Wed Sep 07 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.1.3-alt1.svn20110816.1 - Rebuilt with libhdf5-7-mpi * Sat Aug 20 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.1.3-alt1.svn20110816 - New snapshot * Mon May 09 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.1.3-alt1.svn20110503 - Version 3.1.3 - Disabled devel-static package * Tue Mar 01 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0.8-alt1.svn20100525.4 - Rebuilt for debuginfo * Tue Nov 02 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0.8-alt1.svn20100525.3 - Rebuilt for soname set-versions * Wed Oct 13 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0.8-alt1.svn20100525.2 - Fixed overlinking of libraries * Mon Jun 21 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0.8-alt1.svn20100525.1 - Added missing %_includedir/cgnsKeywords.h * Fri Jun 18 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0.8-alt1.svn20100525 - Version 3.0.8 * Thu Oct 15 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.0.7-alt1.svn20091009 - Initial build for Sisyphus |