30 lines
921 B
Plaintext
30 lines
921 B
Plaintext
|
#
|
||
|
# In noarch package, we can just move all the data - this is cheap.
|
||
|
# For arch-dependent packages however, the source needs to reside at
|
||
|
# its original position for debuginfo to be properly generated, and
|
||
|
# thus we do a cp there instead.
|
||
|
# The macro sets $gapmoddir.
|
||
|
#
|
||
|
%gappkg_simple_install() \
|
||
|
moddir="$(readlink -f .)"; \
|
||
|
if [ "%_target_cpu" = "noarch" ]; then \
|
||
|
moddir="%gap_sitelib/${moddir##*/}"; \
|
||
|
stopdir="%gap_sitelib_anchor"; \
|
||
|
mkdir -p "%buildroot/$moddir"; \
|
||
|
mv * "%buildroot/$moddir/"; \
|
||
|
else \
|
||
|
moddir="%gap_sitearch/${moddir##*/}"; \
|
||
|
stopdir="%gap_sitearch_anchor"; \
|
||
|
mkdir -p "%buildroot/$moddir"; \
|
||
|
cp -a * "%buildroot/$moddir/"; \
|
||
|
fi; \
|
||
|
echo "$moddir" >>"%name.files"; \
|
||
|
d="${moddir%/*}"; \
|
||
|
while [ -n "$d" -a "$d" != "/" -a "$d" != "$stopdir" ]; do \
|
||
|
echo "%%dir $d" >>"%name.files"; \
|
||
|
d="${d%/*}"; \
|
||
|
done; \
|
||
|
echo "%%dir $d" >>"%name.files"; \
|
||
|
unset d; \
|
||
|
unset stopdir;
|