summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c76c1add31a814683374219b0b53eabe5b6780ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Oskar Roesler <oskar@oskar-roesler.de>
# Maintainer: Mirko Scholz <mirko.scholz9@gmail.com>
# Contributor: fiffy326
pkgname=esp8266-rtos-sdk
pkgver=3.4
pkgrel=4
pkgdesc="ESP8266 RTOS SDK"
arch=('x86_64')
url="https://github.com/espressif/ESP8266_RTOS_SDK"
license=('Espressif MIT')
depends=(python python-click python-pyserial python-cryptography python-pyparsing python-future python-pyelftools ncurses)
optdepends=('xtensa-lx106-elf-gcc-bin: Toolchain for the ESP8266')
makedepends=(gcc gperf)
options=(!strip)
source=("https://github.com/espressif/ESP8266_RTOS_SDK/releases/download/v${pkgver}/ESP8266_RTOS_SDK-v${pkgver}.zip"
	"esp8266-rtos-sdk.sh"
	"esp8266-rtos-sdk-aur-ncurses-fix.patch")
sha256sums=('1e6c0da481f844de8eeb85dfb2db9d7c130cffc2047549eb34b3deaf9bd515c1'
            '8fd9449b64edd705c635e4a9f482c2a38b877a939ebadaba375f1a3ef06648f3'
            '4d1e014590f4aeae0ae10655f79bbb5b7a2ebd67bf8536418992099ffa90e3f4')

prepare() {
	cd ESP8266_RTOS_SDK
	patch --forward --strip=1 --input=../esp8266-rtos-sdk-aur-ncurses-fix.patch
}

build() {
	# enable 'make menuconfig'
	make -C ESP8266_RTOS_SDK/tools/kconfig
	strip -s ESP8266_RTOS_SDK/tools/kconfig/*conf-idf
	rm -rf ESP8266_RTOS_SDK/tools/kconfig/*.[od]
	rm -rf ESP8266_RTOS_SDK/tools/kconfig/lxdialog/*.[od]
	# tools/ldgen/test has lots of failures
	sed -i -e 's/pyparsing.*/pyparsing/' ESP8266_RTOS_SDK/requirements.txt
}

package() {
	install -d "$pkgdir"/opt/$pkgname
	cp -af ESP8266_RTOS_SDK/* "$pkgdir"/opt/$pkgname
	install -Dm755 "$srcdir"/esp8266-rtos-sdk.sh "$pkgdir"/etc/profile.d/esp8266-rtos-sdk.sh
}