Skip to content

Commit fcd8385

Browse files
committed
Spec cleanup: relocate some top level packages
1 parent 84e115b commit fcd8385

33 files changed

+81
-11
lines changed

OpenBLAS.spec

+2
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ make %{build_opts} CFLAGS="%{arch_build_flags}"
2828
%install
2929
make install PREFIX=%i MAKE_NB_JOBS=%{compiling_processes}
3030

31+
%post
32+
%relocateConfigAll lib/cmake *.cmake

dd4hep.spec

-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,4 @@ mv ../../%{n}-%{realversion}/DDG4/include/DDG4 %i/include
4545
%install
4646

4747
%post
48-
%{relocateConfig}*.cmake
4948
%{relocateConfig}bin/*.sh
50-
%{relocateConfig}bin/*.csh

evtgen.spec

+3
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ find %i/lib64 -name "*.*" -exec mv {} %i/lib \;
6060
rm -rf %i/lib64
6161
ls %{i}/lib
6262
cd ..
63+
64+
%post
65+
%relocateConfigAll share/EvtGen/cmake *.cmake

fastjet.spec

+2
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ make %{makeprocesses}
4848
%install
4949
make install
5050
rm -rf %{i}/lib/*.la
51+
5152
%post
5253
%{relocateConfig}bin/fastjet-config
54+
%relocateConfigAll lib _fastjet.la

fftw3.spec

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ make install
2525

2626
# Remove documentation.
2727
%define drop_files %{i}/share
28+
29+
%post
30+
%relocateConfigAll lib/cmake *.cmake

freetype.spec

-2
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ perl -p -i -e 's|-lfreetype|-lfreetype-cms|' %{i}/bin/freetype-config
2525

2626
# Strip libraries, we are not going to debug them.
2727
%define strip_files %{i}/lib
28-
%post
29-
%{relocateConfig}bin/freetype-config

hdf5.spec

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ make %{makeprocesses} VERBOSE=1
1717
make install
1818

1919
%post
20+
%{relocateConfig}bin/h5pcc
21+
%{relocateConfig}lib/libhdf5.settings

heppdt.spec

+3
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ make
3232

3333
%install
3434
make install
35+
36+
%post
37+
%{relocateConfig}examples/*/GNUmakefile

herwig7.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ sed -i -e 's|^#!.*python|#!/usr/bin/env python3|' %{i}/lib/Herwig/python/ufo2her
7373

7474
%post
7575
%{relocateConfig}bin/herwig-config
76-
%{relocateConfig}bin/Herwig7
7776
%{relocateConfig}bin/Herwig-cms
7877
%{relocateConfig}bin/ufo2herwig
7978
%{relocateConfig}lib/Herwig/*.la
8079
%{relocateConfig}lib/Herwig/python/Makefile-FR
8180
%{relocateConfig}share/Herwig/Makefile-UserModules
8281
%{relocateConfig}share/Herwig/defaults/PDF.in
8382
%{relocateConfig}share/Herwig/HerwigDefaults.rpo
84-
sed -i -e "s|^.*/BUILDROOT/[0-9a-f][0-9a-f]*%{installroot}/|$CMS_INSTALL_PREFIX/|g" $RPM_INSTALL_PREFIX/%{pkgrel}/share/Herwig/HerwigDefaults.rpo
83+
%{relocateConfig}share/Herwig/Doc/*.conf
84+
%{relocateConfig}share/Herwig/defaults/setup.gosam.in

highfive.spec

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ cmake ../%{n}-%{realversion} \
2626
cd %{_builddir}/build
2727
make install
2828

29+
%post
30+
%{relocateConfig}share/HighFive/CMake/HighFiveTargets.cmake

llvm.spec

+2
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,5 @@ rm -f %{i}/bin/set-xcode-analyzer
8484

8585
%post
8686
%{relocateConfig}include/llvm/Config/llvm-config.h
87+
%{relocateConfig}include/clang/Config/config.h
88+
%{relocateConfig}lib64/cmake/llvm/LLVMConfig.cmake

lwtnn.spec

+3
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ ninja -v %{makeprocesses}
3030
cd ../build
3131

3232
ninja -v %{makeprocesses} install
33+
34+
%post
35+
%{relocateConfig}cmake/lwtnnConfig-targets.cmake

madgraph5amcatnlo.spec

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ EOF
4545

4646
# Remove all downloaded tgz files before building the package
4747
find . -type f -name '*.tgz' -delete
48+
rm -rf HEPTools/ninja/Ninja HEPTools/ninja/ninja_install.log \
49+
ME5_debug basiceventgeneration/run*debug.log \
50+
basiceventgeneration/Source/StdHEP/log.mcfio.*
51+
find HEPTools/oneloop -type f -print | xargs chmod a+r
4852

4953
%install
5054
rsync -avh %{_builddir}/MG5_aMC_v%{versiontag}_py3/ %{i}/
@@ -54,4 +58,8 @@ sed -ideleteme 's|#!.*/bin/python|#!/usr/bin/env python|' \
5458
find %{i} -name '*deleteme' -delete
5559

