mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 07:44:35 +08:00
89 lines
2.8 KiB
Bash
89 lines
2.8 KiB
Bash
|
|
pkgname=pacman
|
|
pkgver=5.0.2
|
|
pkgrel=2
|
|
pkgdesc="A library-based package manager with dependency support"
|
|
arch=('x86_64')
|
|
url="http://www.archlinux.org/pacman/"
|
|
license=('GPL')
|
|
groups=('base' 'base-devel')
|
|
depends=('bash>=4.3.025-1' 'glibc>=2.20-2' 'libarchive=3.2.2' 'curl>=7.28.1'
|
|
'gpgme' 'pacman-mirrorlist' 'nettle>=3.1')
|
|
checkdepends=('python2' 'fakechroot')
|
|
makedepends=('asciidoc')
|
|
optdepends=('fakeroot: for makepkg usage as normal user')
|
|
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
|
|
pacman.conf
|
|
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
|
|
:
|
|
}
|
|
|
|
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 V=1
|
|
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 Chakra specific stuff
|
|
install -Dm644 "$srcdir"/pacman.conf "$pkgdir"/etc/pacman.conf
|
|
|
|
mycarch="x86_64"
|
|
mychost="x86_64-pc-linux-gnu"
|
|
myflags="-march=x86-64"
|
|
|
|
install -Dm644 "$srcdir"/makepkg.conf "$pkgdir"/etc/makepkg.conf
|
|
# 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"
|
|
|
|
# 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
|
|
|
|
install -Dm644 contrib/PKGBUILD.vim "$pkgdir"/usr/share/vim/vimfiles/syntax/PKGBUILD.vim
|
|
}
|