2015-12-23 22:44:37 +01:00
|
|
|
# HEAVILY adapted from archlinux PKGBUILD
|
|
|
|
pkgname=pacman
|
|
|
|
pkgver=4.2.1
|
|
|
|
|
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.archlinux.org/pacman/
|
|
|
|
TERMUX_PKG_DESCRIPTION="A library-based package manager with dependency support"
|
|
|
|
TERMUX_PKG_VERSION=$pkgver
|
|
|
|
|
2015-12-24 05:31:38 +01:00
|
|
|
#FIXME: asciidoc, fakechroot/fakeroot
|
|
|
|
TERMUX_PKG_DEPENDS="bash, glib, libarchive, curl, gpgme, python2, libandroid-glob, libandroid-support"
|
2015-12-23 22:44:37 +01:00
|
|
|
|
|
|
|
TERMUX_PKG_SRCURL="https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz"
|
|
|
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
|
|
|
TERMUX_PKG_MAINTAINER="Francisco Demartino <demartino.francisco@gmail.com>"
|
|
|
|
|
2015-12-24 03:44:52 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--prefix=$TERMUX_PREFIX --sysconfdir=$TERMUX_PREFIX/etc"
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --localstatedir=$TERMUX_PREFIX/var --enable-doc "
|
2015-12-23 22:44:37 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-scriptlet-shell=/usr/bin/bash"
|
|
|
|
|
2015-12-24 03:44:52 +01:00
|
|
|
|
|
|
|
export LDFLAGS="$LDFLAGS -llog -landroid-glob"
|
|
|
|
|
2015-12-23 22:44:37 +01:00
|
|
|
termux_step_make () {
|
|
|
|
make
|
|
|
|
make -C contrib
|
2015-12-24 03:44:52 +01:00
|
|
|
# make -C "$pkgname-$pkgver" check
|
2015-12-23 22:44:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#package() {
|
|
|
|
termux_step_make_install () {
|
|
|
|
|
2015-12-24 04:17:04 +01:00
|
|
|
make install
|
|
|
|
make -C contrib install
|
2015-12-23 22:44:37 +01:00
|
|
|
|
|
|
|
# install Arch specific stuff
|
2015-12-24 03:44:52 +01:00
|
|
|
install -dm755 "$TERMUX_PREFIX/etc"
|
|
|
|
install -m644 "$TERMUX_PKG_BUILDER_DIR/pacman.conf" "$TERMUX_PREFIX/etc/pacman.conf"
|
2015-12-23 22:44:37 +01:00
|
|
|
|
|
|
|
case $TERMUX_ARCH in
|
|
|
|
i686)
|
|
|
|
mycarch="i686"
|
|
|
|
mychost="i686-pc-linux-gnu"
|
|
|
|
myflags="-march=i686"
|
|
|
|
;;
|
|
|
|
arm)
|
|
|
|
mycarch="arm"
|
|
|
|
mychost="arm-unknown-linux-gnu"
|
|
|
|
myflags="-march=arm"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# set things correctly in the default conf file
|
2015-12-24 03:44:52 +01:00
|
|
|
install -m644 "$TERMUX_PKG_BUILDER_DIR/makepkg.conf" "$TERMUX_PREFIX/etc"
|
|
|
|
sed -i "$TERMUX_PREFIX/etc/makepkg.conf" \
|
2015-12-23 22:44:37 +01:00
|
|
|
-e "s|@CARCH[@]|$mycarch|g" \
|
|
|
|
-e "s|@CHOST[@]|$mychost|g" \
|
|
|
|
-e "s|@CARCHFLAGS[@]|$myflags|g"
|
|
|
|
|
2015-12-24 03:44:52 +01:00
|
|
|
# FIXME bash_completion
|
2015-12-24 04:17:04 +01:00
|
|
|
# # put bash_completion in the right location
|
2015-12-24 03:44:52 +01:00
|
|
|
# install -dm755 "$TERMUX_PREFIX/share/bash-completion/completions"
|
|
|
|
# mv "$TERMUX_PREFIX/etc/bash_completion.d/pacman" "$TERMUX_PREFIX/share/bash-completion/completions"
|
|
|
|
# rmdir "$TERMUX_PREFIX/etc/bash_completion.d"
|
2015-12-23 22:44:37 +01:00
|
|
|
|
2015-12-24 03:44:52 +01:00
|
|
|
# for f in makepkg pacman-key; do
|
|
|
|
# ln -s pacman "$TERMUX_PREFIX/share/bash-completion/completions/$f"
|
|
|
|
# done
|
2015-12-23 22:44:37 +01:00
|
|
|
|
2015-12-24 03:44:52 +01:00
|
|
|
install -Dm644 contrib/PKGBUILD.vim "$TERMUX_PREFIX/share/vim/vimfiles/syntax/PKGBUILD.vim"
|
2015-12-23 22:44:37 +01:00
|
|
|
}
|