5660
%post
61+
%relocateConfigAll . py.py
5762
%{relocateConfig}input/mg5_configuration.txt
63+
%{relocateConfig}basiceventgeneration/Cards/amcatnlo_configuration.txt
64+
%{relocateConfig}basiceventgeneration/Source/make_opts
65+
%{relocateConfig}HEPTools/ninja/lib/lib*.la

mxnet-predict.spec

+4
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ cd ../build
4848
ninja -v %{makeprocesses} install
4949
rm %{i}/*.so
5050
mv %{i}/python* %{i}/lib
51+
52+
%post
53+
%{%relocateConfig}include/mxnet-cpp/op.h
54+
%relocateConfigAll lib/cmake *.cmake

openldap.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ make install
3030
find %{i}/lib -type f | xargs chmod 0755
3131

3232
# Remove man pages.
33-
rm -rf %{i}/man
33+
rm -rf %{i}/man %{i}/share/man

pip/scipy.file

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ Provides: python%{cms_python3_major_minor_version}dist(scipy) = %{realversion}
99
Provides: python3dist(scipy) = %{realversion}
1010
%define __find_provides true
1111
%endif
12+
13+
%define PipPostPost %{relocateConfig}lib/python*/site-packages/scipy/__config__.py

pythia6.spec

+3
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ make install
4848
%install
4949
tar -c lib include | tar -x -C %i
5050

51+
%post
52+
%{relocateConfig}include/Makefile
53+
%{relocateConfig}lib/lib*.la

pythia8.spec

+4
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ make %makeprocesses
1515
%install
1616
make install
1717
test -f %i/lib/libpythia8lhapdf6.so || exit 1
18+
rm -rf %{i}/share/Pythia8/examples
19+
20+
%post
21+
%{relocateConfig}bin/pythia8-config

qd.spec

+3
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ make %{makeprocesses}
1717

1818
%install
1919
make install
20+
21+
%post
22+
%{relocateConfig}bin/qd-config

rivet.spec

+2
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ sed -i -e 's|^#!.*python.*|#!/usr/bin/env python3|' %{i}/bin/*
5858
%post
5959
%{relocateConfig}bin/rivet-config
6060
%{relocateConfig}bin/rivet-buildplugin
61+
%{relocateConfig}bin/rivet-build
62+
%{relocateConfig}lib/python*/site-packages/rivet-*egg-info/SOURCES.txt

root.spec

+6-1
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,9 @@ cd ..
184184
rm -rf build
185185

186186
%post
187-
%{relocateConfig}etc/cling/llvm/Config/llvm-config.h
187+
%{relocateConfig}bin/root-config
188+
%{relocateConfig}cmake/ROOTConfig-targets.cmake
189+
%{relocateConfig}config/Makefile.config
190+
%{relocateConfig}etc/notebook/jupyter_notebook_config.py
191+
%{relocateConfig}include/RConfigOptions.h
192+
%{relocateConfig}include/compiledata.h

