mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 12:14:36 +08:00
78 lines
2.2 KiB
Bash
78 lines
2.2 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer <manutortosa[at]chakra-project[dot]org>
|
|
|
|
pkgname=pacman
|
|
pkgver=4.1.0
|
|
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.2.042-1' 'glibc>=2.15-2' 'libarchive=3.1.2-1' 'curl>=7.28.1'
|
|
'gpgme' 'pacman-mirrorlist' )
|
|
checkdepends=('python2' 'fakechroot')
|
|
makedepends=('asciidoc')
|
|
optdepends=('fakeroot: for makepkg usage as normal user')
|
|
provides=('pacman-contrib')
|
|
conflicts=('pacman-contrib')
|
|
replaces=('pacman-contrib')
|
|
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=('a0f2b3148bee4784f21cf373cf59a0bc'
|
|
'4959b8d00056398195f4e549e7bdd346'
|
|
'bc17835d46a16c5946a85a40a47974d6'
|
|
'5beebe36bfc1e1f677d5ae12fcff8083')
|
|
|
|
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
|
|
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 Arch specific stuff
|
|
install -dm755 $pkgdir/etc
|
|
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
|
|
|
|
mycarch="x86_64"
|
|
mychost="x86_64-unknown-linux-gnu"
|
|
myflags="-march=x86-64"
|
|
|
|
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"
|
|
|
|
# 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
|
|
}
|