# vim: set ts=2 sw=2 et: # $Id: PKGBUILD 146700 2012-01-16 19:48:37Z dreisner $ # Maintainer: Dan McGee # Maintainer: Dave Reisner # ALARM: Kevin Mihelich # - arch/host/flags for arm and armv7h # - pacman.conf: architecture=arm/armv7h, added our aur repo # - makepkg.conf: adjusted C/CXX/LDFLAGS plugrel=1 noautobuild=1 pkgname=pacman pkgver=4.0.2 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') depends=('bash' 'glibc>=2.15' '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} pacman.conf makepkg.conf) md5sums=('289ba4a19a16393096e065cec1cb9b0a' '575140dce3ea597d91b6d081aa3f6a00' '9c58ab16092e34eb359ea7e8d56bfc3a' 'e6d44e71b847d2c98bb38087e33cd76b') # 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 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 " ;; armv7h) install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf mycarch="armv7h" mychost="armv7l-unknown-linux-gnueabi" 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 mkdir -p $pkgdir/etc/bash_completion.d/ install -m644 contrib/bash_completion $pkgdir/etc/bash_completion.d/pacman mkdir -p $pkgdir/usr/share/zsh/site-functions/ install -m644 contrib/zsh_completion $pkgdir/usr/share/zsh/site-functions/_pacman }