topdir macro
Elan Ruusamäe
glen at pld-linux.org
Sun May 3 12:26:06 CEST 2009
why not have such default macros:
%_topdir %{expand:%%global _topdir %(d=$([ -d ../../packages ] && (cd ../.. && pwd)); d=${d:-$([ -d ../packages ] && (cd ..; pwd))}; echo ${d:-$HOME/rpm})}%_topdir
%_specdir %{_topdir}/packages/%{name}
%_sourcedir %{_specdir}
the %{name} seems to work too:
$ /usr/bin/rpmbuild -bp jalbum.spec
Executing(%prep): env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/home/users/glen/bin:/usr/games:/home/users/glen/okas HOME=/home/users/glen
TMP=/home/users/glen/tmp TMPDIR=/home/users/glen/tmp /bin/sh -e /home/users/glen/tmp/rpm-tmp.82586
+ umask 022
+ cd /home/users/glen/rpm/BUILD.i686-linux
actually i'd see topdir = packages/ dir, i.e default ~/rpm/packages
--
glen
More information about the pld-devel-en
mailing list