Skip to content

Commit

Permalink
Download assets as a tar archive instead of using git-lfs
Browse files Browse the repository at this point in the history
Upstream included git-lfs files in archives which makes this possible.
See makehumancommunity/makehuman-assets#3
  • Loading branch information
pekkarr committed Jul 9, 2022
1 parent 16ed237 commit 443cc22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
10 changes: 5 additions & 5 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
pkgbase = makehuman
pkgdesc = Parametrical modeling program for creating human bodies
pkgver = 1.2.0
pkgrel = 4
pkgrel = 5
url = http://www.makehumancommunity.org/
arch = any
license = AGPL3
license = custom:CC0
makedepends = git
makedepends = git-lfs
depends = python-numpy
depends = python-pyqt5
depends = python-opengl
depends = qt5-svg
depends = hicolor-icon-theme
optdepends = python-pygments: IPython Qt Console plugin
optdepends = python-distro: distro detection for debug output
source = makehuman-1.2.0.tar.gz::https://github.com/makehumancommunity/makehuman/archive/refs/tags/v1.2.0.tar.gz
source = git+https://github.com/makehumancommunity/makehuman-assets.git#commit=1f2f63338613bcbefa2c1edbc1da91128e9e0451
source = makehuman-assets-1f2f63338613bcbefa2c1edbc1da91128e9e0451.tar.gz::https://github.com/makehumancommunity/makehuman-assets/archive/1f2f63338613bcbefa2c1edbc1da91128e9e0451.tar.gz
source = makehuman-188.patch::https://github.com/makehumancommunity/makehuman/pull/188.patch
source = makehuman-197.patch::https://github.com/makehumancommunity/makehuman/pull/197.patch
source = makehuman-multisampling.patch::https://github.com/makehumancommunity/makehuman/commit/c47b884028a24eb190d097e7523a3059e439cb6f.patch
source = makehuman-fix_77-2.patch::https://github.com/makehumancommunity/makehuman/commit/02c4269a2d4c57f68159fe8f437a8b1978b99099.patch
sha512sums = e15acf536c99f2258abd317e3ff88e908d7447bea07be2c9b2319bd4b1847e76ad3035479e1d71ec5b086aa2442e7530436a6844a11e4c9bfd74abc26c3bd9f5
sha512sums = SKIP
sha512sums = 4f4548d51c7eef528e4e6c79568810a13ad24d89a4fee49e9340462e634ac9118e62e0ea89fe86efa81ca9508d37d20ce21f6b0a559dbc9137302d9c88a381a4
sha512sums = 989810a56138db858bedce341b099986a5fb5f64a7ce1d275d71c0409c8027d868c5b5a165ee119ead25bfdcf556492ca5856abe274d3428723b5312582b1f0c
sha512sums = c1be08b522c372c04836f37afd8e0245efada6dda3a20e8c2c5ebd75f196cc911270adb21dcf40b4eba754ba0c28045121eb7fe71fcf5cf0fdff4b72e3a8250d
sha512sums = 4b1c6c1e00cd95c38323699299b66829f9809bbf658359f08ec37f05dbf5da84d77502237665fad83dc2ad7fa73ec1ea20af1dedc99d155b8e40195192a1da0c
Expand Down
24 changes: 8 additions & 16 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
# Contributor: Lukas Jirkovsky <[email protected]>

_assets_commit='1f2f63338613bcbefa2c1edbc1da91128e9e0451'
_assets_repo='https://github.com/makehumancommunity/makehuman-assets.git'

