Navigation Menu

Skip to content

Commit

Permalink
yum: use rpmbuild --target option instead of using customized .rpmrc
Browse files Browse the repository at this point in the history
refs #1455
  • Loading branch information
kenhys committed Aug 24, 2012
1 parent 255b765 commit 9d241ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/yum/build-rpm.sh
Expand Up @@ -94,8 +94,7 @@ cat <<EOM > ~/.rpmmacros
%_topdir \$HOME/rpmbuild
EOM
cat /usr/lib/rpm/rpmrc > ~/.rpmrc-for-mecab
sed -i'' -e 's/march=i386/march=i586/' ~/.rpmrc-for-mecab
architecture=\$(cut -d '-' -f 1 /etc/rpm/platform)
rm -rf rpmbuild
mkdir -p rpmbuild/SOURCES
Expand All @@ -119,8 +118,11 @@ mv *.spec ~/rpmbuild/SPECS/
mv * ~/rpmbuild/SOURCES/
cd ..
rm -rf tmp
rpmbuild -ba rpmbuild/SPECS/*.spec --rcfile ~/.rpmrc-for-mecab \
--buildroot ~/rpmbuild/BUILDROOT/\${srpm_base}
mecab_build_options="--buildroot \$HOME/rpmbuild/BUILDROOT/\${srpm_base}"
if [ \$architecture = "i386" ]; then
mecab_build_options="\${mecab_build_options} --target i586"
fi
rpmbuild -ba rpmbuild/SPECS/*.spec \${mecab_build_options}
cp -p rpmbuild/RPMS/*/*.rpm dependencies/RPMS/
cp -p rpmbuild/SRPMS/*.rpm dependencies/SRPMS/
Expand Down

0 comments on commit 9d241ae

Please sign in to comment.