144 lines
4.3 KiB
Text
144 lines
4.3 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
pkgname=git-annex
|
|
pkgver=10.20230407
|
|
_bloomfilterver=2.0.1.0
|
|
_gitlfsver=1.2.0
|
|
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"
|
|
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://hackage.haskell.org/package/bloomfilter-$_bloomfilterver/bloomfilter-$_bloomfilterver.tar.gz
|
|
https://hackage.haskell.org/package/git-lfs-$_gitlfsver/git-lfs-$_gitlfsver.tar.gz
|
|
git-annex.config
|
|
git-lfs.config
|
|
bloomfilter-ghc9.2.diff
|
|
git-lfs-depend-update.diff
|
|
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_config="git-lfs git-annex"
|
|
|
|
cabal_update() {
|
|
msg "Freezing $pkgname dependencies"
|
|
|
|
# Resolve deps and generate fresh cabal.config with version constraints.
|
|
HOME="$_cabal_home" cabal update
|
|
for i in $_cabal_config; do
|
|
cd "$srcdir/$i"*
|
|
HOME="$_cabal_home" cabal v1-freeze --shadow-installed-packages
|
|
|
|
# Add version tag at the first line.
|
|
sed -i "1i--$pkgver" "cabal.config"
|
|
|
|
mv "cabal.config" "$startdir/$i.config"
|
|
cd "$startdir"
|
|
done
|
|
|
|
if ! abuild checksum; then
|
|
die "Failed to update checksum, run 'abuild checksum' manually"
|
|
fi
|
|
}
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
if [ "$(head -n 1 "$srcdir/git-annex.config")" != "--$pkgver" ]; then
|
|
die "Requirements file is outdated, run 'abuild cabal_update'"
|
|
fi
|
|
|
|
for i in $_cabal_config; do
|
|
cd "$srcdir"/$i*
|
|
ln -sf "$srcdir/$i.config" cabal.config
|
|
done
|
|
|
|
# ghc version path
|
|
export PATH="$PATH:/usr/lib/llvm14/bin"
|
|
|
|
# problematic depend install
|
|
HOME="$_cabal_home" cabal update
|
|
|
|
msg "Installing dependency bloomfilter-$_bloomfilterver out-of-tree"
|
|
cd "$srcdir"/bloomfilter-*
|
|
patch -p1 -i "$srcdir"/bloomfilter-ghc9.2.diff
|
|
HOME="$_cabal_home" cabal v1-install
|
|
|
|
msg "installing dependency git-lfs-$_gitlfsver out-of-tree"
|
|
cd "$srcdir"/git-lfs-*
|
|
patch -p1 -i "$srcdir"/git-lfs-depend-update.diff
|
|
HOME="$_cabal_home" cabal v1-install
|
|
}
|
|
|
|
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 \
|
|
$_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="
|
|
3e2749fe94d8243501ce2cd705a25d519d4a3eb887fdf7088a306fc9e5caf3cca9619332563486f2ed5df3c67ab8c9798b3cd1c0b4ab2ae51db456f00b549846 git-annex-10.20230407.tar.gz
|
|
1031cc28c5e5c1b7687355b709d436ebab1956ffd7591a010fa3852a1bc7412925a365f99937feeacf4b1a5d3c7b34bc0370707ad6e4533280dcac4ea3fa7c21 bloomfilter-2.0.1.0.tar.gz
|
|
13d8c3c7c9844e935af278b4b6dc477b4ef069a3b61a5fea5bf28aadbd3ca4b475aa23701fe7be8a9468af78771d1fabda3e74c5d4b9a3fbb77ee8b803198f65 git-lfs-1.2.0.tar.gz
|
|
0ab66e49ce9ac2b0ce222a6362935ff58a5bece4aec0a868c80b410d07ecbfb5a092322309d524d6c8ae0145ed895e1dc705060d54a863298397e118e479a548 git-annex.config
|
|
747b8efb987243295a34386faabb2928dbe61594475a559d34af48ca9acdea4f17a6a7151ce7d1d2fb65ad0ae4331d4fce702c0fc26c49ed49d9dcfe744c1a47 git-lfs.config
|
|
500ebfd84e5771ed62ad2491b3f484d9a049091cd9bced072f34e64d81fd4db8aff2cfd9a0b2278335ac86198bfca551aec6ce3a2bd07d4484393a4288d3af35 bloomfilter-ghc9.2.diff
|
|
923d9e93380238115841f2dfbe61d34bf4bf8b3806f898d259125f31f5e4c6147840b1da737385aaa96a425d0dd4bacb2ab846ec3ea608ec6de243484fdded2e git-lfs-depend-update.diff
|
|
178be26bc808f6a5c065957b04e3a32b02f0a6b5eb8c422c9d8960b6e9a1f90d689360c5ad491156783b25e80f4c2f9861e9ccff5091c302be713fa3063df670 fix-makefile.patch
|
|
"
|