summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8179976679a51179455dca5c944430bbafa38143 (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
42
43
44
45
46
47
48
49
50
# mkspiffs - Tool to build and unpack SPIFFS images
# Maintainer: Martin Thierer <thierer@web.de>
# Contributor: Christian Hammacher <bmasterc@gmail.com>

pkgname=mkspiffs-git
pkgver=0.2.3.r6.983970e
pkgrel=2
pkgdesc="Tool to build and unpack SPIFFS images"
arch=('x86' 'x86_64')
url="https://github.com/igrr/mkspiffs"
license=('MIT')
depends=('gcc-libs')
makedepends=('git' 'gcc')
provides=("mkspiffs")
conflicts=("mkspiffs")
source=(
	'git://github.com/igrr/mkspiffs.git'
	'git://github.com/pellepl/spiffs.git')
md5sums=('SKIP'
         'SKIP')

# Handle submodule as of
# https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git_Submodules
prepare() {
	cd $srcdir/mkspiffs
	git submodule init
	git config submodule.spiffs.url $srcdir/spiffs
	git submodule update
}

pkgver() {
	cd "$srcdir/mkspiffs"
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
	cd "$srcdir/mkspiffs"
	make
}

check() {
	cd "$srcdir/mkspiffs"
	make test
}

package() {
	# This package provides only a single executable
	install -D -m755 $srcdir/mkspiffs/mkspiffs $pkgdir/usr/bin/mkspiffs
	install -D -m644 $srcdir/mkspiffs/LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
}