4.104.114.95
Line | |
---|
1 | # Extract %%__os_install_post into os_install_post~ |
---|
2 | cat << \EOF > os_install_post~ |
---|
3 | %__os_install_post |
---|
4 | EOF |
---|
5 | |
---|
6 | # Generate customized brp-*scripts |
---|
7 | cat os_install_post~ | while read a x y; do |
---|
8 | case $a in |
---|
9 | # Prevent brp-strip* from trying to handle foreign binaries |
---|
10 | */brp-strip*) |
---|
11 | b=$(basename $a) |
---|
12 | sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b |
---|
13 | chmod a+x $b |
---|
14 | ;; |
---|
15 | %if "%{_prefix}" != "/usr" |
---|
16 | # Fix up brp-compress to handle %%_prefix != /usr |
---|
17 | */brp-compress*) |
---|
18 | b=$(basename $a) |
---|
19 | sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b |
---|
20 | chmod a+x $b |
---|
21 | ;; |
---|
22 | %endif |
---|
23 | esac |
---|
24 | done |
---|
25 | |
---|
26 | sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ |
---|
27 | %if "%{_prefix}" != "/usr" |
---|
28 | -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \ |
---|
29 | %endif |
---|
30 | < os_install_post~ > os_install_post |
---|
31 | %define __os_install_post . ./os_install_post |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.