pkgname=makehuman
pkgver=1.2.0
pkgrel=4
pkgrel=5
pkgdesc="Parametrical modeling program for creating human bodies"
arch=('any')
url="http://www.makehumancommunity.org/"
Expand All @@ -16,36 +15,31 @@ depends=('python-numpy'
'python-opengl'
'qt5-svg'
'hicolor-icon-theme')
makedepends=('git' 'git-lfs')
optdepends=('python-pygments: IPython Qt Console plugin'
'python-distro: distro detection for debug output')
source=("$pkgname-$pkgver.tar.gz::https://github.com/makehumancommunity/makehuman/archive/refs/tags/v$pkgver.tar.gz"
"git+${_assets_repo}#commit=$_assets_commit"
"$pkgname-assets-$_assets_commit.tar.gz::https://github.com/makehumancommunity/makehuman-assets/archive/$_assets_commit.tar.gz"
"$pkgname-188.patch::https://github.com/makehumancommunity/makehuman/pull/188.patch"
"$pkgname-197.patch::https://github.com/makehumancommunity/makehuman/pull/197.patch"
"$pkgname-multisampling.patch::https://github.com/makehumancommunity/makehuman/commit/c47b884028a24eb190d097e7523a3059e439cb6f.patch"
"$pkgname-fix_77-2.patch::https://github.com/makehumancommunity/makehuman/commit/02c4269a2d4c57f68159fe8f437a8b1978b99099.patch")
sha512sums=('e15acf536c99f2258abd317e3ff88e908d7447bea07be2c9b2319bd4b1847e76ad3035479e1d71ec5b086aa2442e7530436a6844a11e4c9bfd74abc26c3bd9f5'
'SKIP'
'4f4548d51c7eef528e4e6c79568810a13ad24d89a4fee49e9340462e634ac9118e62e0ea89fe86efa81ca9508d37d20ce21f6b0a559dbc9137302d9c88a381a4'
'989810a56138db858bedce341b099986a5fb5f64a7ce1d275d71c0409c8027d868c5b5a165ee119ead25bfdcf556492ca5856abe274d3428723b5312582b1f0c'
'c1be08b522c372c04836f37afd8e0245efada6dda3a20e8c2c5ebd75f196cc911270adb21dcf40b4eba754ba0c28045121eb7fe71fcf5cf0fdff4b72e3a8250d'
'4b1c6c1e00cd95c38323699299b66829f9809bbf658359f08ec37f05dbf5da84d77502237665fad83dc2ad7fa73ec1ea20af1dedc99d155b8e40195192a1da0c'
'5df80df28d734e4c81855112b42746dbc4586fa734c2a8432bfecb62864073b96baf6c588dbf65ada43990c47a135c6ae19a09dd909f233c8ea56f35a6c10091')

prepare() {
cd "$pkgname-assets"
# Download git-lfs files
git remote | grep -q github || git remote add github "$_assets_repo"
git lfs install --local
git lfs pull github

# copy files from assets repo to makehuman data directory
cp -r base/* "$srcdir/$pkgname-$pkgver/$pkgname/data/"
cp -r "$pkgname-assets-$_assets_commit"/base/* "$pkgname-$pkgver/$pkgname/data/"

# make build_prepare.py happy
cd "$srcdir/$pkgname-$pkgver"
mkdir -p .git

# fix crash during startup
patch -Np1 -i "$srcdir/$pkgname-188.patch"
patch -Np1 --no-backup-if-mismatch -i "$srcdir/$pkgname-188.patch"

# fix upstream issue #77
patch -Np1 -i "$srcdir/$pkgname-fix_77-2.patch"
Expand All @@ -54,7 +48,7 @@ prepare() {
patch -Np1 -i "$srcdir/$pkgname-197.patch"

# fix issue with multisampling
patch -Np1 -i "$srcdir/$pkgname-multisampling.patch"
patch -Np1 --no-backup-if-mismatch -i "$srcdir/$pkgname-multisampling.patch"

# enable release build and set version information
cd buildscripts
Expand All @@ -71,8 +65,6 @@ prepare() {

build() {
cd "$pkgname-$pkgver"
# if build directory exists, remove it first
[ -d "$srcdir/build" ] && rm -r "$srcdir/build"
python buildscripts/build_prepare.py --nodownload . "$srcdir/build"

# compile python bytecode
Expand Down

0 comments on commit 443cc22

Please sign in to comment.