You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.2 KiB
71 lines
2.2 KiB
9 years ago
|
# 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
|
||
|
|
||
9 years ago
|
#FIXME: asciidoc, fakechroot/fakeroot
|
||
|
TERMUX_PKG_DEPENDS="bash, glib, libarchive, curl, gpgme, python2, libandroid-glob, libandroid-support"
|
||
9 years ago
|
|
||
|
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>"
|
||
|
|
||
9 years ago
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--prefix=$TERMUX_PREFIX --sysconfdir=$TERMUX_PREFIX/etc"
|
||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --localstatedir=$TERMUX_PREFIX/var --enable-doc "
|
||
9 years ago
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-scriptlet-shell=/usr/bin/bash"
|
||
|
|
||
9 years ago
|
|
||
|
export LDFLAGS="$LDFLAGS -llog -landroid-glob"
|
||
|
|
||
9 years ago
|
termux_step_make () {
|
||
|
make
|
||
|
make -C contrib
|
||
9 years ago
|
# make -C "$pkgname-$pkgver" check
|
||
9 years ago
|
}
|
||
|
|
||
|
#package() {
|
||
|
termux_step_make_install () {
|
||
|
|
||
9 years ago
|
make install
|
||
|
make -C contrib install
|
||
9 years ago
|
|
||
|
# install Arch specific stuff
|
||
9 years ago
|
install -dm755 "$TERMUX_PREFIX/etc"
|
||
|
install -m644 "$TERMUX_PKG_BUILDER_DIR/pacman.conf" "$TERMUX_PREFIX/etc/pacman.conf"
|
||
9 years ago
|
|
||
|
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
|
||
9 years ago
|
install -m644 "$TERMUX_PKG_BUILDER_DIR/makepkg.conf" "$TERMUX_PREFIX/etc"
|
||
|
sed -i "$TERMUX_PREFIX/etc/makepkg.conf" \
|
||
9 years ago
|
-e "s|@CARCH[@]|$mycarch|g" \
|
||
|
-e "s|@CHOST[@]|$mychost|g" \
|
||
|
-e "s|@CARCHFLAGS[@]|$myflags|g"
|
||
|
|
||
9 years ago
|
# FIXME bash_completion
|
||
9 years ago
|
# # put bash_completion in the right location
|
||
9 years ago
|
# 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"
|
||
9 years ago
|
|
||
9 years ago
|
# for f in makepkg pacman-key; do
|
||
|
# ln -s pacman "$TERMUX_PREFIX/share/bash-completion/completions/$f"
|
||
|
# done
|
||
9 years ago
|
|
||
9 years ago
|
install -Dm644 contrib/PKGBUILD.vim "$TERMUX_PREFIX/share/vim/vimfiles/syntax/PKGBUILD.vim"
|
||
9 years ago
|
}
|