PKGBUILDs/core/pacman/PKGBUILD

113 lines
3.6 KiB
Bash
Raw Normal View History

2012-01-17 22:38:54 +00:00
# vim: set ts=2 sw=2 et:
# $Id: PKGBUILD 146700 2012-01-16 19:48:37Z dreisner $
2010-07-10 01:32:36 +00:00
# Maintainer: Dan McGee <dan@archlinux.org>
2012-05-14 23:35:39 +00:00
# Maintainer: Dave Reisner <dreisner@archlinux.org>
2010-07-10 01:32:36 +00:00
2012-01-17 22:38:54 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - arch/host/flags for arm and armv7h
# - pacman.conf: architecture=arm/armv7h, added our aur and alarm repos
2012-01-17 22:38:54 +00:00
# - makepkg.conf: adjusted C/CXX/LDFLAGS
2011-02-06 20:16:05 +00:00
pkgname=pacman
2012-05-14 23:35:39 +00:00
pkgver=4.0.3
2013-03-03 18:31:10 +00:00
pkgrel=7
pkgdesc="A library-based package manager with dependency support"
2012-01-17 22:38:54 +00:00
arch=('i686' 'x86_64')
url="http://www.archlinux.org/pacman/"
license=('GPL')
2013-03-03 18:31:10 +00:00
groups=('base' 'base-devel')
depends=('bash' 'glibc>=2.16.0' 'libarchive>=3.1.2' 'curl>=7.19.4'
2012-01-17 22:38:54 +00:00
'gpgme' 'pacman-mirrorlist')
makedepends=('asciidoc')
optdepends=('fakeroot: for makepkg usage as normal user')
2010-04-27 01:52:11 +00:00
backup=(etc/pacman.conf etc/makepkg.conf)
2009-12-07 20:25:36 +00:00
install=pacman.install
options=(!libtool)
2012-02-14 14:35:38 +00:00
source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
2012-09-14 04:20:30 +00:00
0001-Add-conflict-for-replacing-owned-empty-directory.patch
0002-Check-empty-subdirectory-ownership.patch
2012-11-18 07:56:29 +00:00
0003-Ensure-pre_upgrade-scriptlet-gets-old-package-version.patch
pacman.conf
2012-01-17 22:38:54 +00:00
makepkg.conf)
2012-05-14 23:35:39 +00:00
md5sums=('387965c7125e60e5f0b9ff3b427fe0f9'
2012-09-14 04:30:17 +00:00
'1a70392526c8768470da678b31905a6e'
2012-09-14 04:20:30 +00:00
'0c1d326d0ca48c9a9819ea8060ea3bba'
'02db451be806335ce189ffadb5cf84b9'
2012-11-18 07:56:29 +00:00
'2e8cbf55a94b1954b167c5dee6b62317'
'9a7d914def620cc4dd1a94ed53892175'
2012-07-08 17:41:39 +00:00
'e6d44e71b847d2c98bb38087e33cd76b')
2010-04-27 01:52:11 +00:00
# keep an upgrade path for older installations
PKGEXT='.pkg.tar.gz'
build() {
2009-12-07 20:25:36 +00:00
cd $srcdir/$pkgname-$pkgver
2011-08-14 16:34:13 +00:00
2012-09-14 04:20:30 +00:00
patch -p1 -i $srcdir/0001-Add-conflict-for-replacing-owned-empty-directory.patch
patch -p1 -i $srcdir/0002-Check-empty-subdirectory-ownership.patch
2012-11-18 07:56:29 +00:00
patch -p1 -i $srcdir/0003-Ensure-pre_upgrade-scriptlet-gets-old-package-version.patch
2012-09-14 04:20:30 +00:00
2011-03-25 23:16:57 +00:00
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --enable-doc
2011-02-06 20:13:24 +00:00
make
2009-12-07 20:25:36 +00:00
}
2012-02-14 14:35:38 +00:00
check() {
make -C "$pkgname-$pkgver" check
}
2009-12-07 20:25:36 +00:00
package() {
cd $srcdir/$pkgname-$pkgver
2011-02-06 20:13:24 +00:00
make DESTDIR=$pkgdir install
2009-12-07 20:25:36 +00:00
# install Arch specific stuff
mkdir -p $pkgdir/etc
2011-05-02 02:46:30 +00:00
case "$CARCH" in
2012-01-17 22:38:54 +00:00
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 "
;;
2011-05-02 02:46:30 +00:00
arm)
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
mycarch="arm"
2012-11-05 17:39:36 +00:00
mychost="armv5tel-unknown-linux-gnueabi"
2011-05-02 02:46:30 +00:00
myflags="-march=armv5te "
;;
2012-07-29 19:17:03 +00:00
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 "
;;
2011-06-22 00:48:50 +00:00
armv7h)
2012-01-17 22:38:54 +00:00
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
2011-06-22 00:48:50 +00:00
mycarch="armv7h"
2012-07-08 17:41:39 +00:00
mychost="armv7l-unknown-linux-gnueabihf"
myflags="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 "
2011-05-02 02:46:30 +00:00
;;
esac
2009-12-07 20:25:36 +00:00
install -m644 $srcdir/makepkg.conf $pkgdir/etc/
2011-02-06 20:13:24 +00:00
# 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"
2012-01-17 22:38:54 +00:00
sed -i $pkgdir/etc/pacman.conf -e "s|@CARCH[@]|$mycarch|g"
# install completion files
2012-05-14 23:35:39 +00:00
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
}