# vim: set ts=2 sw=2 et: # Maintainer: # ALARM: Kevin Mihelich # - arch/host/flags for arm, armv6h, armv7h, and aarch64 # - pacman.conf: architecture=arm/armv6h/armv7h/aarch64, added our aur and alarm repos # - makepkg.conf: adjusted C/CXX/LDFLAGS, drop -z,now for armv5 # - patch to sync filesystem after install/remove # - reverts to allow scriplet input on stdin # - patch to fix application/gzip change in file 5.37 pkgname=pacman pkgver=6.0.0 pkgrel=5 pkgdesc="A library-based package manager with dependency support" arch=('x86_64') url="https://www.archlinux.org/pacman/" license=('GPL') groups=('base-devel') depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme' 'pacman-mirrorlist' 'archlinuxarm-keyring') makedepends=('meson' 'asciidoc' 'doxygen') checkdepends=('python' 'fakechroot') optdepends=('perl-locale-gettext: translation support in makepkg-template') provides=('libalpm.so') backup=(etc/pacman.conf etc/makepkg.conf) options=('strip' 'debug') validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae 'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.xz{,.sig} pacman-6.0.0-fix-404-download.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/3401f9e142ac4c701cd98c52618cb13164f2146b.patch pacman-6.0.0-fix-key-import-double-free.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/542910d684191eb7f25ddc5d3d8fe3060028a267.patch 0001-Sychronize-filesystem.patch 0002-Revert-close-stdin-before-running-install-scripts.patch 0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch pacman.conf makepkg.conf) sha256sums=('004448085a7747bdc7a0a4dd5d1fb7556c6b890111a06e029ab088f9905d4808' 'SKIP' 'f4c1c39b43b52ba19b656b32913688b81085c73685afe32d2018dbb695d5a1e6' 'defdf1686d65fc896c19f41d1bc166912fccf9134b72e50da3b24538366cecdf' 'f9a8ae2805cc995ef1b787e10f402d574aaee183cc3a23fe26805555b7d87fea' '7beb2faec0ec37dcb2050d9ed3c95353fb7f73da7e3bbe0e226e9e3f7858a01f' '0fdbdc3c86b826fe87d8051a5d34db23b366b0a7bdc22f3701b1bf2b01218d59' '19f189accab294af7085cb709417eb41784d21aa8da07a8aa24bf7591ec3ce94' '5db3f78ca0c3afa0678d5df83df810c202ce1fbdc82f8f73d90515929c0eb4ce') prepare() { cd "$pkgname-$pkgver" patch -p1 -i "$srcdir"/pacman-6.0.0-fix-404-download.patch patch -p1 -i "$srcdir"/pacman-6.0.0-fix-key-import-double-free.patch patch -p1 -i ../0001-Sychronize-filesystem.patch patch -p1 -i ../0002-Revert-close-stdin-before-running-install-scripts.patch patch -p1 -i ../0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch } build() { cd "$pkgname-$pkgver" meson --prefix=/usr \ --buildtype=plain \ -Ddoc=enabled \ -Ddoxygen=enabled \ -Dscriptlet-shell=/usr/bin/bash \ -Dldconfig=/usr/bin/ldconfig \ build meson compile -C build } check() { cd "$pkgname-$pkgver" meson test -C build } package() { cd "$pkgname-$pkgver" DESTDIR="$pkgdir" meson install -C build # install Arch specific stuff install -dm755 "$pkgdir/etc" install -m644 "$srcdir/pacman.conf" "$pkgdir/etc" case $CARCH in arm) mycarch="arm" mychost="armv5tel-unknown-linux-gnueabi" myflags="-march=armv5te " ;; armv6h) mycarch="armv6h" mychost="armv6l-unknown-linux-gnueabihf" myflags="-march=armv6 -mfloat-abi=hard -mfpu=vfp " ;; armv7h) mycarch="armv7h" mychost="armv7l-unknown-linux-gnueabihf" myflags="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 " ;; aarch64) mycarch="aarch64" mychost="aarch64-unknown-linux-gnu" myflags="-march=armv8-a " ;; esac install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc" sed -i "$pkgdir/etc/makepkg.conf" \ -e "s|@CARCH[@]|$mycarch|g" \ -e "s|@CHOST[@]|$mychost|g" \ -e "s|@CARCHFLAGS[@]|$myflags|g" sed -i $pkgdir/etc/pacman.conf -e "s|@CARCH[@]|$mycarch|g" if [[ $CARCH == "arm" ]]; then sed -i 's/,-z,now//' "$pkgdir/etc/makepkg.conf" fi }