summaryrefslogtreecommitdiffstats
path: root/src/opkbuild
diff options
context:
space:
mode:
Diffstat (limited to 'src/opkbuild')
-rw-r--r--src/opkbuild9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/opkbuild b/src/opkbuild
index d85a0ad..b687d4c 100644
--- a/src/opkbuild
+++ b/src/opkbuild
@@ -20,6 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. @@LIBDIR@@/opkhelper/controlfields
+. @@LIBDIR@@/opkhelper/architecture
print_usage()
{
@@ -125,6 +126,9 @@ version=$(oh_get_field Version)
# Set environment variables for the build configuration.
export OH_PLATFORM="${platform}"
export OH_ARCH="${arch}"
+echo "${OH_ARCH}" | \
+ IFS=- read OH_ARCH_CPU OH_ARCH_VENDOR OH_ARCH_KERNEL OH_ARCH_LIBS
+export OH_ARCH_CPU OH_ARCH_VENDOR OH_ARCH_KERNEL OH_ARCH_LIBS
export OH_SRCPKG="${srcpkg}"
export OH_PKGVER="${version%'-'*}"
export OH_PKGREV="${version#*'-'}"
@@ -160,8 +164,9 @@ for binpkgdir in ../*.pkg/; do
binpkg=${binpkgdir#'../'}
binpkg=${binpkg%'.pkg/'}
export OH_BINPKG="${binpkg}"
- # TODO: Check architecture.
- if true; then
+ # Check architecture.
+ oh_is_buildable "${binpkg}"
+ if [ ${?} -eq 0 ]; then
printf 'opkbuild: Attempting to build package "%s"...\n' "${binpkg}"
# Make installation directory.
# TODO: Maybe this should be an FHS-compliant filesystem hierarchy.