1 # mpk-build - Build packages.
2 # Copyright (C) 2008,2010 Cesar Strauss
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 : ${top_srcdir:=$name-$version}
21 : ${pkg_builddir:=$builddir/$name-$version-$release/$top_srcdir}
23 if [ ! -d $pkg_builddir ]; then
25 if [ $? != 0 -o ! -d $pkg_builddir ]; then
26 echo >&2 "$(basename $0) build: Could not unpack $pkg"
65 setup_configure_options
67 echo "Configuring $pkg..."
69 echo "$pkg_configure_opt" | xargs ./configure > ../logs/configure.log
74 echo "Compiling $pkg..."
76 make $default_make_opts $make_opts > ../logs/make.log
81 echo "Installing $pkg..."
83 make install > ../logs/install.log
89 echo "================="
92 echo "================="
100 echo "===================="
102 echo " Build succeeded."
103 echo "===================="
108 echo "Usage: $(basename $0) build package-name"
113 if [ -z "$pkg" ]; then
114 echo "Usage: $(basename $0) build package-name ..."
118 recipe=$(get_recipe_name $pkg) || exit 1