mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
115 lines
4 KiB
Bash
115 lines
4 KiB
Bash
# vim: set ts=2 sw=2 et:
|
|
# Maintainer: Dan McGee <dan@archlinux.org>
|
|
# Maintainer: Dave Reisner <dreisner@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - 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=5.2.1
|
|
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=('asciidoc')
|
|
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 <allan@archlinux.org>
|
|
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
|
|
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
|
|
pacman-5.2.1-fix-pactest-package-tar-format.patch
|
|
makepkg-fix-one-more-file-seccomp-issue.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=('1930c407265fd039cb3a8e6edc82f69e122aa9239d216d9d57b9d1b9315af312'
|
|
'SKIP'
|
|
'824a5c9dd458fb27b05a9a0b4b5d75b7a392de0dae79a18f5cfe8beaf4d82f0c'
|
|
'e481a161bba76729cd434c97e0b319ddfcb1d93b2e4890d72b4e8a32982531d9'
|
|
'187bef40b14461ef7caba83e8124b6725e0cc9d46fa84353dae3b2afdc013589'
|
|
'83597d3092edb2414d3b1a3e2e7337c0edcf102636a5884f3d3f3755fdceb2b0'
|
|
'6e6434d123dd57961922627b39d967de384e3902a041e12dfc077081552fec28'
|
|
'7210ba34cc95650425b9be1e9f87f77637348b8bd77c8cb68ab293ac08871aee'
|
|
'f187a5919f06c6e3d3e67f2d4b9ac14217accaae1ce7e226ff133bcbfde3f03d')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
patch -Np1 < ../pacman-5.2.1-fix-pactest-package-tar-format.patch
|
|
patch -Np1 < ../makepkg-fix-one-more-file-seccomp-issue.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"
|
|
|
|
./configure --prefix=/usr --sysconfdir=/etc \
|
|
--localstatedir=/var --enable-doc \
|
|
--with-scriptlet-shell=/usr/bin/bash \
|
|
--with-ldconfig=/usr/bin/ldconfig
|
|
make V=1
|
|
}
|
|
|
|
check() {
|
|
make -C "$pkgname-$pkgver" check
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# 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
|
|
}
|