ayaports/apk/main/git-annex/APKBUILD

115 lines
2.2 KiB
Text
Raw Normal View History

2022-01-23 02:53:35 +00:00
# Maintainer: Antoine "ayakael" Martin <dev@ayakael.net>
2021-11-30 21:44:44 +00:00
pkgname=git-annex
2022-01-23 02:53:35 +00:00
pkgver=8.20211231
2021-11-30 21:44:44 +00:00
pkgrel=0
pkgdesc="Manage files with git, without checking their contents into git"
url="http://git-annex.branchable.com"
2022-01-23 02:53:35 +00:00
arch="x86_64"
license="AGPL-3.0-or-later"
depends="
curl
git
openssh-client
rsync
"
makedepends="
alex
cabal
dbus-dev
file-dev
ghc
gmp-dev
gnutls-dev
happy
libffi-dev
libgsasl-dev
libxml2-dev
ncurses-dev
zlib-dev
"
source="https://git.joeyh.name/index.cgi/git-annex.git/snapshot/$pkgname-$pkgver.tar.gz"
2021-12-09 03:27:20 +00:00
subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion"
2021-11-30 21:44:44 +00:00
2022-01-23 02:53:35 +00:00
# Add / remove '-' between "-f" and "FeatureName" to adjust feature build
_feature_flags="
-fAssistant \
-fWebApp \
-fPairing \
-fProduction \
-fTorrentParser \
-fMagicMime \
-fBenchmark \
-f-DebugLocks \
-fDbus \
-fNetworkBSD \
-fGitLfs \
-fHttpClientRestricted \
"
# The man page is always built but, building the rest of the documentation
# requires ikiwiki. If you want to build the documentation add ikiwiki
# to _cabal_flags
_cabal_flags=" --force-reinstalls "
2021-11-30 21:44:44 +00:00
_cabal_makedepends="c2hs cpphs"
_cabal_libdepends="exceptions hslogger async tasty filepath-bytestring split unix-compat"
2021-12-05 23:30:09 +00:00
_localize_home() {
ORIG_HOME="$HOME"
ORIG_TMPDIR="$TMPDIR"
export HOME="$srcdir"/cabal
export TMPDIR="$srcdir"/cabal/tmp
export PATH="$HOME/.cabal/bin:$PATH"
2021-11-30 21:44:44 +00:00
}
2021-12-05 23:30:09 +00:00
_restore_home() {
export HOME="$ORIG_HOME"
export TMPDIR="$ORIG_TMPDIR"
2021-11-30 21:44:44 +00:00
}
prepare() {
2021-12-05 23:30:09 +00:00
default_prepare
_localize_home
mkdir -p "$HOME" "$TMPDIR"
2022-01-23 02:53:35 +00:00
msg "Features: $_feature_flags"
2021-12-05 23:30:09 +00:00
msg "Installing missing cabal dependencies..."
cabal update
cabal install $_cabal_makedepends
cabal install --lib $_cabal_libdepends
2022-01-23 02:53:35 +00:00
cabal install $_cabal_flags --user --only-dependencies $_feature_flags
2021-12-05 23:30:09 +00:00
_restore_home
2021-11-30 21:44:44 +00:00
}
build() {
2021-12-05 23:30:09 +00:00
_localize_home
2021-11-30 21:44:44 +00:00
2021-12-05 23:30:09 +00:00
msg "Configuring..."
2022-01-23 02:53:35 +00:00
cabal configure $_feature_flags
2021-11-30 21:44:44 +00:00
2021-12-05 23:30:09 +00:00
msg "Starting build..."
make
_restore_home
2021-11-30 21:44:44 +00:00
}
check() {
2021-12-05 23:30:09 +00:00
_localize_home
2022-01-23 02:53:35 +00:00
make test
2021-12-05 23:30:09 +00:00
_restore_home
2021-11-30 21:44:44 +00:00
}
package() {
2021-12-05 23:30:09 +00:00
_localize_home
make DESTDIR="$pkgdir" install
_restore_home
2021-11-30 21:44:44 +00:00
}
sha512sums="
2022-01-23 02:53:35 +00:00
cfe5d5dec31b0c9e4f856400b7659cafdb003b3942f7fabc2db9d267d522f8d1ab354a0dd7a63c223575b85b58bac1dce68af4efb15183a6dc63e744a8318f47 git-annex-8.20211231.tar.gz
2021-11-30 21:44:44 +00:00
"