rpm-preamble.file

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
%define relocateRpmPkg perl -p -i -e "s|\\Q%{instroot}\\E|%{cmsroot}|g;s|\\Q%{cmsroot}\\E|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/%{pkgrel}/
193193
%define relocateCmsPkg perl -p -i -e "s|\\Q%{instroot}\\E|%{cmsroot}|g;s|\\Q%{cmsroot}\\E|$CMS_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/%{pkgrel}/
194194
%define relocateConfig %relocateCmsPkg
195+
%define relocateConfigAll() find $RPM_INSTALL_PREFIX/%{pkgrel}/%{1} -name '%{2}' -print -type f | xargs %{relocateCmsFiles}
195196
%define relocatePy3SitePackages \
196197
for py in $(grep -RlI -m1 '^#\!.*python' %{i}/${PYTHON3_LIB_SITE_PACKAGES} | grep -v '\.pyc$') ; do \
197198
lnum=$(grep -n -m1 '^#\!.*python' $py | sed 's|:.*||') \

scram-project-build.file

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,6 @@ done
340340
if [ -f compile_commands.json ] ; then
341341
%{relocateConfig}compile_commands.json
342342
fi
343-
343+
%{relocateConfig}external/%cmsplatf/links.DB
344344
%postun
345345
rm -fR $RPM_INSTALL_PREFIX/%pkgrel

sigcpp.spec

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ rm -rf %{i}/lib/pkgconfig
2727
# Read documentation online.
2828
%define drop_files %{i}/share
2929
cp %{i}/lib/sigc++-3.0/include/sigc++config.h %{i}/include/sigc++-3.0/
30+
31+
%post
32+
%{relocateConfig}lib/cmake/sigc++-3/*.cmake

tauolapp.spec

+3
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ make install
3434

3535
mkdir %{i}/share
3636
cp TauSpinner/examples/CP-tests/Z-pi/*.txt %{i}/share/
37+
38+
%post
39+
%{relocateConfig}lib/lib*.la

tensorflow.spec

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ esac
2525
%install
2626

2727
tar xfz ${%{tf_root}}/libtensorflow_cc.tar.gz -C %{i}
28+
29+
%post
30+
%{relocateConfig}lib/lib*.params

thepeg.spec

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ find %{i}/lib -name '*.la' -exec rm -f {} \;
6363

6464

6565
%post
66+
%{relocateConfig}bin/thepeg-config
6667
%{relocateConfig}lib/ThePEG/Makefile.common
6768
%{relocateConfig}lib/ThePEG/Makefile
6869
%{relocateConfig}lib/ThePEG/ThePEGDefaults.rpo

ucx.spec

+1
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@ rm -f %{i}/lib/ucx/lib*.la
8080
rm -rf %{i}/share/ucx/examples
8181

8282
%post
83+
%{relocateConfig}lib/cmake/ucx/*.cmake

xgboost.spec

+3
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ cmake ../%{n}-%{realversion} \
2121
cd ../build
2222
make %{makeprocesses}
2323
make install
24+
25+
%post
26+
%{relocateConfig}lib64/pkgconfig/xgboost.pc

xrootd.spec

+3
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ make %makeprocesses VERBOSE=1
5555
cd ../build
5656
make install
5757
%{relocatePy3SitePackages}
58+
59+
%post
60+
%{relocateConfig}bin/xrootd-config

xtensor.spec

+2
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ make %{makeprocesses}
1616
cd ../build
1717
make install
1818

19+
%post
20+
%{relocateConfig}lib64/pkgconfig/xtensor.pc

xtl.spec

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ BuildRequires: cmake
66
%setup -n %{n}-%{realversion}
77

88
%build
9-
109
cmake -DCMAKE_INSTALL_PREFIX=%{i}
1110
make %{makeprocesses}
1211

1312
%install
14-
1513
make install
1614

15+
%post
16+
%{relocateConfig}share/pkgconfig/xtl.pc

yoda.spec

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ make install
2525

2626
%post
2727
%{relocateConfig}bin/yoda-config
28+
%{relocateConfig}lib/python*/site-packages/yoda*egg-info/SOURCES.txt

0 commit comments

Comments
 (0)