mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
* buildRPM: Set the %_topdir variable to a known location, otherwise
we run into trouble on Fedora 10 (RPM 4.6), where the default is no longer /usr/src/something but $HOME/something. svn path=/nixpkgs/trunk/; revision=13466
This commit is contained in:
parent
349f9c13e6
commit
82ab4c6105
@ -461,6 +461,14 @@ rec {
|
|||||||
srcName="$strippedName"
|
srcName="$strippedName"
|
||||||
cp "$src" "$srcName" # `ln' doesn't work always work: RPM requires that the file is owned by root
|
cp "$src" "$srcName" # `ln' doesn't work always work: RPM requires that the file is owned by root
|
||||||
|
|
||||||
|
export HOME=/tmp/home
|
||||||
|
mkdir $HOME
|
||||||
|
|
||||||
|
rpmout=/tmp/rpmout
|
||||||
|
mkdir $rpmout $rpmout/SPECS $rpmout/BUILD $rpmout/RPMS $rpmout/SRPMS
|
||||||
|
|
||||||
|
echo "%_topdir $rpmout" >> $HOME/.rpmmacros
|
||||||
|
|
||||||
rpmbuild -vv -ta "$srcName"
|
rpmbuild -vv -ta "$srcName"
|
||||||
|
|
||||||
eval "$postBuild"
|
eval "$postBuild"
|
||||||
@ -470,7 +478,7 @@ rec {
|
|||||||
eval "$preInstall"
|
eval "$preInstall"
|
||||||
|
|
||||||
ensureDir $out/$outDir
|
ensureDir $out/$outDir
|
||||||
find /usr/src -name "*.rpm" -exec cp {} $out/$outDir \;
|
find $rpmout -name "*.rpm" -exec cp {} $out/$outDir \;
|
||||||
|
|
||||||
for i in $out/$outDir/*.rpm; do
|
for i in $out/$outDir/*.rpm; do
|
||||||
header "Generated RPM/SRPM: $i"
|
header "Generated RPM/SRPM: $i"
|
||||||
|
Loading…
Reference in New Issue
Block a user