diff --git a/aports/binutils-aarch64/APKBUILD b/aports/cross/binutils-aarch64/APKBUILD similarity index 100% rename from aports/binutils-aarch64/APKBUILD rename to aports/cross/binutils-aarch64/APKBUILD diff --git a/aports/binutils-aarch64/CVE-2017-7614.patch b/aports/cross/binutils-aarch64/CVE-2017-7614.patch similarity index 100% rename from aports/binutils-aarch64/CVE-2017-7614.patch rename to aports/cross/binutils-aarch64/CVE-2017-7614.patch diff --git a/aports/binutils-aarch64/binutils-ld-fix-static-linking.patch b/aports/cross/binutils-aarch64/binutils-ld-fix-static-linking.patch similarity index 100% rename from aports/binutils-aarch64/binutils-ld-fix-static-linking.patch rename to aports/cross/binutils-aarch64/binutils-ld-fix-static-linking.patch diff --git a/aports/binutils-aarch64/hash-style-gnu.patch b/aports/cross/binutils-aarch64/hash-style-gnu.patch similarity index 100% rename from aports/binutils-aarch64/hash-style-gnu.patch rename to aports/cross/binutils-aarch64/hash-style-gnu.patch diff --git a/aports/binutils-armhf/APKBUILD b/aports/cross/binutils-armhf/APKBUILD similarity index 100% rename from aports/binutils-armhf/APKBUILD rename to aports/cross/binutils-armhf/APKBUILD diff --git a/aports/binutils-armhf/CVE-2017-7614.patch b/aports/cross/binutils-armhf/CVE-2017-7614.patch similarity index 100% rename from aports/binutils-armhf/CVE-2017-7614.patch rename to aports/cross/binutils-armhf/CVE-2017-7614.patch diff --git a/aports/binutils-armhf/binutils-ld-fix-static-linking.patch b/aports/cross/binutils-armhf/binutils-ld-fix-static-linking.patch similarity index 100% rename from aports/binutils-armhf/binutils-ld-fix-static-linking.patch rename to aports/cross/binutils-armhf/binutils-ld-fix-static-linking.patch diff --git a/aports/binutils-armhf/hash-style-gnu.patch b/aports/cross/binutils-armhf/hash-style-gnu.patch similarity index 100% rename from aports/binutils-armhf/hash-style-gnu.patch rename to aports/cross/binutils-armhf/hash-style-gnu.patch diff --git a/aports/busybox-static-aarch64/APKBUILD b/aports/cross/busybox-static-aarch64/APKBUILD similarity index 100% rename from aports/busybox-static-aarch64/APKBUILD rename to aports/cross/busybox-static-aarch64/APKBUILD diff --git a/aports/busybox-static-armhf/APKBUILD b/aports/cross/busybox-static-armhf/APKBUILD similarity index 100% rename from aports/busybox-static-armhf/APKBUILD rename to aports/cross/busybox-static-armhf/APKBUILD diff --git a/aports/gcc-aarch64/001_all_default-ssp-strong.patch b/aports/cross/gcc-aarch64/001_all_default-ssp-strong.patch similarity index 100% rename from aports/gcc-aarch64/001_all_default-ssp-strong.patch rename to aports/cross/gcc-aarch64/001_all_default-ssp-strong.patch diff --git a/aports/gcc-aarch64/002_all_default-relro.patch b/aports/cross/gcc-aarch64/002_all_default-relro.patch similarity index 100% rename from aports/gcc-aarch64/002_all_default-relro.patch rename to aports/cross/gcc-aarch64/002_all_default-relro.patch diff --git a/aports/gcc-aarch64/003_all_default-fortify-source.patch b/aports/cross/gcc-aarch64/003_all_default-fortify-source.patch similarity index 100% rename from aports/gcc-aarch64/003_all_default-fortify-source.patch rename to aports/cross/gcc-aarch64/003_all_default-fortify-source.patch diff --git a/aports/gcc-aarch64/005_all_default-as-needed.patch b/aports/cross/gcc-aarch64/005_all_default-as-needed.patch similarity index 100% rename from aports/gcc-aarch64/005_all_default-as-needed.patch rename to aports/cross/gcc-aarch64/005_all_default-as-needed.patch diff --git a/aports/gcc-aarch64/011_all_default-warn-format-security.patch b/aports/cross/gcc-aarch64/011_all_default-warn-format-security.patch similarity index 100% rename from aports/gcc-aarch64/011_all_default-warn-format-security.patch rename to aports/cross/gcc-aarch64/011_all_default-warn-format-security.patch diff --git a/aports/gcc-aarch64/012_all_default-warn-trampolines.patch b/aports/cross/gcc-aarch64/012_all_default-warn-trampolines.patch similarity index 100% rename from aports/gcc-aarch64/012_all_default-warn-trampolines.patch rename to aports/cross/gcc-aarch64/012_all_default-warn-trampolines.patch diff --git a/aports/gcc-aarch64/020_all_msgfmt-libstdc++-link.patch b/aports/cross/gcc-aarch64/020_all_msgfmt-libstdc++-link.patch similarity index 100% rename from aports/gcc-aarch64/020_all_msgfmt-libstdc++-link.patch rename to aports/cross/gcc-aarch64/020_all_msgfmt-libstdc++-link.patch diff --git a/aports/gcc-aarch64/050_all_libiberty-asprintf.patch b/aports/cross/gcc-aarch64/050_all_libiberty-asprintf.patch similarity index 100% rename from aports/gcc-aarch64/050_all_libiberty-asprintf.patch rename to aports/cross/gcc-aarch64/050_all_libiberty-asprintf.patch diff --git a/aports/gcc-aarch64/051_all_libiberty-pic.patch b/aports/cross/gcc-aarch64/051_all_libiberty-pic.patch similarity index 100% rename from aports/gcc-aarch64/051_all_libiberty-pic.patch rename to aports/cross/gcc-aarch64/051_all_libiberty-pic.patch diff --git a/aports/gcc-aarch64/053_all_libitm-no-fortify-source.patch b/aports/cross/gcc-aarch64/053_all_libitm-no-fortify-source.patch similarity index 100% rename from aports/gcc-aarch64/053_all_libitm-no-fortify-source.patch rename to aports/cross/gcc-aarch64/053_all_libitm-no-fortify-source.patch diff --git a/aports/gcc-aarch64/067_all_gcc-poison-system-directories.patch b/aports/cross/gcc-aarch64/067_all_gcc-poison-system-directories.patch similarity index 100% rename from aports/gcc-aarch64/067_all_gcc-poison-system-directories.patch rename to aports/cross/gcc-aarch64/067_all_gcc-poison-system-directories.patch diff --git a/aports/gcc-aarch64/090_all_pr55930-dependency-tracking.patch b/aports/cross/gcc-aarch64/090_all_pr55930-dependency-tracking.patch similarity index 100% rename from aports/gcc-aarch64/090_all_pr55930-dependency-tracking.patch rename to aports/cross/gcc-aarch64/090_all_pr55930-dependency-tracking.patch diff --git a/aports/gcc-aarch64/201-cilkrts.patch b/aports/cross/gcc-aarch64/201-cilkrts.patch similarity index 100% rename from aports/gcc-aarch64/201-cilkrts.patch rename to aports/cross/gcc-aarch64/201-cilkrts.patch diff --git a/aports/gcc-aarch64/203-libgcc_s.patch b/aports/cross/gcc-aarch64/203-libgcc_s.patch similarity index 100% rename from aports/gcc-aarch64/203-libgcc_s.patch rename to aports/cross/gcc-aarch64/203-libgcc_s.patch diff --git a/aports/gcc-aarch64/204-linux_libc_has_function.patch b/aports/cross/gcc-aarch64/204-linux_libc_has_function.patch similarity index 100% rename from aports/gcc-aarch64/204-linux_libc_has_function.patch rename to aports/cross/gcc-aarch64/204-linux_libc_has_function.patch diff --git a/aports/gcc-aarch64/205-nopie.patch b/aports/cross/gcc-aarch64/205-nopie.patch similarity index 100% rename from aports/gcc-aarch64/205-nopie.patch rename to aports/cross/gcc-aarch64/205-nopie.patch diff --git a/aports/gcc-aarch64/207-static-pie.patch b/aports/cross/gcc-aarch64/207-static-pie.patch similarity index 100% rename from aports/gcc-aarch64/207-static-pie.patch rename to aports/cross/gcc-aarch64/207-static-pie.patch diff --git a/aports/gcc-aarch64/300-main-gcc-add-musl-s390x-dynamic-linker.patch b/aports/cross/gcc-aarch64/300-main-gcc-add-musl-s390x-dynamic-linker.patch similarity index 100% rename from aports/gcc-aarch64/300-main-gcc-add-musl-s390x-dynamic-linker.patch rename to aports/cross/gcc-aarch64/300-main-gcc-add-musl-s390x-dynamic-linker.patch diff --git a/aports/gcc-aarch64/310-build-gcj-s390x.patch b/aports/cross/gcc-aarch64/310-build-gcj-s390x.patch similarity index 100% rename from aports/gcc-aarch64/310-build-gcj-s390x.patch rename to aports/cross/gcc-aarch64/310-build-gcj-s390x.patch diff --git a/aports/gcc-aarch64/320-libffi-gnulinux.patch b/aports/cross/gcc-aarch64/320-libffi-gnulinux.patch similarity index 100% rename from aports/gcc-aarch64/320-libffi-gnulinux.patch rename to aports/cross/gcc-aarch64/320-libffi-gnulinux.patch diff --git a/aports/gcc-aarch64/APKBUILD b/aports/cross/gcc-aarch64/APKBUILD similarity index 100% rename from aports/gcc-aarch64/APKBUILD rename to aports/cross/gcc-aarch64/APKBUILD diff --git a/aports/gcc-aarch64/ada-aarch64-multiarch.patch b/aports/cross/gcc-aarch64/ada-aarch64-multiarch.patch similarity index 100% rename from aports/gcc-aarch64/ada-aarch64-multiarch.patch rename to aports/cross/gcc-aarch64/ada-aarch64-multiarch.patch diff --git a/aports/gcc-aarch64/ada-fixes.patch b/aports/cross/gcc-aarch64/ada-fixes.patch similarity index 100% rename from aports/gcc-aarch64/ada-fixes.patch rename to aports/cross/gcc-aarch64/ada-fixes.patch diff --git a/aports/gcc-aarch64/ada-musl.patch b/aports/cross/gcc-aarch64/ada-musl.patch similarity index 100% rename from aports/gcc-aarch64/ada-musl.patch rename to aports/cross/gcc-aarch64/ada-musl.patch diff --git a/aports/gcc-aarch64/ada-shared.patch b/aports/cross/gcc-aarch64/ada-shared.patch similarity index 100% rename from aports/gcc-aarch64/ada-shared.patch rename to aports/cross/gcc-aarch64/ada-shared.patch diff --git a/aports/gcc-aarch64/boehm-gc-musl.patch b/aports/cross/gcc-aarch64/boehm-gc-musl.patch similarity index 100% rename from aports/gcc-aarch64/boehm-gc-musl.patch rename to aports/cross/gcc-aarch64/boehm-gc-musl.patch diff --git a/aports/gcc-aarch64/fix-cxxflags-passing.patch b/aports/cross/gcc-aarch64/fix-cxxflags-passing.patch similarity index 100% rename from aports/gcc-aarch64/fix-cxxflags-passing.patch rename to aports/cross/gcc-aarch64/fix-cxxflags-passing.patch diff --git a/aports/gcc-aarch64/fix-gcj-iconv-musl.patch b/aports/cross/gcc-aarch64/fix-gcj-iconv-musl.patch similarity index 100% rename from aports/gcc-aarch64/fix-gcj-iconv-musl.patch rename to aports/cross/gcc-aarch64/fix-gcj-iconv-musl.patch diff --git a/aports/gcc-aarch64/fix-gcj-musl.patch b/aports/cross/gcc-aarch64/fix-gcj-musl.patch similarity index 100% rename from aports/gcc-aarch64/fix-gcj-musl.patch rename to aports/cross/gcc-aarch64/fix-gcj-musl.patch diff --git a/aports/gcc-aarch64/fix-gcj-stdgnu14-link.patch b/aports/cross/gcc-aarch64/fix-gcj-stdgnu14-link.patch similarity index 100% rename from aports/gcc-aarch64/fix-gcj-stdgnu14-link.patch rename to aports/cross/gcc-aarch64/fix-gcj-stdgnu14-link.patch diff --git a/aports/gcc-aarch64/fix-rs6000-pie.patch b/aports/cross/gcc-aarch64/fix-rs6000-pie.patch similarity index 100% rename from aports/gcc-aarch64/fix-rs6000-pie.patch rename to aports/cross/gcc-aarch64/fix-rs6000-pie.patch diff --git a/aports/gcc-aarch64/gcc-4.8-build-args.patch b/aports/cross/gcc-aarch64/gcc-4.8-build-args.patch similarity index 100% rename from aports/gcc-aarch64/gcc-4.8-build-args.patch rename to aports/cross/gcc-aarch64/gcc-4.8-build-args.patch diff --git a/aports/gcc-aarch64/gcc-4.9-musl-fortify.patch b/aports/cross/gcc-aarch64/gcc-4.9-musl-fortify.patch similarity index 100% rename from aports/gcc-aarch64/gcc-4.9-musl-fortify.patch rename to aports/cross/gcc-aarch64/gcc-4.9-musl-fortify.patch diff --git a/aports/gcc-aarch64/gcc-6.1-musl-libssp.patch b/aports/cross/gcc-aarch64/gcc-6.1-musl-libssp.patch similarity index 100% rename from aports/gcc-aarch64/gcc-6.1-musl-libssp.patch rename to aports/cross/gcc-aarch64/gcc-6.1-musl-libssp.patch diff --git a/aports/gcc-aarch64/gcc-pure64.patch b/aports/cross/gcc-aarch64/gcc-pure64.patch similarity index 100% rename from aports/gcc-aarch64/gcc-pure64.patch rename to aports/cross/gcc-aarch64/gcc-pure64.patch diff --git a/aports/gcc-aarch64/libgcc-always-build-gcceh.a.patch b/aports/cross/gcc-aarch64/libgcc-always-build-gcceh.a.patch similarity index 100% rename from aports/gcc-aarch64/libgcc-always-build-gcceh.a.patch rename to aports/cross/gcc-aarch64/libgcc-always-build-gcceh.a.patch diff --git a/aports/gcc-armhf/001_all_default-ssp-strong.patch b/aports/cross/gcc-armhf/001_all_default-ssp-strong.patch similarity index 100% rename from aports/gcc-armhf/001_all_default-ssp-strong.patch rename to aports/cross/gcc-armhf/001_all_default-ssp-strong.patch diff --git a/aports/gcc-armhf/002_all_default-relro.patch b/aports/cross/gcc-armhf/002_all_default-relro.patch similarity index 100% rename from aports/gcc-armhf/002_all_default-relro.patch rename to aports/cross/gcc-armhf/002_all_default-relro.patch diff --git a/aports/gcc-armhf/003_all_default-fortify-source.patch b/aports/cross/gcc-armhf/003_all_default-fortify-source.patch similarity index 100% rename from aports/gcc-armhf/003_all_default-fortify-source.patch rename to aports/cross/gcc-armhf/003_all_default-fortify-source.patch diff --git a/aports/gcc-armhf/005_all_default-as-needed.patch b/aports/cross/gcc-armhf/005_all_default-as-needed.patch similarity index 100% rename from aports/gcc-armhf/005_all_default-as-needed.patch rename to aports/cross/gcc-armhf/005_all_default-as-needed.patch diff --git a/aports/gcc-armhf/011_all_default-warn-format-security.patch b/aports/cross/gcc-armhf/011_all_default-warn-format-security.patch similarity index 100% rename from aports/gcc-armhf/011_all_default-warn-format-security.patch rename to aports/cross/gcc-armhf/011_all_default-warn-format-security.patch diff --git a/aports/gcc-armhf/012_all_default-warn-trampolines.patch b/aports/cross/gcc-armhf/012_all_default-warn-trampolines.patch similarity index 100% rename from aports/gcc-armhf/012_all_default-warn-trampolines.patch rename to aports/cross/gcc-armhf/012_all_default-warn-trampolines.patch diff --git a/aports/gcc-armhf/020_all_msgfmt-libstdc++-link.patch b/aports/cross/gcc-armhf/020_all_msgfmt-libstdc++-link.patch similarity index 100% rename from aports/gcc-armhf/020_all_msgfmt-libstdc++-link.patch rename to aports/cross/gcc-armhf/020_all_msgfmt-libstdc++-link.patch diff --git a/aports/gcc-armhf/050_all_libiberty-asprintf.patch b/aports/cross/gcc-armhf/050_all_libiberty-asprintf.patch similarity index 100% rename from aports/gcc-armhf/050_all_libiberty-asprintf.patch rename to aports/cross/gcc-armhf/050_all_libiberty-asprintf.patch diff --git a/aports/gcc-armhf/051_all_libiberty-pic.patch b/aports/cross/gcc-armhf/051_all_libiberty-pic.patch similarity index 100% rename from aports/gcc-armhf/051_all_libiberty-pic.patch rename to aports/cross/gcc-armhf/051_all_libiberty-pic.patch diff --git a/aports/gcc-armhf/053_all_libitm-no-fortify-source.patch b/aports/cross/gcc-armhf/053_all_libitm-no-fortify-source.patch similarity index 100% rename from aports/gcc-armhf/053_all_libitm-no-fortify-source.patch rename to aports/cross/gcc-armhf/053_all_libitm-no-fortify-source.patch diff --git a/aports/gcc-armhf/067_all_gcc-poison-system-directories.patch b/aports/cross/gcc-armhf/067_all_gcc-poison-system-directories.patch similarity index 100% rename from aports/gcc-armhf/067_all_gcc-poison-system-directories.patch rename to aports/cross/gcc-armhf/067_all_gcc-poison-system-directories.patch diff --git a/aports/gcc-armhf/090_all_pr55930-dependency-tracking.patch b/aports/cross/gcc-armhf/090_all_pr55930-dependency-tracking.patch similarity index 100% rename from aports/gcc-armhf/090_all_pr55930-dependency-tracking.patch rename to aports/cross/gcc-armhf/090_all_pr55930-dependency-tracking.patch diff --git a/aports/gcc-armhf/201-cilkrts.patch b/aports/cross/gcc-armhf/201-cilkrts.patch similarity index 100% rename from aports/gcc-armhf/201-cilkrts.patch rename to aports/cross/gcc-armhf/201-cilkrts.patch diff --git a/aports/gcc-armhf/203-libgcc_s.patch b/aports/cross/gcc-armhf/203-libgcc_s.patch similarity index 100% rename from aports/gcc-armhf/203-libgcc_s.patch rename to aports/cross/gcc-armhf/203-libgcc_s.patch diff --git a/aports/gcc-armhf/204-linux_libc_has_function.patch b/aports/cross/gcc-armhf/204-linux_libc_has_function.patch similarity index 100% rename from aports/gcc-armhf/204-linux_libc_has_function.patch rename to aports/cross/gcc-armhf/204-linux_libc_has_function.patch diff --git a/aports/gcc-armhf/205-nopie.patch b/aports/cross/gcc-armhf/205-nopie.patch similarity index 100% rename from aports/gcc-armhf/205-nopie.patch rename to aports/cross/gcc-armhf/205-nopie.patch diff --git a/aports/gcc-armhf/207-static-pie.patch b/aports/cross/gcc-armhf/207-static-pie.patch similarity index 100% rename from aports/gcc-armhf/207-static-pie.patch rename to aports/cross/gcc-armhf/207-static-pie.patch diff --git a/aports/gcc-armhf/300-main-gcc-add-musl-s390x-dynamic-linker.patch b/aports/cross/gcc-armhf/300-main-gcc-add-musl-s390x-dynamic-linker.patch similarity index 100% rename from aports/gcc-armhf/300-main-gcc-add-musl-s390x-dynamic-linker.patch rename to aports/cross/gcc-armhf/300-main-gcc-add-musl-s390x-dynamic-linker.patch diff --git a/aports/gcc-armhf/310-build-gcj-s390x.patch b/aports/cross/gcc-armhf/310-build-gcj-s390x.patch similarity index 100% rename from aports/gcc-armhf/310-build-gcj-s390x.patch rename to aports/cross/gcc-armhf/310-build-gcj-s390x.patch diff --git a/aports/gcc-armhf/320-libffi-gnulinux.patch b/aports/cross/gcc-armhf/320-libffi-gnulinux.patch similarity index 100% rename from aports/gcc-armhf/320-libffi-gnulinux.patch rename to aports/cross/gcc-armhf/320-libffi-gnulinux.patch diff --git a/aports/gcc-armhf/APKBUILD b/aports/cross/gcc-armhf/APKBUILD similarity index 100% rename from aports/gcc-armhf/APKBUILD rename to aports/cross/gcc-armhf/APKBUILD diff --git a/aports/gcc-armhf/ada-aarch64-multiarch.patch b/aports/cross/gcc-armhf/ada-aarch64-multiarch.patch similarity index 100% rename from aports/gcc-armhf/ada-aarch64-multiarch.patch rename to aports/cross/gcc-armhf/ada-aarch64-multiarch.patch diff --git a/aports/gcc-armhf/ada-fixes.patch b/aports/cross/gcc-armhf/ada-fixes.patch similarity index 100% rename from aports/gcc-armhf/ada-fixes.patch rename to aports/cross/gcc-armhf/ada-fixes.patch diff --git a/aports/gcc-armhf/ada-musl.patch b/aports/cross/gcc-armhf/ada-musl.patch similarity index 100% rename from aports/gcc-armhf/ada-musl.patch rename to aports/cross/gcc-armhf/ada-musl.patch diff --git a/aports/gcc-armhf/ada-shared.patch b/aports/cross/gcc-armhf/ada-shared.patch similarity index 100% rename from aports/gcc-armhf/ada-shared.patch rename to aports/cross/gcc-armhf/ada-shared.patch diff --git a/aports/gcc-armhf/boehm-gc-musl.patch b/aports/cross/gcc-armhf/boehm-gc-musl.patch similarity index 100% rename from aports/gcc-armhf/boehm-gc-musl.patch rename to aports/cross/gcc-armhf/boehm-gc-musl.patch diff --git a/aports/gcc-armhf/fix-cxxflags-passing.patch b/aports/cross/gcc-armhf/fix-cxxflags-passing.patch similarity index 100% rename from aports/gcc-armhf/fix-cxxflags-passing.patch rename to aports/cross/gcc-armhf/fix-cxxflags-passing.patch diff --git a/aports/gcc-armhf/fix-gcj-iconv-musl.patch b/aports/cross/gcc-armhf/fix-gcj-iconv-musl.patch similarity index 100% rename from aports/gcc-armhf/fix-gcj-iconv-musl.patch rename to aports/cross/gcc-armhf/fix-gcj-iconv-musl.patch diff --git a/aports/gcc-armhf/fix-gcj-musl.patch b/aports/cross/gcc-armhf/fix-gcj-musl.patch similarity index 100% rename from aports/gcc-armhf/fix-gcj-musl.patch rename to aports/cross/gcc-armhf/fix-gcj-musl.patch diff --git a/aports/gcc-armhf/fix-gcj-stdgnu14-link.patch b/aports/cross/gcc-armhf/fix-gcj-stdgnu14-link.patch similarity index 100% rename from aports/gcc-armhf/fix-gcj-stdgnu14-link.patch rename to aports/cross/gcc-armhf/fix-gcj-stdgnu14-link.patch diff --git a/aports/gcc-armhf/fix-rs6000-pie.patch b/aports/cross/gcc-armhf/fix-rs6000-pie.patch similarity index 100% rename from aports/gcc-armhf/fix-rs6000-pie.patch rename to aports/cross/gcc-armhf/fix-rs6000-pie.patch diff --git a/aports/gcc-armhf/gcc-4.8-build-args.patch b/aports/cross/gcc-armhf/gcc-4.8-build-args.patch similarity index 100% rename from aports/gcc-armhf/gcc-4.8-build-args.patch rename to aports/cross/gcc-armhf/gcc-4.8-build-args.patch diff --git a/aports/gcc-armhf/gcc-4.9-musl-fortify.patch b/aports/cross/gcc-armhf/gcc-4.9-musl-fortify.patch similarity index 100% rename from aports/gcc-armhf/gcc-4.9-musl-fortify.patch rename to aports/cross/gcc-armhf/gcc-4.9-musl-fortify.patch diff --git a/aports/gcc-armhf/gcc-6.1-musl-libssp.patch b/aports/cross/gcc-armhf/gcc-6.1-musl-libssp.patch similarity index 100% rename from aports/gcc-armhf/gcc-6.1-musl-libssp.patch rename to aports/cross/gcc-armhf/gcc-6.1-musl-libssp.patch diff --git a/aports/gcc-armhf/gcc-pure64.patch b/aports/cross/gcc-armhf/gcc-pure64.patch similarity index 100% rename from aports/gcc-armhf/gcc-pure64.patch rename to aports/cross/gcc-armhf/gcc-pure64.patch diff --git a/aports/gcc-armhf/libgcc-always-build-gcceh.a.patch b/aports/cross/gcc-armhf/libgcc-always-build-gcceh.a.patch similarity index 100% rename from aports/gcc-armhf/libgcc-always-build-gcceh.a.patch rename to aports/cross/gcc-armhf/libgcc-always-build-gcceh.a.patch diff --git a/aports/musl-aarch64/APKBUILD b/aports/cross/musl-aarch64/APKBUILD similarity index 100% rename from aports/musl-aarch64/APKBUILD rename to aports/cross/musl-aarch64/APKBUILD diff --git a/aports/musl-armhf/APKBUILD b/aports/cross/musl-armhf/APKBUILD similarity index 100% rename from aports/musl-armhf/APKBUILD rename to aports/cross/musl-armhf/APKBUILD diff --git a/aports/qemu-user-static-repack/APKBUILD b/aports/cross/qemu-user-static-repack/APKBUILD similarity index 100% rename from aports/qemu-user-static-repack/APKBUILD rename to aports/cross/qemu-user-static-repack/APKBUILD diff --git a/aports/device-asus-grouper/90-android-touch-dev.rules b/aports/device/device-asus-grouper/90-android-touch-dev.rules similarity index 100% rename from aports/device-asus-grouper/90-android-touch-dev.rules rename to aports/device/device-asus-grouper/90-android-touch-dev.rules diff --git a/aports/device-asus-grouper/APKBUILD b/aports/device/device-asus-grouper/APKBUILD similarity index 100% rename from aports/device-asus-grouper/APKBUILD rename to aports/device/device-asus-grouper/APKBUILD diff --git a/aports/device-asus-grouper/deviceinfo b/aports/device/device-asus-grouper/deviceinfo similarity index 100% rename from aports/device-asus-grouper/deviceinfo rename to aports/device/device-asus-grouper/deviceinfo diff --git a/aports/device-asus-grouper/initfs-hook.sh b/aports/device/device-asus-grouper/initfs-hook.sh similarity index 100% rename from aports/device-asus-grouper/initfs-hook.sh rename to aports/device/device-asus-grouper/initfs-hook.sh diff --git a/aports/device-htc-ace/90-android-touch-dev.rules b/aports/device/device-htc-ace/90-android-touch-dev.rules similarity index 100% rename from aports/device-htc-ace/90-android-touch-dev.rules rename to aports/device/device-htc-ace/90-android-touch-dev.rules diff --git a/aports/device-htc-ace/APKBUILD b/aports/device/device-htc-ace/APKBUILD similarity index 100% rename from aports/device-htc-ace/APKBUILD rename to aports/device/device-htc-ace/APKBUILD diff --git a/aports/device-htc-ace/deviceinfo b/aports/device/device-htc-ace/deviceinfo similarity index 100% rename from aports/device-htc-ace/deviceinfo rename to aports/device/device-htc-ace/deviceinfo diff --git a/aports/device-htc-ace/initfs-hook.sh b/aports/device/device-htc-ace/initfs-hook.sh similarity index 100% rename from aports/device-htc-ace/initfs-hook.sh rename to aports/device/device-htc-ace/initfs-hook.sh diff --git a/aports/device-htc-bravo/90-android-touch-dev.rules b/aports/device/device-htc-bravo/90-android-touch-dev.rules similarity index 100% rename from aports/device-htc-bravo/90-android-touch-dev.rules rename to aports/device/device-htc-bravo/90-android-touch-dev.rules diff --git a/aports/device-htc-bravo/APKBUILD b/aports/device/device-htc-bravo/APKBUILD similarity index 100% rename from aports/device-htc-bravo/APKBUILD rename to aports/device/device-htc-bravo/APKBUILD diff --git a/aports/device-htc-bravo/deviceinfo b/aports/device/device-htc-bravo/deviceinfo similarity index 100% rename from aports/device-htc-bravo/deviceinfo rename to aports/device/device-htc-bravo/deviceinfo diff --git a/aports/device-htc-bravo/initfs-hook.sh b/aports/device/device-htc-bravo/initfs-hook.sh similarity index 100% rename from aports/device-htc-bravo/initfs-hook.sh rename to aports/device/device-htc-bravo/initfs-hook.sh diff --git a/aports/device-lg-d855/90-android.rules b/aports/device/device-lg-d855/90-android.rules similarity index 100% rename from aports/device-lg-d855/90-android.rules rename to aports/device/device-lg-d855/90-android.rules diff --git a/aports/device-lg-d855/APKBUILD b/aports/device/device-lg-d855/APKBUILD similarity index 100% rename from aports/device-lg-d855/APKBUILD rename to aports/device/device-lg-d855/APKBUILD diff --git a/aports/device-lg-d855/deviceinfo b/aports/device/device-lg-d855/deviceinfo similarity index 100% rename from aports/device-lg-d855/deviceinfo rename to aports/device/device-lg-d855/deviceinfo diff --git a/aports/device-lg-d855/initfs-hook.sh b/aports/device/device-lg-d855/initfs-hook.sh similarity index 100% rename from aports/device-lg-d855/initfs-hook.sh rename to aports/device/device-lg-d855/initfs-hook.sh diff --git a/aports/device-lg-hammerhead/90-android-touch-dev.rules b/aports/device/device-lg-hammerhead/90-android-touch-dev.rules similarity index 100% rename from aports/device-lg-hammerhead/90-android-touch-dev.rules rename to aports/device/device-lg-hammerhead/90-android-touch-dev.rules diff --git a/aports/device-lg-hammerhead/APKBUILD b/aports/device/device-lg-hammerhead/APKBUILD similarity index 100% rename from aports/device-lg-hammerhead/APKBUILD rename to aports/device/device-lg-hammerhead/APKBUILD diff --git a/aports/device-lg-hammerhead/bcmdhd.cal b/aports/device/device-lg-hammerhead/bcmdhd.cal similarity index 100% rename from aports/device-lg-hammerhead/bcmdhd.cal rename to aports/device/device-lg-hammerhead/bcmdhd.cal diff --git a/aports/device-lg-hammerhead/deviceinfo b/aports/device/device-lg-hammerhead/deviceinfo similarity index 100% rename from aports/device-lg-hammerhead/deviceinfo rename to aports/device/device-lg-hammerhead/deviceinfo diff --git a/aports/device-lg-hammerhead/initfs-hook.sh b/aports/device/device-lg-hammerhead/initfs-hook.sh similarity index 100% rename from aports/device-lg-hammerhead/initfs-hook.sh rename to aports/device/device-lg-hammerhead/initfs-hook.sh diff --git a/aports/device-lg-hammerhead/profile.sh b/aports/device/device-lg-hammerhead/profile.sh similarity index 100% rename from aports/device-lg-hammerhead/profile.sh rename to aports/device/device-lg-hammerhead/profile.sh diff --git a/aports/device-lg-mako/90-android-touch-dev.rules b/aports/device/device-lg-mako/90-android-touch-dev.rules similarity index 100% rename from aports/device-lg-mako/90-android-touch-dev.rules rename to aports/device/device-lg-mako/90-android-touch-dev.rules diff --git a/aports/device-lg-mako/APKBUILD b/aports/device/device-lg-mako/APKBUILD similarity index 100% rename from aports/device-lg-mako/APKBUILD rename to aports/device/device-lg-mako/APKBUILD diff --git a/aports/device-lg-mako/deviceinfo b/aports/device/device-lg-mako/deviceinfo similarity index 100% rename from aports/device-lg-mako/deviceinfo rename to aports/device/device-lg-mako/deviceinfo diff --git a/aports/device-lg-mako/initfs-hook.sh b/aports/device/device-lg-mako/initfs-hook.sh similarity index 100% rename from aports/device-lg-mako/initfs-hook.sh rename to aports/device/device-lg-mako/initfs-hook.sh diff --git a/aports/device-lg-mako/profile.sh b/aports/device/device-lg-mako/profile.sh similarity index 100% rename from aports/device-lg-mako/profile.sh rename to aports/device/device-lg-mako/profile.sh diff --git a/aports/device-motorola-titan/90-android-touch-dev.rules b/aports/device/device-motorola-titan/90-android-touch-dev.rules similarity index 100% rename from aports/device-motorola-titan/90-android-touch-dev.rules rename to aports/device/device-motorola-titan/90-android-touch-dev.rules diff --git a/aports/device-motorola-titan/APKBUILD b/aports/device/device-motorola-titan/APKBUILD similarity index 100% rename from aports/device-motorola-titan/APKBUILD rename to aports/device/device-motorola-titan/APKBUILD diff --git a/aports/device-motorola-titan/deviceinfo b/aports/device/device-motorola-titan/deviceinfo similarity index 100% rename from aports/device-motorola-titan/deviceinfo rename to aports/device/device-motorola-titan/deviceinfo diff --git a/aports/device-motorola-titan/initfs-hook.sh b/aports/device/device-motorola-titan/initfs-hook.sh similarity index 100% rename from aports/device-motorola-titan/initfs-hook.sh rename to aports/device/device-motorola-titan/initfs-hook.sh diff --git a/aports/device-motorola-titan/profile.sh b/aports/device/device-motorola-titan/profile.sh similarity index 100% rename from aports/device-motorola-titan/profile.sh rename to aports/device/device-motorola-titan/profile.sh diff --git a/aports/device-nokia-rx51/90-touchscreen-dev.rules b/aports/device/device-nokia-rx51/90-touchscreen-dev.rules similarity index 100% rename from aports/device-nokia-rx51/90-touchscreen-dev.rules rename to aports/device/device-nokia-rx51/90-touchscreen-dev.rules diff --git a/aports/device-nokia-rx51/APKBUILD b/aports/device/device-nokia-rx51/APKBUILD similarity index 100% rename from aports/device-nokia-rx51/APKBUILD rename to aports/device/device-nokia-rx51/APKBUILD diff --git a/aports/device-nokia-rx51/acpi.map b/aports/device/device-nokia-rx51/acpi.map similarity index 100% rename from aports/device-nokia-rx51/acpi.map rename to aports/device/device-nokia-rx51/acpi.map diff --git a/aports/device-nokia-rx51/acpi_handler.sh b/aports/device/device-nokia-rx51/acpi_handler.sh similarity index 100% rename from aports/device-nokia-rx51/acpi_handler.sh rename to aports/device/device-nokia-rx51/acpi_handler.sh diff --git a/aports/device-nokia-rx51/backlight-enable.sh b/aports/device/device-nokia-rx51/backlight-enable.sh similarity index 100% rename from aports/device-nokia-rx51/backlight-enable.sh rename to aports/device/device-nokia-rx51/backlight-enable.sh diff --git a/aports/device-nokia-rx51/device-nokia-rx51.post-install b/aports/device/device-nokia-rx51/device-nokia-rx51.post-install similarity index 100% rename from aports/device-nokia-rx51/device-nokia-rx51.post-install rename to aports/device/device-nokia-rx51/device-nokia-rx51.post-install diff --git a/aports/device-nokia-rx51/deviceinfo b/aports/device/device-nokia-rx51/deviceinfo similarity index 100% rename from aports/device-nokia-rx51/deviceinfo rename to aports/device/device-nokia-rx51/deviceinfo diff --git a/aports/device-nokia-rx51/uboot-script.cmd b/aports/device/device-nokia-rx51/uboot-script.cmd similarity index 100% rename from aports/device-nokia-rx51/uboot-script.cmd rename to aports/device/device-nokia-rx51/uboot-script.cmd diff --git a/aports/device-qemu-amd64/APKBUILD b/aports/device/device-qemu-amd64/APKBUILD similarity index 100% rename from aports/device-qemu-amd64/APKBUILD rename to aports/device/device-qemu-amd64/APKBUILD diff --git a/aports/device-qemu-amd64/deviceinfo b/aports/device/device-qemu-amd64/deviceinfo similarity index 100% rename from aports/device-qemu-amd64/deviceinfo rename to aports/device/device-qemu-amd64/deviceinfo diff --git a/aports/device-qemu-vexpress/APKBUILD b/aports/device/device-qemu-vexpress/APKBUILD similarity index 100% rename from aports/device-qemu-vexpress/APKBUILD rename to aports/device/device-qemu-vexpress/APKBUILD diff --git a/aports/device-qemu-vexpress/deviceinfo b/aports/device/device-qemu-vexpress/deviceinfo similarity index 100% rename from aports/device-qemu-vexpress/deviceinfo rename to aports/device/device-qemu-vexpress/deviceinfo diff --git a/aports/device-samsung-i9070/90-android.rules b/aports/device/device-samsung-i9070/90-android.rules similarity index 100% rename from aports/device-samsung-i9070/90-android.rules rename to aports/device/device-samsung-i9070/90-android.rules diff --git a/aports/device-samsung-i9070/APKBUILD b/aports/device/device-samsung-i9070/APKBUILD similarity index 100% rename from aports/device-samsung-i9070/APKBUILD rename to aports/device/device-samsung-i9070/APKBUILD diff --git a/aports/device-samsung-i9070/deviceinfo b/aports/device/device-samsung-i9070/deviceinfo similarity index 100% rename from aports/device-samsung-i9070/deviceinfo rename to aports/device/device-samsung-i9070/deviceinfo diff --git a/aports/device-samsung-i9070/initfs-hook.sh b/aports/device/device-samsung-i9070/initfs-hook.sh similarity index 100% rename from aports/device-samsung-i9070/initfs-hook.sh rename to aports/device/device-samsung-i9070/initfs-hook.sh diff --git a/aports/device-samsung-i9070/modules-load.conf b/aports/device/device-samsung-i9070/modules-load.conf similarity index 100% rename from aports/device-samsung-i9070/modules-load.conf rename to aports/device/device-samsung-i9070/modules-load.conf diff --git a/aports/device-samsung-i9100/90-android.rules b/aports/device/device-samsung-i9100/90-android.rules similarity index 100% rename from aports/device-samsung-i9100/90-android.rules rename to aports/device/device-samsung-i9100/90-android.rules diff --git a/aports/device-samsung-i9100/APKBUILD b/aports/device/device-samsung-i9100/APKBUILD similarity index 100% rename from aports/device-samsung-i9100/APKBUILD rename to aports/device/device-samsung-i9100/APKBUILD diff --git a/aports/device-samsung-i9100/deviceinfo b/aports/device/device-samsung-i9100/deviceinfo similarity index 100% rename from aports/device-samsung-i9100/deviceinfo rename to aports/device/device-samsung-i9100/deviceinfo diff --git a/aports/device-samsung-i9100/initfs-hook.sh b/aports/device/device-samsung-i9100/initfs-hook.sh similarity index 100% rename from aports/device-samsung-i9100/initfs-hook.sh rename to aports/device/device-samsung-i9100/initfs-hook.sh diff --git a/aports/device-samsung-maguro/APKBUILD b/aports/device/device-samsung-maguro/APKBUILD similarity index 100% rename from aports/device-samsung-maguro/APKBUILD rename to aports/device/device-samsung-maguro/APKBUILD diff --git a/aports/device-samsung-maguro/deviceinfo b/aports/device/device-samsung-maguro/deviceinfo similarity index 100% rename from aports/device-samsung-maguro/deviceinfo rename to aports/device/device-samsung-maguro/deviceinfo diff --git a/aports/device-sony-amami/90-android.rules b/aports/device/device-sony-amami/90-android.rules similarity index 100% rename from aports/device-sony-amami/90-android.rules rename to aports/device/device-sony-amami/90-android.rules diff --git a/aports/device-sony-amami/APKBUILD b/aports/device/device-sony-amami/APKBUILD similarity index 100% rename from aports/device-sony-amami/APKBUILD rename to aports/device/device-sony-amami/APKBUILD diff --git a/aports/device-sony-amami/deviceinfo b/aports/device/device-sony-amami/deviceinfo similarity index 100% rename from aports/device-sony-amami/deviceinfo rename to aports/device/device-sony-amami/deviceinfo diff --git a/aports/device-sony-amami/initfs-hook.sh b/aports/device/device-sony-amami/initfs-hook.sh similarity index 100% rename from aports/device-sony-amami/initfs-hook.sh rename to aports/device/device-sony-amami/initfs-hook.sh diff --git a/aports/linux-asus-grouper/APKBUILD b/aports/device/linux-asus-grouper/APKBUILD similarity index 100% rename from aports/linux-asus-grouper/APKBUILD rename to aports/device/linux-asus-grouper/APKBUILD diff --git a/aports/linux-asus-grouper/compiler-gcc6.h b/aports/device/linux-asus-grouper/compiler-gcc6.h similarity index 100% rename from aports/linux-asus-grouper/compiler-gcc6.h rename to aports/device/linux-asus-grouper/compiler-gcc6.h diff --git a/aports/linux-asus-grouper/config-asus-grouper.armhf b/aports/device/linux-asus-grouper/config-asus-grouper.armhf similarity index 100% rename from aports/linux-asus-grouper/config-asus-grouper.armhf rename to aports/device/linux-asus-grouper/config-asus-grouper.armhf diff --git a/aports/linux-asus-grouper/duplicate-return-address-definition.patch b/aports/device/linux-asus-grouper/duplicate-return-address-definition.patch similarity index 100% rename from aports/linux-asus-grouper/duplicate-return-address-definition.patch rename to aports/device/linux-asus-grouper/duplicate-return-address-definition.patch diff --git a/aports/linux-htc-ace/APKBUILD b/aports/device/linux-htc-ace/APKBUILD similarity index 100% rename from aports/linux-htc-ace/APKBUILD rename to aports/device/linux-htc-ace/APKBUILD diff --git a/aports/linux-htc-ace/compiler-gcc6.h b/aports/device/linux-htc-ace/compiler-gcc6.h similarity index 100% rename from aports/linux-htc-ace/compiler-gcc6.h rename to aports/device/linux-htc-ace/compiler-gcc6.h diff --git a/aports/linux-htc-ace/config-htc-ace.armhf b/aports/device/linux-htc-ace/config-htc-ace.armhf similarity index 100% rename from aports/linux-htc-ace/config-htc-ace.armhf rename to aports/device/linux-htc-ace/config-htc-ace.armhf diff --git a/aports/linux-htc-ace/gpu-msm-fix-gcc5-compile.patch b/aports/device/linux-htc-ace/gpu-msm-fix-gcc5-compile.patch similarity index 100% rename from aports/linux-htc-ace/gpu-msm-fix-gcc5-compile.patch rename to aports/device/linux-htc-ace/gpu-msm-fix-gcc5-compile.patch diff --git a/aports/linux-htc-bravo/APKBUILD b/aports/device/linux-htc-bravo/APKBUILD similarity index 100% rename from aports/linux-htc-bravo/APKBUILD rename to aports/device/linux-htc-bravo/APKBUILD diff --git a/aports/linux-htc-bravo/compiler-gcc6.h b/aports/device/linux-htc-bravo/compiler-gcc6.h similarity index 100% rename from aports/linux-htc-bravo/compiler-gcc6.h rename to aports/device/linux-htc-bravo/compiler-gcc6.h diff --git a/aports/linux-htc-bravo/config-htc-bravo.armhf b/aports/device/linux-htc-bravo/config-htc-bravo.armhf similarity index 100% rename from aports/linux-htc-bravo/config-htc-bravo.armhf rename to aports/device/linux-htc-bravo/config-htc-bravo.armhf diff --git a/aports/linux-lg-d855/APKBUILD b/aports/device/linux-lg-d855/APKBUILD similarity index 100% rename from aports/linux-lg-d855/APKBUILD rename to aports/device/linux-lg-d855/APKBUILD diff --git a/aports/linux-lg-d855/compiler-gcc6.h b/aports/device/linux-lg-d855/compiler-gcc6.h similarity index 100% rename from aports/linux-lg-d855/compiler-gcc6.h rename to aports/device/linux-lg-d855/compiler-gcc6.h diff --git a/aports/linux-lg-d855/config-lg-d855.armhf b/aports/device/linux-lg-d855/config-lg-d855.armhf similarity index 100% rename from aports/linux-lg-d855/config-lg-d855.armhf rename to aports/device/linux-lg-d855/config-lg-d855.armhf diff --git a/aports/linux-lg-d855/gpu-msm-fix-gcc5-compile.patch b/aports/device/linux-lg-d855/gpu-msm-fix-gcc5-compile.patch similarity index 100% rename from aports/linux-lg-d855/gpu-msm-fix-gcc5-compile.patch rename to aports/device/linux-lg-d855/gpu-msm-fix-gcc5-compile.patch diff --git a/aports/linux-lg-hammerhead/APKBUILD b/aports/device/linux-lg-hammerhead/APKBUILD similarity index 100% rename from aports/linux-lg-hammerhead/APKBUILD rename to aports/device/linux-lg-hammerhead/APKBUILD diff --git a/aports/linux-lg-hammerhead/aeea3592a13bf12861943e44fc48f1f270941f8d.patch b/aports/device/linux-lg-hammerhead/aeea3592a13bf12861943e44fc48f1f270941f8d.patch similarity index 100% rename from aports/linux-lg-hammerhead/aeea3592a13bf12861943e44fc48f1f270941f8d.patch rename to aports/device/linux-lg-hammerhead/aeea3592a13bf12861943e44fc48f1f270941f8d.patch diff --git a/aports/linux-lg-hammerhead/compiler-gcc6.h b/aports/device/linux-lg-hammerhead/compiler-gcc6.h similarity index 100% rename from aports/linux-lg-hammerhead/compiler-gcc6.h rename to aports/device/linux-lg-hammerhead/compiler-gcc6.h diff --git a/aports/linux-lg-hammerhead/config-lg-hammerhead.armhf b/aports/device/linux-lg-hammerhead/config-lg-hammerhead.armhf similarity index 100% rename from aports/linux-lg-hammerhead/config-lg-hammerhead.armhf rename to aports/device/linux-lg-hammerhead/config-lg-hammerhead.armhf diff --git a/aports/linux-lg-hammerhead/gpu-msm-fix-gcc5-compile.patch b/aports/device/linux-lg-hammerhead/gpu-msm-fix-gcc5-compile.patch similarity index 100% rename from aports/linux-lg-hammerhead/gpu-msm-fix-gcc5-compile.patch rename to aports/device/linux-lg-hammerhead/gpu-msm-fix-gcc5-compile.patch diff --git a/aports/linux-lg-mako/APKBUILD b/aports/device/linux-lg-mako/APKBUILD similarity index 100% rename from aports/linux-lg-mako/APKBUILD rename to aports/device/linux-lg-mako/APKBUILD diff --git a/aports/linux-lg-mako/compiler-gcc6.h b/aports/device/linux-lg-mako/compiler-gcc6.h similarity index 100% rename from aports/linux-lg-mako/compiler-gcc6.h rename to aports/device/linux-lg-mako/compiler-gcc6.h diff --git a/aports/linux-lg-mako/config-lg-mako.armhf b/aports/device/linux-lg-mako/config-lg-mako.armhf similarity index 100% rename from aports/linux-lg-mako/config-lg-mako.armhf rename to aports/device/linux-lg-mako/config-lg-mako.armhf diff --git a/aports/linux-lg-mako/gpu-msm-fix-gcc5-compile.patch b/aports/device/linux-lg-mako/gpu-msm-fix-gcc5-compile.patch similarity index 100% rename from aports/linux-lg-mako/gpu-msm-fix-gcc5-compile.patch rename to aports/device/linux-lg-mako/gpu-msm-fix-gcc5-compile.patch diff --git a/aports/linux-motorola-titan/APKBUILD b/aports/device/linux-motorola-titan/APKBUILD similarity index 100% rename from aports/linux-motorola-titan/APKBUILD rename to aports/device/linux-motorola-titan/APKBUILD diff --git a/aports/linux-motorola-titan/Wno-error.patch b/aports/device/linux-motorola-titan/Wno-error.patch similarity index 100% rename from aports/linux-motorola-titan/Wno-error.patch rename to aports/device/linux-motorola-titan/Wno-error.patch diff --git a/aports/linux-motorola-titan/changes1.patch b/aports/device/linux-motorola-titan/changes1.patch similarity index 100% rename from aports/linux-motorola-titan/changes1.patch rename to aports/device/linux-motorola-titan/changes1.patch diff --git a/aports/linux-motorola-titan/compiler-gcc6.h b/aports/device/linux-motorola-titan/compiler-gcc6.h similarity index 100% rename from aports/linux-motorola-titan/compiler-gcc6.h rename to aports/device/linux-motorola-titan/compiler-gcc6.h diff --git a/aports/linux-motorola-titan/config-motorola-titan.armhf b/aports/device/linux-motorola-titan/config-motorola-titan.armhf similarity index 100% rename from aports/linux-motorola-titan/config-motorola-titan.armhf rename to aports/device/linux-motorola-titan/config-motorola-titan.armhf diff --git a/aports/linux-motorola-titan/gcc5-compile.patch b/aports/device/linux-motorola-titan/gcc5-compile.patch similarity index 100% rename from aports/linux-motorola-titan/gcc5-compile.patch rename to aports/device/linux-motorola-titan/gcc5-compile.patch diff --git a/aports/linux-postmarketos/APKBUILD b/aports/device/linux-postmarketos/APKBUILD similarity index 100% rename from aports/linux-postmarketos/APKBUILD rename to aports/device/linux-postmarketos/APKBUILD diff --git a/aports/linux-postmarketos/config-postmarketos.armhf b/aports/device/linux-postmarketos/config-postmarketos.armhf similarity index 100% rename from aports/linux-postmarketos/config-postmarketos.armhf rename to aports/device/linux-postmarketos/config-postmarketos.armhf diff --git a/aports/linux-postmarketos/config-postmarketos.x86_64 b/aports/device/linux-postmarketos/config-postmarketos.x86_64 similarity index 100% rename from aports/linux-postmarketos/config-postmarketos.x86_64 rename to aports/device/linux-postmarketos/config-postmarketos.x86_64 diff --git a/aports/linux-samsung-i9070/00_fix_return_address.patch b/aports/device/linux-samsung-i9070/00_fix_return_address.patch similarity index 100% rename from aports/linux-samsung-i9070/00_fix_return_address.patch rename to aports/device/linux-samsung-i9070/00_fix_return_address.patch diff --git a/aports/linux-samsung-i9070/01_remove_ramdisks_from_initramfs.patch b/aports/device/linux-samsung-i9070/01_remove_ramdisks_from_initramfs.patch similarity index 100% rename from aports/linux-samsung-i9070/01_remove_ramdisks_from_initramfs.patch rename to aports/device/linux-samsung-i9070/01_remove_ramdisks_from_initramfs.patch diff --git a/aports/linux-samsung-i9070/02_reduce_lzo_compression.patch b/aports/device/linux-samsung-i9070/02_reduce_lzo_compression.patch similarity index 100% rename from aports/linux-samsung-i9070/02_reduce_lzo_compression.patch rename to aports/device/linux-samsung-i9070/02_reduce_lzo_compression.patch diff --git a/aports/linux-samsung-i9070/03_change_modules_install_dir.patch b/aports/device/linux-samsung-i9070/03_change_modules_install_dir.patch similarity index 100% rename from aports/linux-samsung-i9070/03_change_modules_install_dir.patch rename to aports/device/linux-samsung-i9070/03_change_modules_install_dir.patch diff --git a/aports/linux-samsung-i9070/04_change_dhd_firmware_dir.patch b/aports/device/linux-samsung-i9070/04_change_dhd_firmware_dir.patch similarity index 100% rename from aports/linux-samsung-i9070/04_change_dhd_firmware_dir.patch rename to aports/device/linux-samsung-i9070/04_change_dhd_firmware_dir.patch diff --git a/aports/linux-samsung-i9070/APKBUILD b/aports/device/linux-samsung-i9070/APKBUILD similarity index 100% rename from aports/linux-samsung-i9070/APKBUILD rename to aports/device/linux-samsung-i9070/APKBUILD diff --git a/aports/linux-samsung-i9070/compiler-gcc6.h b/aports/device/linux-samsung-i9070/compiler-gcc6.h similarity index 100% rename from aports/linux-samsung-i9070/compiler-gcc6.h rename to aports/device/linux-samsung-i9070/compiler-gcc6.h diff --git a/aports/linux-samsung-i9070/config-samsung-i9070.armhf b/aports/device/linux-samsung-i9070/config-samsung-i9070.armhf similarity index 100% rename from aports/linux-samsung-i9070/config-samsung-i9070.armhf rename to aports/device/linux-samsung-i9070/config-samsung-i9070.armhf diff --git a/aports/linux-samsung-i9070/init b/aports/device/linux-samsung-i9070/init similarity index 100% rename from aports/linux-samsung-i9070/init rename to aports/device/linux-samsung-i9070/init diff --git a/aports/linux-samsung-i9100/APKBUILD b/aports/device/linux-samsung-i9100/APKBUILD similarity index 100% rename from aports/linux-samsung-i9100/APKBUILD rename to aports/device/linux-samsung-i9100/APKBUILD diff --git a/aports/linux-samsung-i9100/compiler-gcc6.h b/aports/device/linux-samsung-i9100/compiler-gcc6.h similarity index 100% rename from aports/linux-samsung-i9100/compiler-gcc6.h rename to aports/device/linux-samsung-i9100/compiler-gcc6.h diff --git a/aports/linux-samsung-i9100/config-samsung-i9100.armhf b/aports/device/linux-samsung-i9100/config-samsung-i9100.armhf similarity index 100% rename from aports/linux-samsung-i9100/config-samsung-i9100.armhf rename to aports/device/linux-samsung-i9100/config-samsung-i9100.armhf diff --git a/aports/linux-samsung-i9100/init b/aports/device/linux-samsung-i9100/init similarity index 100% rename from aports/linux-samsung-i9100/init rename to aports/device/linux-samsung-i9100/init diff --git a/aports/linux-samsung-tuna/APKBUILD b/aports/device/linux-samsung-tuna/APKBUILD similarity index 100% rename from aports/linux-samsung-tuna/APKBUILD rename to aports/device/linux-samsung-tuna/APKBUILD diff --git a/aports/linux-samsung-tuna/android_paranoid_network.patch b/aports/device/linux-samsung-tuna/android_paranoid_network.patch similarity index 100% rename from aports/linux-samsung-tuna/android_paranoid_network.patch rename to aports/device/linux-samsung-tuna/android_paranoid_network.patch diff --git a/aports/linux-samsung-tuna/compiler-gcc6.h b/aports/device/linux-samsung-tuna/compiler-gcc6.h similarity index 100% rename from aports/linux-samsung-tuna/compiler-gcc6.h rename to aports/device/linux-samsung-tuna/compiler-gcc6.h diff --git a/aports/linux-samsung-tuna/config-samsung_tuna.armhf b/aports/device/linux-samsung-tuna/config-samsung_tuna.armhf similarity index 100% rename from aports/linux-samsung-tuna/config-samsung_tuna.armhf rename to aports/device/linux-samsung-tuna/config-samsung_tuna.armhf diff --git a/aports/linux-samsung-tuna/fix_old_perl_code.patch b/aports/device/linux-samsung-tuna/fix_old_perl_code.patch similarity index 100% rename from aports/linux-samsung-tuna/fix_old_perl_code.patch rename to aports/device/linux-samsung-tuna/fix_old_perl_code.patch diff --git a/aports/linux-sony-amami/APKBUILD b/aports/device/linux-sony-amami/APKBUILD similarity index 100% rename from aports/linux-sony-amami/APKBUILD rename to aports/device/linux-sony-amami/APKBUILD diff --git a/aports/linux-sony-amami/compiler-gcc6.h b/aports/device/linux-sony-amami/compiler-gcc6.h similarity index 100% rename from aports/linux-sony-amami/compiler-gcc6.h rename to aports/device/linux-sony-amami/compiler-gcc6.h diff --git a/aports/linux-sony-amami/config-sony-amami.armhf b/aports/device/linux-sony-amami/config-sony-amami.armhf similarity index 100% rename from aports/linux-sony-amami/config-sony-amami.armhf rename to aports/device/linux-sony-amami/config-sony-amami.armhf diff --git a/aports/0xffff/APKBUILD b/aports/main/0xffff/APKBUILD similarity index 100% rename from aports/0xffff/APKBUILD rename to aports/main/0xffff/APKBUILD diff --git a/aports/ccache-cross-symlinks/APKBUILD b/aports/main/ccache-cross-symlinks/APKBUILD similarity index 100% rename from aports/ccache-cross-symlinks/APKBUILD rename to aports/main/ccache-cross-symlinks/APKBUILD diff --git a/aports/dtbtool/APKBUILD b/aports/main/dtbtool/APKBUILD similarity index 100% rename from aports/dtbtool/APKBUILD rename to aports/main/dtbtool/APKBUILD diff --git a/aports/dtbtool/Makefile b/aports/main/dtbtool/Makefile similarity index 100% rename from aports/dtbtool/Makefile rename to aports/main/dtbtool/Makefile diff --git a/aports/extract-dtb/APKBUILD b/aports/main/extract-dtb/APKBUILD similarity index 100% rename from aports/extract-dtb/APKBUILD rename to aports/main/extract-dtb/APKBUILD diff --git a/aports/gcc-cross-wrappers/APKBUILD b/aports/main/gcc-cross-wrappers/APKBUILD similarity index 100% rename from aports/gcc-cross-wrappers/APKBUILD rename to aports/main/gcc-cross-wrappers/APKBUILD diff --git a/aports/heimdall/APKBUILD b/aports/main/heimdall/APKBUILD similarity index 100% rename from aports/heimdall/APKBUILD rename to aports/main/heimdall/APKBUILD diff --git a/aports/heimdall/heimdall_flash_kernel.sh b/aports/main/heimdall/heimdall_flash_kernel.sh similarity index 100% rename from aports/heimdall/heimdall_flash_kernel.sh rename to aports/main/heimdall/heimdall_flash_kernel.sh diff --git a/aports/heimdall/heimdall_wait_for_device.sh b/aports/main/heimdall/heimdall_wait_for_device.sh similarity index 100% rename from aports/heimdall/heimdall_wait_for_device.sh rename to aports/main/heimdall/heimdall_wait_for_device.sh diff --git a/aports/hello-world-wrapper/APKBUILD b/aports/main/hello-world-wrapper/APKBUILD similarity index 100% rename from aports/hello-world-wrapper/APKBUILD rename to aports/main/hello-world-wrapper/APKBUILD diff --git a/aports/hello-world-wrapper/hello-world-wrapper.sh b/aports/main/hello-world-wrapper/hello-world-wrapper.sh similarity index 100% rename from aports/hello-world-wrapper/hello-world-wrapper.sh rename to aports/main/hello-world-wrapper/hello-world-wrapper.sh diff --git a/aports/hello-world/APKBUILD b/aports/main/hello-world/APKBUILD similarity index 100% rename from aports/hello-world/APKBUILD rename to aports/main/hello-world/APKBUILD diff --git a/aports/hello-world/Makefile b/aports/main/hello-world/Makefile similarity index 100% rename from aports/hello-world/Makefile rename to aports/main/hello-world/Makefile diff --git a/aports/hello-world/main.c b/aports/main/hello-world/main.c similarity index 100% rename from aports/hello-world/main.c rename to aports/main/hello-world/main.c diff --git a/aports/mkbootimg/APKBUILD b/aports/main/mkbootimg/APKBUILD similarity index 100% rename from aports/mkbootimg/APKBUILD rename to aports/main/mkbootimg/APKBUILD diff --git a/aports/postmarketos-base/APKBUILD b/aports/main/postmarketos-base/APKBUILD similarity index 100% rename from aports/postmarketos-base/APKBUILD rename to aports/main/postmarketos-base/APKBUILD diff --git a/aports/postmarketos-base/postmarketos-base.post-install b/aports/main/postmarketos-base/postmarketos-base.post-install similarity index 100% rename from aports/postmarketos-base/postmarketos-base.post-install rename to aports/main/postmarketos-base/postmarketos-base.post-install diff --git a/aports/postmarketos-base/sudoers b/aports/main/postmarketos-base/sudoers similarity index 100% rename from aports/postmarketos-base/sudoers rename to aports/main/postmarketos-base/sudoers diff --git a/aports/postmarketos-demos/APKBUILD b/aports/main/postmarketos-demos/APKBUILD similarity index 100% rename from aports/postmarketos-demos/APKBUILD rename to aports/main/postmarketos-demos/APKBUILD diff --git a/aports/postmarketos-demos/Makefile b/aports/main/postmarketos-demos/Makefile similarity index 100% rename from aports/postmarketos-demos/Makefile rename to aports/main/postmarketos-demos/Makefile diff --git a/aports/postmarketos-demos/main.c b/aports/main/postmarketos-demos/main.c similarity index 100% rename from aports/postmarketos-demos/main.c rename to aports/main/postmarketos-demos/main.c diff --git a/aports/postmarketos-mkinitfs-hook-usb-shell/20-usb-shell.sh b/aports/main/postmarketos-mkinitfs-hook-usb-shell/20-usb-shell.sh similarity index 100% rename from aports/postmarketos-mkinitfs-hook-usb-shell/20-usb-shell.sh rename to aports/main/postmarketos-mkinitfs-hook-usb-shell/20-usb-shell.sh diff --git a/aports/postmarketos-mkinitfs-hook-usb-shell/APKBUILD b/aports/main/postmarketos-mkinitfs-hook-usb-shell/APKBUILD similarity index 100% rename from aports/postmarketos-mkinitfs-hook-usb-shell/APKBUILD rename to aports/main/postmarketos-mkinitfs-hook-usb-shell/APKBUILD diff --git a/aports/postmarketos-mkinitfs/APKBUILD b/aports/main/postmarketos-mkinitfs/APKBUILD similarity index 100% rename from aports/postmarketos-mkinitfs/APKBUILD rename to aports/main/postmarketos-mkinitfs/APKBUILD diff --git a/aports/postmarketos-mkinitfs/TODO b/aports/main/postmarketos-mkinitfs/TODO similarity index 100% rename from aports/postmarketos-mkinitfs/TODO rename to aports/main/postmarketos-mkinitfs/TODO diff --git a/aports/postmarketos-mkinitfs/init.sh.in b/aports/main/postmarketos-mkinitfs/init.sh.in similarity index 100% rename from aports/postmarketos-mkinitfs/init.sh.in rename to aports/main/postmarketos-mkinitfs/init.sh.in diff --git a/aports/postmarketos-mkinitfs/init_functions.sh b/aports/main/postmarketos-mkinitfs/init_functions.sh similarity index 100% rename from aports/postmarketos-mkinitfs/init_functions.sh rename to aports/main/postmarketos-mkinitfs/init_functions.sh diff --git a/aports/postmarketos-mkinitfs/mkinitfs.sh b/aports/main/postmarketos-mkinitfs/mkinitfs.sh similarity index 100% rename from aports/postmarketos-mkinitfs/mkinitfs.sh rename to aports/main/postmarketos-mkinitfs/mkinitfs.sh diff --git a/aports/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger b/aports/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger similarity index 100% rename from aports/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger rename to aports/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger diff --git a/aports/postmarketos-splash/APKBUILD b/aports/main/postmarketos-splash/APKBUILD similarity index 100% rename from aports/postmarketos-splash/APKBUILD rename to aports/main/postmarketos-splash/APKBUILD diff --git a/aports/postmarketos-splash/config.ini b/aports/main/postmarketos-splash/config.ini similarity index 100% rename from aports/postmarketos-splash/config.ini rename to aports/main/postmarketos-splash/config.ini diff --git a/aports/postmarketos-splash/make-splash.py b/aports/main/postmarketos-splash/make-splash.py similarity index 100% rename from aports/postmarketos-splash/make-splash.py rename to aports/main/postmarketos-splash/make-splash.py diff --git a/aports/postmarketos-ui-weston/APKBUILD b/aports/main/postmarketos-ui-weston/APKBUILD similarity index 100% rename from aports/postmarketos-ui-weston/APKBUILD rename to aports/main/postmarketos-ui-weston/APKBUILD diff --git a/aports/postmarketos-ui-weston/postmarketos-ui-weston.post-install b/aports/main/postmarketos-ui-weston/postmarketos-ui-weston.post-install similarity index 100% rename from aports/postmarketos-ui-weston/postmarketos-ui-weston.post-install rename to aports/main/postmarketos-ui-weston/postmarketos-ui-weston.post-install diff --git a/aports/postmarketos-ui-weston/start_weston.sh b/aports/main/postmarketos-ui-weston/start_weston.sh similarity index 100% rename from aports/postmarketos-ui-weston/start_weston.sh rename to aports/main/postmarketos-ui-weston/start_weston.sh diff --git a/aports/unpackbootimg/APKBUILD b/aports/main/unpackbootimg/APKBUILD similarity index 100% rename from aports/unpackbootimg/APKBUILD rename to aports/main/unpackbootimg/APKBUILD diff --git a/aports/weston/0001-compositor-fbdev-Added-parameter-pixman-type.patch b/aports/main/weston/0001-compositor-fbdev-Added-parameter-pixman-type.patch similarity index 100% rename from aports/weston/0001-compositor-fbdev-Added-parameter-pixman-type.patch rename to aports/main/weston/0001-compositor-fbdev-Added-parameter-pixman-type.patch diff --git a/aports/weston/0002-compositor-fbdev-Add-support-for-ABGR.patch b/aports/main/weston/0002-compositor-fbdev-Add-support-for-ABGR.patch similarity index 100% rename from aports/weston/0002-compositor-fbdev-Add-support-for-ABGR.patch rename to aports/main/weston/0002-compositor-fbdev-Add-support-for-ABGR.patch diff --git a/aports/weston/0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch b/aports/main/weston/0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch similarity index 100% rename from aports/weston/0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch rename to aports/main/weston/0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch diff --git a/aports/weston/APKBUILD b/aports/main/weston/APKBUILD similarity index 100% rename from aports/weston/APKBUILD rename to aports/main/weston/APKBUILD diff --git a/aports/weston/no_0hz_refresh_rate.patch b/aports/main/weston/no_0hz_refresh_rate.patch similarity index 100% rename from aports/weston/no_0hz_refresh_rate.patch rename to aports/main/weston/no_0hz_refresh_rate.patch diff --git a/aports/acpid/APKBUILD b/aports/unmaintained/acpid/APKBUILD similarity index 100% rename from aports/acpid/APKBUILD rename to aports/unmaintained/acpid/APKBUILD diff --git a/pmb/aportgen/__init__.py b/pmb/aportgen/__init__.py index db29dd35..452e6a3b 100644 --- a/pmb/aportgen/__init__.py +++ b/pmb/aportgen/__init__.py @@ -45,7 +45,7 @@ def generate(args, pkgname): raise ValueError("No generator available for " + pkgname + "!") # Move to the aports folder - path_target = args.aports + "/" + pkgname + path_target = args.aports + "/cross/" + pkgname if os.path.exists(path_target): pmb.helpers.run.user(args, ["rm", "-r", path_target]) pmb.helpers.run.user( diff --git a/pmb/build/autodetect.py b/pmb/build/autodetect.py index 51e6d1e2..5b0de9b2 100644 --- a/pmb/build/autodetect.py +++ b/pmb/build/autodetect.py @@ -30,8 +30,7 @@ def carch(args, apkbuild, carch): raise RuntimeError("Architecture '" + carch + "' is not supported" " for this package. Please add it to the" " 'arch=' line inside the APKBUILD and try" - " again: " + args.aports + "/" + - apkbuild["pkgname"] + "/APKBUILD") + " again: " + apkbuild["pkgname"]) return carch if ("all" in apkbuild["arch"] or args.arch_native in apkbuild["arch"]): diff --git a/pmb/build/checksum.py b/pmb/build/checksum.py index a7397cb8..0708af36 100644 --- a/pmb/build/checksum.py +++ b/pmb/build/checksum.py @@ -21,6 +21,7 @@ import logging import pmb.chroot import pmb.build import pmb.helpers.run +import pmb.build.other def checksum(args, pkgname): @@ -32,5 +33,5 @@ def checksum(args, pkgname): # Copy modified APKBUILD back source = args.work + "/chroot_native/home/user/build/APKBUILD" - target = args.aports + "/" + pkgname + "/" + target = pmb.build.other.find_aport(args, pkgname) + "/" pmb.helpers.run.user(args, ["cp", source, target]) diff --git a/pmb/build/menuconfig.py b/pmb/build/menuconfig.py index 43364027..3a331c4a 100644 --- a/pmb/build/menuconfig.py +++ b/pmb/build/menuconfig.py @@ -62,7 +62,6 @@ def menuconfig(args, pkgname, arch): source = args.work + "/chroot_native/home/user/build/src/build/.config" if not os.path.exists(source): raise RuntimeError("No kernel config generated!") - target = (args.aports + "/" + pkgname + "/config-" + apkbuild["_flavor"] + - "." + arch) + target = aport + "/config-" + apkbuild["_flavor"] + "." + arch pmb.helpers.run.user(args, ["cp", source, target]) pmb.build.checksum(args, pkgname) diff --git a/pmb/build/other.py b/pmb/build/other.py index 640182ec..7499d9c1 100644 --- a/pmb/build/other.py +++ b/pmb/build/other.py @@ -21,6 +21,7 @@ import logging import glob import shutil +import pmb.build.other import pmb.chroot import pmb.helpers.run import pmb.helpers.file @@ -34,32 +35,41 @@ def find_aport(args, package, must_exist=True): :param must_exist: Raise an exception, when not found :returns: the full path to the aport folder """ - path = args.aports + "/" + package - if os.path.exists(path): - return path - # Try to get a cached result first (we assume, that the aports don't change # in one pmbootstrap call) - if path in args.cache["find_aport"]: - return args.cache["find_aport"][path] - ret = None - for path_current in glob.glob(args.aports + "/*/APKBUILD"): - apkbuild = pmb.parse.apkbuild(args, path_current) - if package in apkbuild["subpackages"]: - ret = os.path.dirname(path_current) - break + if package in args.cache["find_aport"]: + ret = args.cache["find_aport"][package] + else: + # Search in packages + paths = glob.glob(args.aports + "/*/" + package) + if len(paths) > 2: + raise RuntimeError("Package " + package + " found in multiple" + " aports subfolders. Please put it only in one" + " folder.") + elif len(paths) == 1: + ret = paths[0] + else: + # Search in subpackages + for path_current in glob.glob(args.aports + "/*/*/APKBUILD"): + apkbuild = pmb.parse.apkbuild(args, path_current) + if package in apkbuild["subpackages"]: + ret = os.path.dirname(path_current) + break + + # Crash when necessary if ret is None and must_exist: raise RuntimeError("Could not find aport for package: " + package) - args.cache["find_aport"][path] = ret + # Save result in cache + args.cache["find_aport"][package] = ret return ret def copy_to_buildpath(args, package, suffix="native"): # Sanity check - aport = args.aports + "/" + package + aport = find_aport(args, package) if not os.path.exists(aport + "/APKBUILD"): raise ValueError("Path does not contain an APKBUILD file:" + aport) @@ -92,7 +102,9 @@ def aports_files_out_of_sync_with_git(args, package=None): # Filter out a specific package if package: ret = [] - prefix = os.path.abspath(args.aports + "/" + package + "/") + prefix = os.path.abspath( + pmb.build.other.find_aport( + args, package)) + "/" for file in aports_files_out_of_sync_with_git(args): if file.startswith(prefix): ret.append(file) @@ -145,7 +157,7 @@ def aports_files_out_of_sync_with_git(args, package=None): def sources_newer_than_binary_package(args, package, index_data): path_sources = [] - for file in glob.glob(args.aports + "/" + package + "/*"): + for file in glob.glob(args.aports + "/*/" + package + "/*"): path_sources.append(file) lastmod_target = float(index_data["timestamp"]) diff --git a/pmb/chroot/initfs_hooks.py b/pmb/chroot/initfs_hooks.py index 49507095..8e7f24ea 100644 --- a/pmb/chroot/initfs_hooks.py +++ b/pmb/chroot/initfs_hooks.py @@ -39,7 +39,7 @@ def list_chroot(args, suffix, remove_prefix=True): def list_aports(args): ret = [] prefix = pmb.config.initfs_hook_prefix - for path in glob.glob(args.aports + "/" + prefix + "*"): + for path in glob.glob(args.aports + "/*/" + prefix + "*"): ret.append(os.path.basename(path)[len(prefix):]) return ret diff --git a/pmb/helpers/devices.py b/pmb/helpers/devices.py index 5a49c81c..c25bc40b 100644 --- a/pmb/helpers/devices.py +++ b/pmb/helpers/devices.py @@ -27,7 +27,7 @@ def list(args): :returns: ["first-device", "second-device", ...] """ ret = [] - for path in glob.glob(args.aports + "/device-*"): + for path in glob.glob(args.aports + "/device/device-*"): device = os.path.basename(path).split("-", 1)[1] ret += [device] return ret diff --git a/pmb/helpers/frontend.py b/pmb/helpers/frontend.py index c2106075..91b95882 100644 --- a/pmb/helpers/frontend.py +++ b/pmb/helpers/frontend.py @@ -100,8 +100,9 @@ def menuconfig(args): def parse_apkbuild(args): - build_path = args.aports + "/" + args.package + "/APKBUILD" - print(json.dumps(pmb.parse.apkbuild(args, build_path), indent=4)) + aport = pmb.build.other.find_aport(args, args.package) + path = aport + "/APKBUILD" + print(json.dumps(pmb.parse.apkbuild(args, path), indent=4)) def parse_apkindex(args): diff --git a/pmb/parse/deviceinfo.py b/pmb/parse/deviceinfo.py index 201d9e53..9b7c3795 100644 --- a/pmb/parse/deviceinfo.py +++ b/pmb/parse/deviceinfo.py @@ -28,7 +28,7 @@ def deviceinfo(args, device=None): if not device: device = args.device - aport = args.aports + "/device-" + device + aport = args.aports + "/device/device-" + device if not os.path.exists(aport) or not os.path.exists(aport + "/deviceinfo"): logging.fatal("You will need to create a device-specific package") logging.fatal("before you can continue. Please create at least the") diff --git a/test/test_aport_in_sync_with_git.py b/test/test_aport_in_sync_with_git.py index d62c3609..4ef791a1 100644 --- a/test/test_aport_in_sync_with_git.py +++ b/test/test_aport_in_sync_with_git.py @@ -53,10 +53,10 @@ def temp_aports_repo(args): # Create fake "aports" repo # For this test to work, we need a git repository cloned from a real upstream # location. It does not work, when cloned from the same file system. The - # apk-tools repo also gets used in test_versions.py, so we use that. + # aports_upstream repo also gets used in test_aportgen.py, so we use that. pmb.chroot.apk.install(args, ["git"]) - pmb.helpers.git.clone(args, "apk-tools") - pmb.chroot.user(args, ["cp", "-r", "/home/user/git/apk-tools", + pmb.helpers.git.clone(args, "aports_upstream") + pmb.chroot.user(args, ["cp", "-r", "/home/user/git/aports_upstream", temp + "/aports"]) # Configure git @@ -78,24 +78,24 @@ def out_of_sync_files(args): """ args.cache["aports_files_out_of_sync_with_git"] = None return pmb.build.other.aports_files_out_of_sync_with_git(args, - "hello-world") + "alpine-base") def test_aport_in_sync_with_git(args): aports = temp_aports_repo(args) ret_in_sync = [] - ret_out_of_sync = [args.aports + "/hello-world/APKBUILD"] + ret_out_of_sync = [args.aports + "/main/alpine-base/APKBUILD"] # In sync (no files changed) assert out_of_sync_files(args) == ret_in_sync # Out of sync: untracked files - pmb.chroot.user(args, ["mkdir", aports + "/hello-world"]) - pmb.chroot.user(args, ["touch", aports + "/hello-world/APKBUILD"]) + pmb.chroot.user(args, ["sh -c 'echo test >> " + aports + + "/main/alpine-base/APKBUILD'"]) assert out_of_sync_files(args) == ret_out_of_sync # Out of sync: tracked files - pmb.chroot.user(args, ["git", "add", aports + "/hello-world/APKBUILD"], + pmb.chroot.user(args, ["git", "add", aports + "/main/alpine-base/APKBUILD"], working_dir=aports) assert out_of_sync_files(args) == ret_out_of_sync diff --git a/test/test_aportgen.py b/test/test_aportgen.py index 2aaacb7f..24e52426 100644 --- a/test/test_aportgen.py +++ b/test/test_aportgen.py @@ -39,6 +39,7 @@ def args(tmpdir, request): request.addfinalizer(args.logfd.close) setattr(args, "_aports_real", args.aports) args.aports = str(tmpdir) + pmb.helpers.run.user(args, ["mkdir", "-p", str(tmpdir) + "/cross"]) return args @@ -54,8 +55,8 @@ def test_aportgen(args): pkgnames.append(pkgname + "-" + arch) for pkgname in pkgnames: pmb.aportgen.generate(args, pkgname) - path_new = args.aports + "/" + pkgname + "/APKBUILD" - path_old = args._aports_real + "/" + pkgname + "/APKBUILD" + path_new = args.aports + "/cross/" + pkgname + "/APKBUILD" + path_old = args._aports_real + "/cross/" + pkgname + "/APKBUILD" assert os.path.exists(path_new) assert filecmp.cmp(path_new, path_old, False) diff --git a/test/test_build_is_necessary.py b/test/test_build_is_necessary.py index e1e0af70..24f1d9ea 100644 --- a/test/test_build_is_necessary.py +++ b/test/test_build_is_necessary.py @@ -72,13 +72,15 @@ def cache_files_out_of_sync(args, is_out_of_sync): """ new = [] if is_out_of_sync: - new = [os.path.abspath(args.aports + "/hello-world/APKBUILD")] + aport = pmb.build.other.find_aport(args, "hello-world") + new = [os.path.abspath(aport + "/APKBUILD")] args.cache["aports_files_out_of_sync_with_git"] = new def test_build_is_necessary(args): # Prepare APKBUILD and APKINDEX data - apkbuild = pmb.parse.apkbuild(args, args.aports + "/hello-world/APKBUILD") + aport = pmb.build.other.find_aport(args, "hello-world") + apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD") apkbuild["pkgver"] = "1" apkbuild["pkgrel"] = "2" apkindex_path = list(args.cache["apkindex"].keys())[0] @@ -129,5 +131,6 @@ def test_build_is_necessary_no_binary_available(args): hello-world package has not been built yet. """ apkindex_path = list(args.cache["apkindex"].keys())[0] - apkbuild = pmb.parse.apkbuild(args, args.aports + "/hello-world/APKBUILD") + aport = pmb.build.other.find_aport(args, "hello-world") + apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD") assert pmb.build.is_necessary(args, None, apkbuild, apkindex_path) is True diff --git a/test/test_challenge_build.py b/test/test_challenge_build.py index 80de736d..08700e3a 100644 --- a/test/test_challenge_build.py +++ b/test/test_challenge_build.py @@ -47,8 +47,8 @@ def test_challenge_build(args): pmb.build.package(args, pkgname, None, force=True, buildinfo=True) # Copy it to a temporary path - apkbuild = pmb.parse.apkbuild(args, args.aports + "/" + pkgname + - "/APKBUILD") + aport = pmb.build.other.find_aport(args, "hello-world") + apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD") version = apkbuild["pkgver"] + "-r" + apkbuild["pkgrel"] temp_path = pmb.chroot.other.tempfolder(args, "/tmp/test_challenge_build/" + args.arch_native)