mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
97 lines
2.9 KiB
Bash
97 lines
2.9 KiB
Bash
# vim: set ts=2 sw=2 et:
|
|
# $Id: PKGBUILD 146700 2012-01-16 19:48:37Z dreisner $
|
|
# Maintainer: Dan McGee <dan@archlinux.org>
|
|
# Maintainer: Dave Reisner <dreisner@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - arch/host/flags for arm and armv7h
|
|
# - pacman.conf: architecture=arm/armv7h, added our aur and alarm repos
|
|
# - makepkg.conf: adjusted C/CXX/LDFLAGS
|
|
|
|
pkgname=pacman
|
|
pkgver=4.1.1
|
|
pkgrel=1
|
|
pkgdesc="A library-based package manager with dependency support"
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.archlinux.org/pacman/"
|
|
license=('GPL')
|
|
groups=('base' 'base-devel')
|
|
depends=('bash>=4.2.042-2' 'glibc>=2.17-2' 'libarchive>=3.1.2' 'curl>=7.19.4'
|
|
'gpgme' 'pacman-mirrorlist')
|
|
checkdepends=('python2' 'fakechroot')
|
|
optdepends=('fakeroot: for makepkg usage as normal user')
|
|
provides=('pacman-contrib')
|
|
conflicts=('pacman-contrib')
|
|
replaces=('pacman-contrib')
|
|
backup=(etc/pacman.conf etc/makepkg.conf)
|
|
install=pacman.install
|
|
options=(!libtool)
|
|
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
|
|
pacman.conf
|
|
makepkg.conf)
|
|
md5sums=('72a1688ff73c1c0b79d8f87b3793d446'
|
|
'SKIP'
|
|
'5c491b27bae54d93d6ba972ce0fccfa7'
|
|
'4325d958e5ad4632b6a771e1df6306f9')
|
|
|
|
# keep an upgrade path for older installations
|
|
PKGEXT='.pkg.tar.gz'
|
|
|
|
build() {
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
./configure --prefix=/usr --sysconfdir=/etc \
|
|
--localstatedir=/var --enable-doc \
|
|
--with-scriptlet-shell=/usr/bin/bash \
|
|
--with-ldconfig=/usr/bin/ldconfig
|
|
make
|
|
make -C contrib
|
|
}
|
|
|
|
check() {
|
|
make -C "$pkgname-$pkgver" check
|
|
}
|
|
|
|
package() {
|
|
cd $srcdir/$pkgname-$pkgver
|
|
make DESTDIR=$pkgdir install
|
|
make DESTDIR=$pkgdir -C contrib install
|
|
|
|
# install Arch specific stuff
|
|
install -dm755 $pkgdir/etc
|
|
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
|
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 "
|
|
;;
|
|
esac
|
|
install -m644 $srcdir/makepkg.conf $pkgdir/etc/
|
|
# set things correctly in the default conf file
|
|
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"
|
|
|
|
# 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
|
|
}
|