Skip to content

Instantly share code, notes, and snippets.

@uugr
Last active March 25, 2020 09:47
Show Gist options
  • Save uugr/1d56a0ca4b6c0bbd21e1872664fc2856 to your computer and use it in GitHub Desktop.
Save uugr/1d56a0ca4b6c0bbd21e1872664fc2856 to your computer and use it in GitHub Desktop.
Updated PKGBUILD file for esp-idf-git package
# Maintainer: Jose Riha <jose1711 gmail com>
pkgname=esp-idf-git
_pkgname=esp-idf
pkgver=r12430.6330b3345
pkgrel=1
pkgdesc="ESP specific API/libraries from Espressif"
arch=('i686' 'x86_64')
url="https://github.com/espressif/esp-idf"
license=('Apache')
makedepends=('git')
depends=('python' 'python-pyserial')
options=('!strip')
install='esp-idf-git.install'
# source=(esp-idf::git+https://github.com/espressif/esp-idf.git#commit=9a26296a)
source=(esp-idf::git+https://github.com/espressif/esp-idf.git)
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${_pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd $srcdir/${_pkgname}/
./tools/set-submodules-to-github.sh > /dev/null
}
build() {
cd $srcdir/${_pkgname}
git submodule update --init
}
package() {
mkdir -p ${pkgdir}/opt/esp-idf-sdk
cd "${srcdir}/${_pkgname}"
cp -R . ${pkgdir}/opt/esp-idf-sdk
}
@uugr
Copy link
Author

uugr commented Mar 25, 2020

I was getting error about submodules while building this package.
I have added a prepare() section to PKGBUILD file to execute a shell script, which is already included in tools directory for changing submodule relative paths to github urls.

prepare() {
cd $srcdir/${_pkgname}/
./tools/set-submodules-to-github.sh  > /dev/null
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment