mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
121 lines
4.4 KiB
Bash
121 lines
4.4 KiB
Bash
# vim: set ts=2 sw=2 et:
|
|
# $Id$
|
|
# 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
|
|
|
|
pkgname=pacman
|
|
pkgver=5.1.0
|
|
pkgrel=2
|
|
pkgdesc="A library-based package manager with dependency support"
|
|
arch=('x86_64')
|
|
url="http://www.archlinux.org/pacman/"
|
|
license=('GPL')
|
|
groups=('base' 'base-devel')
|
|
depends=('bash' 'glibc' 'libarchive' 'curl'
|
|
'gpgme' 'pacman-mirrorlist' 'archlinuxarm-keyring')
|
|
makedepends=('asciidoc')
|
|
checkdepends=('python2' 'fakechroot')
|
|
optdpepends=('perl-locale-gettext: translation support in makepkg-template')
|
|
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}
|
|
0001-makepkg-Clear-ERR-trap-before-trying-to-restore-it.patch
|
|
0002-makepkg-Don-t-use-parameterless-return.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=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
|
|
'SKIP'
|
|
'9b2304141582a421e812c76760a74f360a3cbd780472cbb60cf023a34d6fcb3d'
|
|
'2a31d4db5f6e19e0148d4892de14317514f2b2dfb5369c7972a641ca8be89e5a'
|
|
'8d70fb5094f58aad98b601bbc42be354c2014b9fe734a1ee0b1e14bb041cc9cc'
|
|
'0e771370da68c855bfb4eaad4c2ae137883a474886a049b934dac2e775574cb9'
|
|
'2f586f72c34150330389854575a21be1d3ef3637c4f94bec2e948c2717a5aecb'
|
|
'4d7b47a2d1877e1426a2a0f93a595c634135b0f37a53db937e5f712fa71a1073'
|
|
'edc48d8a6c051d50241fa727e948a06ece8890d9d9da80573f8894a3bf455d36')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
# Fix install_packages failure exit code, required by makechrootpkg
|
|
patch -Np1 -i ../0001-makepkg-Clear-ERR-trap-before-trying-to-restore-it.patch
|
|
patch -Np1 -i ../0002-makepkg-Don-t-use-parameterless-return.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"
|
|
[[ $CARCH == "arm" ]] && sed -i 's/,-z,now//' "$pkgdir/etc/makepkg.conf"
|
|
|
|
# put bash_completion in the right location
|
|
install -dm755 "$pkgdir/usr/share/bash-completion/completions"
|
|
mv "$pkgdir/etc/bash_completion.d/pacman" "$pkgdir/usr/share/bash-completion/completions"
|
|
rmdir "$pkgdir/etc/bash_completion.d"
|
|
|
|
for f in makepkg pacman-key; do
|
|
ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f"
|
|
done
|
|
}
|