# Maintainer: Antoine Martin (ayakael) # Contributor: Antoine Martin (ayakael) pkgname=git-annex pkgver=10.20230321 _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-annex git-lfs" 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 # git-annex is not compatible with unix-compat-0.7 sed -i 's|unix-compat.*|unix-compat ==0.6,|' git-annex.config 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=" b7bcb67643cdd3cca272c017cfb5388a0eb0922311a2129317212f74bf851075ce74209e5caeaabc43ce6a55d65ce534715fc8387e59c2a8dea40688ebb26e85 git-annex-10.20230321.tar.gz 1031cc28c5e5c1b7687355b709d436ebab1956ffd7591a010fa3852a1bc7412925a365f99937feeacf4b1a5d3c7b34bc0370707ad6e4533280dcac4ea3fa7c21 bloomfilter-2.0.1.0.tar.gz 13d8c3c7c9844e935af278b4b6dc477b4ef069a3b61a5fea5bf28aadbd3ca4b475aa23701fe7be8a9468af78771d1fabda3e74c5d4b9a3fbb77ee8b803198f65 git-lfs-1.2.0.tar.gz e293bb41162adcbefeb9bd81af5fadad29c4f3d1e902dbd87147a20fd3e4cd0a05c7bc44077cfdbe6cda4e44bf1802ad8051738cbfbfdac82700ed7ce1601e92 git-annex.config c6885dd97f4559262da15220ea9c9ca27f4dbc6255a603d820e752726f8dede13af08f807c754e7ccb9400d070cbd5d5a336d24bb532944c7ad5231ced79ba33 git-lfs.config 500ebfd84e5771ed62ad2491b3f484d9a049091cd9bced072f34e64d81fd4db8aff2cfd9a0b2278335ac86198bfca551aec6ce3a2bd07d4484393a4288d3af35 bloomfilter-ghc9.2.diff 923d9e93380238115841f2dfbe61d34bf4bf8b3806f898d259125f31f5e4c6147840b1da737385aaa96a425d0dd4bacb2ab846ec3ea608ec6de243484fdded2e git-lfs-depend-update.diff 178be26bc808f6a5c065957b04e3a32b02f0a6b5eb8c422c9d8960b6e9a1f90d689360c5ad491156783b25e80f4c2f9861e9ccff5091c302be713fa3063df670 fix-makefile.patch "