ayaports/community/git-annex/APKBUILD

142 lines
3.9 KiB
Text
Raw Normal View History

2023-02-22 04:47:54 +00:00
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=git-annex
pkgver=10.20230626
2023-02-22 04:47:54 +00:00
_bloomfilterver=2.0.1.0
_connectionver=0.3.1
2023-03-23 20:09:42 +00:00
pkgrel=0
2023-02-22 04:47:54 +00:00
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
2023-02-22 04:47:54 +00:00
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"
2023-02-22 04:47:54 +00:00
cabal_update() {
default_prepare
2023-02-22 04:47:54 +00:00
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
2023-02-22 04:47:54 +00:00
# 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
}
2023-03-23 20:09:42 +00:00
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
2023-02-22 04:47:54 +00:00
# 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
}
2023-03-23 20:09:42 +00:00
2023-02-22 04:47:54 +00:00
sha512sums="
fdcf3e68f161d68f9b02194727c145d6212fa826ade15b5ee76dc0bb6f936e06972e832edddf2d8671d98609643c019aa04610111498b32721165105078bc432 git-annex-10.20230626.tar.gz
2023-02-22 04:47:54 +00:00
1031cc28c5e5c1b7687355b709d436ebab1956ffd7591a010fa3852a1bc7412925a365f99937feeacf4b1a5d3c7b34bc0370707ad6e4533280dcac4ea3fa7c21 bloomfilter-2.0.1.0.tar.gz
368e9ae547c91f4cb2e6842d54d04c2cc4570abae847415a3d9420af0d16d9a09e761eaca695fda2a950ec6e37c6fe63286b8d088b853a357d360bdcf6b736ca git-annex.config
6c8b2055ddffc49a8572aec4880514808be01e00721617d157d51974131164e9663e656e8af7c81905e9b248a56ee4cfc7c048a5b55a09b9eab0c5827c75bd55 git-annex-block-crypton.patch
2023-02-22 04:47:54 +00:00
500ebfd84e5771ed62ad2491b3f484d9a049091cd9bced072f34e64d81fd4db8aff2cfd9a0b2278335ac86198bfca551aec6ce3a2bd07d4484393a4288d3af35 bloomfilter-ghc9.2.diff
178be26bc808f6a5c065957b04e3a32b02f0a6b5eb8c422c9d8960b6e9a1f90d689360c5ad491156783b25e80f4c2f9861e9ccff5091c302be713fa3063df670 fix-makefile.patch
"