112 lines
2.8 KiB
Text
112 lines
2.8 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
pkgname=git-annex
|
|
pkgver=10.20230926
|
|
pkgrel=0
|
|
pkgdesc="Manage files with git, without checking their contents into git"
|
|
url="http://git-annex.branchable.com"
|
|
arch="x86_64 aarch64" # limited by ghc
|
|
license="AGPL-3.0-or-later"
|
|
options="net"
|
|
depends="
|
|
curl
|
|
git
|
|
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/git-annex-$pkgver.tar.gz
|
|
https://lab.ilot.io/mirrors/git-annex/-/releases/$pkgver/downloads/config/git-annex-$pkgver-edge.config
|
|
fix-makefile.patch
|
|
"
|
|
subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion"
|
|
|
|
# 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 \
|
|
"
|
|
_cabal_home="$srcdir/dist"
|
|
|
|
cabal_update() {
|
|
default_prepare
|
|
msg "Freezing $pkgname dependencies"
|
|
|
|
# Resolve deps and generate fresh cabal.config with version constraints.
|
|
HOME="$_cabal_home" cabal update
|
|
cd "$srcdir/git-annex"*
|
|
HOME="$_cabal_home" cabal v1-freeze --shadow-installed-packages
|
|
|
|
mv "cabal.config" "$startdir/git-annex-$pkgver.config"
|
|
cd "$startdir"
|
|
|
|
if ! abuild checksum; then
|
|
die "Failed to update checksum, run 'abuild checksum' manually"
|
|
fi
|
|
}
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
ln -sf "$srcdir"/git-annex-*.config cabal.config
|
|
|
|
# ghc version path
|
|
export PATH="$PATH:/usr/lib/llvm14/bin"
|
|
|
|
# problematic depend install
|
|
HOME="$_cabal_home" cabal update
|
|
}
|
|
|
|
build() {
|
|
# ghc version path
|
|
export PATH="$PATH:/usr/lib/llvm14/bin"
|
|
|
|
msg "Building git-annex-$pkgver"
|
|
HOME="$_cabal_home" cabal update
|
|
HOME="$_cabal_home" cabal v1-install \
|
|
--only-dependencies \
|
|
--allow-newer=feed:base-compat \
|
|
$_feature_flags
|
|
HOME="$_cabal_home" cabal v1-configure $_feature_flags
|
|
HOME="$_cabal_home" cabal v1-build -j
|
|
mv dist/build/git-annex/git-annex .
|
|
ln -s git-annex git-annex-shell
|
|
}
|
|
|
|
check() {
|
|
"$builddir"/git-annex test
|
|
}
|
|
|
|
package() {
|
|
HOME="$_cabal_home" make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
sha512sums="
|
|
e59f41485d30cd824c4405bb8b73f2f2f1a3b6b10fcd5af1ad504093fce22ebb2f9280fc559e19a92c6247222cce137937143e72b9abf8c2b480d728518f02b5 git-annex-10.20230926.tar.gz
|
|
6842f63a97b60317690fcc9561cd05c262faa7bd02193c58d55ca2028095f34c8dabcb8601b2944dcbee6e8c3a01038b274c490aaf19ce368b56e188f7713acb git-annex-10.20230926-edge.config
|
|
9300f883746d8726f47be6d194b5ac9550e2894669097f3202eca944221665bd3087a81b3f97b21f013eccaa6b5b1fb050e253ac18999c136db20056fadf2ed8 fix-makefile.patch
|
|
"
|