141 lines
3.9 KiB
Text
141 lines
3.9 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
pkgname=git-annex
|
|
pkgver=10.20230802
|
|
_bloomfilterver=2.0.1.0
|
|
_connectionver=0.3.1
|
|
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
|
|
git-annex.config
|
|
git-annex-block-crypton.patch
|
|
bloomfilter-ghc9.2.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-annex"
|
|
|
|
cabal_update() {
|
|
default_prepare
|
|
msg "Freezing $pkgname dependencies"
|
|
|
|
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
|
|
|
|
# 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
|
|
}
|
|
|
|
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="
|
|
1cf8626ba58869ecb7cd2965660e30e8e56590e19470a87f91b0c326b9d19478b7265663c7a03cf5f4785361429744827d4ef90718431a59cb2ede9f94ee7b68 git-annex-10.20230802.tar.gz
|
|
1031cc28c5e5c1b7687355b709d436ebab1956ffd7591a010fa3852a1bc7412925a365f99937feeacf4b1a5d3c7b34bc0370707ad6e4533280dcac4ea3fa7c21 bloomfilter-2.0.1.0.tar.gz
|
|
1d73754b22c797c541e351f001f953f7845f2df70768ef03f4ecc00eafc3d2fb6241efbeca4c1ec9ab5d6e8fa1e8e676c8b23522414038ce4ea9983db8cc31ee git-annex.config
|
|
6c8b2055ddffc49a8572aec4880514808be01e00721617d157d51974131164e9663e656e8af7c81905e9b248a56ee4cfc7c048a5b55a09b9eab0c5827c75bd55 git-annex-block-crypton.patch
|
|
500ebfd84e5771ed62ad2491b3f484d9a049091cd9bced072f34e64d81fd4db8aff2cfd9a0b2278335ac86198bfca551aec6ce3a2bd07d4484393a4288d3af35 bloomfilter-ghc9.2.diff
|
|
178be26bc808f6a5c065957b04e3a32b02f0a6b5eb8c422c9d8960b6e9a1f90d689360c5ad491156783b25e80f4c2f9861e9ccff5091c302be713fa3063df670 fix-makefile.patch
|
|
"
|