47 |
|
# cp -r ./lib %{i}/lib |
48 |
|
# cp -r ./bin %{i}/bin |
49 |
|
cd %{i} |
50 |
+ |
find daq -path *src* -type d -exec rm -rf daq/{} \; |
51 |
|
# copies all the libraries in extern in %i/lib |
52 |
|
mkdir -p %{i}/lib/linux/x86 |
53 |
|
mkdir -p %{i}/bin/linux/x86 |
54 |
< |
tar cpfv - `find . ! -path "%{i}/lib/*.%{libext}" -type f -name "*.%{libext}"` | ( cd %{i}/lib; tar xpfv -) |
55 |
< |
tar cpfv - `find . ! -path "%{i}/bin/*.exe" -type f -name "*.exe"` | ( cd %{i}/bin; tar xpfv -) |
54 |
> |
(cd %{i}/lib; find ../daq -path "*/lib/lib*" -o -name "*.%{libext}" -o -name "*.%{libext}.*" -exec ln -s {} . \;) |
55 |
> |
(cd %{i}/lib/linux/x86; find ../../../daq -path "*/lib/lib*" -o -name "*.%{libext}" -o -path "*.%{libext}.*" -exec ln -s {} . \;) |
56 |
> |
(cd %{i}/bin; find ../daq -path "*/bin/*.exe" -exec ln -s {} . \;) |
57 |
> |
(cd %{i}/bin/linux/x86; find ../../../daq -path "*/bin/*.exe" -exec ln -s {} . \;) |
58 |
> |
|
59 |
> |
#tar cpfv - `find daq -path "*/lib/*.%{libext}"` | ( cd %{i}/lib; tar xpfv -) |
60 |
> |
#tar cpfv - `find daq -path "*/bin/*.exe" -type f` | ( cd %{i}/bin; tar xpfv -) |
61 |
|
|
62 |
|
#links them back to lib and bin |
63 |
< |
find daq -type f ! -path "%{i}/lib/*.%{libext}" -name "*.%{libext}" -exec ln -sf {} %{i}/lib \; |
64 |
< |
find daq -type f ! -path "%{i}/lib/*.%{libext}" -name "*.%{libext}" -exec ln -sf {} ../../%{i}/lib/%installDir \; |
65 |
< |
find daq -type f ! -path "%{i}/bin/*.exe" -name "*.exe" -exec ln -sf {} %{i}/bin \; |
66 |
< |
find daq -type f ! -path "%{i}/bin/*.exe" -name "*.exe" -exec ln -sf {} ../../%{i}/bin/%installDir \; |
63 |
> |
#find daq -type f -name "*.%{libext}" -exec ln -sf {} %{i}/lib \; |
64 |
> |
#find daq -type f -name "*.%{libext}" -exec ln -sf ../../{} %{i}/lib/%installDir \; |
65 |
> |
#find daq -type f -name "*.exe" -exec ln -sf {} %{i}/bin \; |
66 |
> |
#find daq -type f -name "*.exe" -exec ln -sf ../../{} %{i}/bin/%installDir \; |
67 |
|
|
68 |
|
# Libraries from extern (not found cause they are symlinks) |
69 |
|
|
70 |
< |
find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \; |
70 |
> |
#find daq -type f ! -path "*/extern/*lib*" -name "*.a" -exec cp {} %{i}/lib \; |
71 |
|
perl -p -i -e "s|^#!.*make|#!/usr/bin/env make|" %{i}/daq/extern/slp/openslp-1.2.0/debian/rules |
72 |
|
%post |
73 |
|
find $RPM_INSTALL_PREFIX/%pkgrel -type l | xargs ls -la | sed -e "s|.*[ ]\(/.*\) -> \(.*\)| \2 \1|;s|[ ]/[^ ]*/external| $RPM_INSTALL_PREFIX/%cmsplatf/external|g" |