core/pacman/PKGBUILD

89 lines
2.8 KiB
Bash
Raw Normal View History

2010-07-29 04:21:06 +08:00
2010-03-13 23:25:19 +08:00
pkgname=pacman
pkgver=5.0.2
pkgrel=2
2010-03-13 23:25:19 +08:00
pkgdesc="A library-based package manager with dependency support"
2012-12-08 06:24:31 +08:00
arch=('x86_64')
2010-03-13 23:25:19 +08:00
url="http://www.archlinux.org/pacman/"
license=('GPL')
2013-04-12 01:20:48 +08:00
groups=('base' 'base-devel')
depends=('bash>=4.3.025-1' 'glibc>=2.20-2' 'libarchive=3.2.2' 'curl>=7.28.1'
2015-11-16 03:24:52 +08:00
'gpgme' 'pacman-mirrorlist' 'nettle>=3.1')
2013-04-12 01:20:48 +08:00
checkdepends=('python2' 'fakechroot')
2015-03-29 01:09:04 +08:00
makedepends=('asciidoc')
optdepends=('fakeroot: for makepkg usage as normal user')
2010-03-13 23:25:19 +08:00
backup=(etc/pacman.conf etc/makepkg.conf)
install=pacman.install
options=(!libtool)
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
https://git.archlinux.org/svntogit/packages.git/plain/trunk/0001-libmakepkg-Support-file-5.33-s-application-x-pie-exe.patch?h=packages/pacman
2013-04-13 01:58:27 +08:00
pacman.conf
2013-04-12 01:20:48 +08:00
makepkg.conf)
sha1sums=('3b9c0797ac04a89d1517771595f13bddc68933b1'
'SKIP'
'6e760dbfc5b05ac9fb6bcc80e553c4c08fbf59e2'
'735dfdbf78f1249567b3250a2766f55eb6ae9a0c'
'0e61e106d58a332ac7bb0a34885358d37297886e')
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
prepare() {
cd "$pkgname-$pkgver"
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
msg2 "Applying patch ${filename##*/}"
patch -p1 -N -i "$srcdir/${filename##*/}"
fi
done
:
}
2010-04-04 22:20:41 +08:00
2010-03-13 23:25:19 +08:00
build() {
2015-03-29 01:09:04 +08:00
cd "$srcdir"/$pkgname-$pkgver
./configure --prefix=/usr --sysconfdir=/etc \
2013-04-12 01:20:48 +08:00
--localstatedir=/var --enable-doc \
2014-09-25 06:11:14 +08:00
--with-scriptlet-shell=/usr/bin/bash \
2013-04-12 01:20:48 +08:00
--with-ldconfig=/usr/bin/ldconfig
make V=1
2013-04-12 01:20:48 +08:00
make -C contrib
2010-03-13 23:25:19 +08:00
}
check() {
make -C "$pkgname-$pkgver" check
}
2010-03-13 23:25:19 +08:00
package() {
2015-03-29 01:09:04 +08:00
cd "$srcdir"/$pkgname-$pkgver
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" -C contrib install
# install Chakra specific stuff
install -Dm644 "$srcdir"/pacman.conf "$pkgdir"/etc/pacman.conf
2010-03-13 23:25:19 +08:00
2012-12-08 06:24:31 +08:00
mycarch="x86_64"
2017-03-17 14:44:28 +08:00
mychost="x86_64-pc-linux-gnu"
2013-04-12 01:20:48 +08:00
myflags="-march=x86-64"
2012-12-08 06:24:31 +08:00
install -Dm644 "$srcdir"/makepkg.conf "$pkgdir"/etc/makepkg.conf
2011-02-07 00:25:02 +08:00
# set things correctly in the default conf file
2015-03-29 01:09:04 +08:00
sed -i "$pkgdir"/etc/makepkg.conf \
2010-03-13 23:25:19 +08:00
-e "s|@CARCH[@]|$mycarch|g" \
-e "s|@CHOST[@]|$mychost|g" \
-e "s|@CARCHFLAGS[@]|$myflags|g"
2015-03-29 01:09:04 +08:00
2013-04-12 01:20:48 +08:00
# 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
2010-03-13 23:25:19 +08:00
2012-09-10 04:35:31 +08:00
for f in makepkg pacman-key; do
2015-03-29 01:09:04 +08:00
ln -s pacman "$pkgdir"/usr/share/bash-completion/completions/$f
2012-09-10 04:35:31 +08:00
done
2015-03-29 01:09:04 +08:00
install -Dm644 contrib/PKGBUILD.vim "$pkgdir"/usr/share/vim/vimfiles/syntax/PKGBUILD.vim
2010-03-13 23:25:19 +08:00
}