There's nothing else to discuss here. Tarballs fundamentally don't support git submodules. If upstream had provided their own release tarballs, then those would contain the submodule files too... but they didn't, they only provide built packages for a couple distros plus the basic Github Releases source archives. Those source archives are, as you've noticed, incomplete.
]]># Maintainer: Federico Di Pierro <nierro92@gmail.com>
pkgname=libulfius
_gitname=ulfius
pkgver=2.3.6
pkgrel=3
pkgdesc="HTTP Framework for REST API in C, using JSON, with websockets and streaming data"
arch=(x86_64)
url="https://github.com/babelouest/${_gitname}"
license=(GPL)
depends=('libmicrohttpd' 'jansson' 'curl' 'gnutls' 'libgcrypt')
makedepends=(cmake)
source=("${_gitname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
"https://github.com/babelouest/orcania/archive/a5659295a99e3a91177b56df01e1547d54acea51.tar.gz"
"https://github.com/babelouest/yder/archive/7bb11f77ee9629ce9adae9e5cfbdcf2e01690fcb.tar.gz")
sha256sums=('dbf1c4f32768d41b6e45b844f32927b9ae8dbccfa2cc8c6607755a6ee105d9a6'
'1a59008c1de3045668d3cd5a57c4487b5c6edc6f68068678354131aff0614263'
'd780d4ca961eea6d00a085cc4b5940c02219a11cd00ff6677d8c3bfb3be14413')
prepare() {
cd "${srcdir}/${_gitname}-${pkgver}"
ln -s lib/orcania "${srcdir}"/orcania
ln -s lib/yder "${srcdir}"/yder
mkdir -p build
}
build() {
cd "${srcdir}/${_gitname}-${pkgver}"/build
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE="Release" \
../
make
}
package() {
cd "${srcdir}/${_gitname}-${pkgver}"/build
make DESTDIR="$pkgdir" install
}
]]>EDIT: your example will surely work though!
]]># Maintainer: Federico Di Pierro <nierro92@gmail.com>
pkgname=libulfius
_gitname=ulfius
pkgver=2.3.6
pkgrel=3
pkgdesc="HTTP Framework for REST API in C, using JSON, with websockets and streaming data"
arch=(x86_64)
url="https://github.com/babelouest/${_gitname}"
license=(GPL)
depends=('libmicrohttpd' 'jansson' 'curl' 'gnutls' 'libgcrypt')
makedepends=(git cmake)
source=("git+https://github.com/babelouest/${_gitname}.git#tag=v${pkgver}"
"git+https://github.com/babelouest/orcania.git"
"git+https://github.com/babelouest/yder.git")
sha256sums=('SKIP'
'SKIP'
'SKIP')
prepare() {
cd "${srcdir}/${_gitname}"
git submodule init
git config submodule.orcania.git.url $srcdir/orcania
git config submodule.yder.git.url $srcdir/yder
git submodule update
mkdir -p build
}
build() {
cd "${srcdir}/${_gitname}"/build
cmake \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE="Release" \
../
make
}
package() {
cd "${srcdir}/${_gitname}"/build
make DESTDIR="$pkgdir" install
}
So to be clear you know the current PKGBUILD is using a git repository not a tarball
Yes i know.
and you do not want to use a git repository
Right!
however upstream ships a tarball that without the submodules then fetch the sources for the submodules as tarballs as well.
The issue is that it seems the release tarball is not able to fetch the submodules; or i am still missing something else here...
EDIT: nevermind, i may have found a better solution:
pkgname=libulfius
_gitname=ulfius
pkgver=2.3.6
pkgrel=4
pkgdesc="HTTP Framework for REST API in C, using JSON, with websockets and streaming data"
arch=(x86_64)
url="https://github.com/babelouest/${_gitname}"
license=(GPL)
depends=('libmicrohttpd' 'jansson' 'curl' 'gnutls' 'libgcrypt')
makedepends=(git cmake)
source=("${_gitname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=("dbf1c4f32768d41b6e45b844f32927b9ae8dbccfa2cc8c6607755a6ee105d9a6")
prepare() {
cd "${srcdir}/${_gitname}-${pkgver}"
git init
git remote add origin https://github.com/babelouest/ulfius.git
git submodule update --init
mkdir -p build
}
This should work and fix the issue.
]]>If you want to use the tarball, then you have to manually download all archives and copy or symlink them in the right place during prepare.
That's a nice idea! I hoped there was some more support for git submodules in PKGBUILDs and/or something i was missing.
I'll report back as soon as i got time to fix the PKGBUILD.
Thank you!
https://github.com/babelouest/ulfius/archive/v2.3.6.tar.gz
https://github.com/babelouest/orcania/archive/a5659295a99e3a91177b56df01e1547d54acea51.tar.gz
https://github.com/babelouest/yder/archive/7bb11f77ee9629ce9adae9e5cfbdcf2e01690fcb.tar.gz
pacman -Qlp libulfius-2.3.6-3-x86_64.pkg.tar.xz
libulfius /usr/
libulfius /usr/include/
libulfius /usr/include/orcania.h
libulfius /usr/include/ulfius.h
libulfius /usr/include/yder.h
libulfius /usr/lib/
libulfius /usr/lib/liborcania.so
libulfius /usr/lib/liborcania.so.1.2
libulfius /usr/lib/liborcania.so.1.2.3
libulfius /usr/lib/libulfius.so
libulfius /usr/lib/libulfius.so.2.3
libulfius /usr/lib/libulfius.so.2.3.6
libulfius /usr/lib/libyder.so
libulfius /usr/lib/libyder.so.1.3
libulfius /usr/lib/libyder.so.1.3.3
...
I would recomend you follow VCS_package_guidelines#Git_Submodules but with your current PKGBUILD the submodules are built and packaged.
]]>fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
I then tried to fix the issue by downloading the full git repo, move to needed tag and initing the submodules (https://aur.archlinux.org/cgit/aur.git/ … =libulfius). Again, submodules are not built and consequently not installed.
What am I missing?
Thank you very much!
]]>