0

So I took over an orphaned AUR package that contains separate sources for 32-bit and 64-bit packages. I'm on a 64-bit machine, but I want to also test that the 32-bit installation works before I push the updated PKGBUILD. I've read through the PKGBUILD section of the Arch Linux Wiki, but it doesn't mention anything about doing this.

Example of what PKGBUILD looks like (simplified):

pkgname=...
pkgver=...
pkgdesc=...
arch=('i686' 'x86_64')
depends_x86_64=(
  'lib32-freetype2')
depends_i686=(
  'freetype2')
source_x86_64=("https://site.com/download/{pkgver}_amd64.deb"
                "https://archive.archlinux.org/packages/l/lib32-freetype2/lib32-freetype2-2.11.0-3-x86_64.pkg.tar.zst")
source_i686=("https://site.com/download/{pkgver}_i386.deb"
              "https://archive.archlinux.org/packages/f/freetype2/freetype2-2.11.0-4-x86_64.pkg.tar.zst")
sha256sums_i686=('SKIP'
                 'SKIP')
sha256sums_x86_64=('SKIP'
                   'SKIP')

package() {
    install -d -m0755 "${pkgdir}"/usr/{share/applications,share/pkgname}
}

How can I force makepkg to build the 32bit version?

1 Answer 1

1

Silly me - Turns out there's a section for this in makepkg.

From https://wiki.archlinux.org/title/Makepkg


Create a 32-bit configuration file

~/.makepkg.i686.conf
CARCH="i686"
CHOST="i686-unknown-linux-gnu"
CFLAGS="-m32 -march=i686 -mtune=generic -O2 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-m32 -Wl,-O1,--sort-common,--as-needed,-z,relro"

and invoke makepkg with

linux32 makepkg --config ~/.makepkg.i686.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .