mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
111 lines
3.4 KiB
Bash
111 lines
3.4 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
|
|
|
|
noautobuild=1
|
|
|
|
pkgname=pacman
|
|
pkgver=4.0.3
|
|
pkgrel=3
|
|
pkgdesc="A library-based package manager with dependency support"
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.archlinux.org/pacman/"
|
|
license=('GPL')
|
|
groups=('base')
|
|
depends=('bash' 'glibc>=2.16.0' 'libarchive>=3.0.2' 'curl>=7.19.4'
|
|
'gpgme' 'pacman-mirrorlist')
|
|
makedepends=('asciidoc')
|
|
optdepends=('fakeroot: for makepkg usage as normal user')
|
|
backup=(etc/pacman.conf etc/makepkg.conf)
|
|
install=pacman.install
|
|
options=(!libtool)
|
|
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
|
|
0001-Add-conflict-for-replacing-owned-empty-directory.patch
|
|
0002-Check-empty-subdirectory-ownership.patch
|
|
pacman.conf
|
|
makepkg.conf)
|
|
md5sums=('387965c7125e60e5f0b9ff3b427fe0f9'
|
|
'1a70392526c8768470da678b31905a6e'
|
|
'0c1d326d0ca48c9a9819ea8060ea3bba'
|
|
'02db451be806335ce189ffadb5cf84b9'
|
|
'9a7d914def620cc4dd1a94ed53892175'
|
|
'e6d44e71b847d2c98bb38087e33cd76b')
|
|
|
|
# keep an upgrade path for older installations
|
|
PKGEXT='.pkg.tar.gz'
|
|
|
|
build() {
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
patch -p1 -i $srcdir/0001-Add-conflict-for-replacing-owned-empty-directory.patch
|
|
patch -p1 -i $srcdir/0002-Check-empty-subdirectory-ownership.patch
|
|
|
|
./configure --prefix=/usr --sysconfdir=/etc \
|
|
--localstatedir=/var --enable-doc
|
|
make
|
|
}
|
|
|
|
check() {
|
|
make -C "$pkgname-$pkgver" check
|
|
}
|
|
|
|
package() {
|
|
cd $srcdir/$pkgname-$pkgver
|
|
make DESTDIR=$pkgdir install
|
|
|
|
# install Arch specific stuff
|
|
mkdir -p $pkgdir/etc
|
|
case "$CARCH" in
|
|
i686)
|
|
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
|
mycarch="i686"
|
|
mychost="i686-pc-linux-gnu"
|
|
myflags="-march=i686 "
|
|
;;
|
|
x86_64)
|
|
install -m644 $srcdir/pacman.conf.x86_64 $pkgdir/etc/pacman.conf
|
|
mycarch="x86_64"
|
|
mychost="x86_64-unknown-linux-gnu"
|
|
myflags="-march=x86-64 "
|
|
;;
|
|
arm)
|
|
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
|
mycarch="arm"
|
|
mychost="arm-unknown-linux-gnueabi"
|
|
myflags="-march=armv5te "
|
|
;;
|
|
armv6h)
|
|
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
|
mycarch="armv6h"
|
|
mychost="armv6l-unknown-linux-gnueabihf"
|
|
myflags="-march=armv6 -mfloat-abi=hard -mfpu=vfp "
|
|
;;
|
|
armv7h)
|
|
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
|
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"
|
|
|
|
# install completion files
|
|
install -Dm644 contrib/bash_completion "$pkgdir/usr/share/bash-completion/completions/pacman"
|
|
for f in makepkg pacman-key; do
|
|
ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f"
|
|
done
|
|
|
|
install -Dm644 contrib/zsh_completion $pkgdir/usr/share/zsh/site-functions/_pacman
|
|
}
|