summaryrefslogtreecommitdiffstats
path: root/build
blob: 7f7355d02cb2ea3b1d74b880a4c926c9a1c226cf (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
#!/usr/bin/make -f

configs = internal

nop:
	@:

build:
	set -e; \
	for c in $(configs); do \
		cp -Rp src/ "src-$${c}"; \
		oh-autobuild -s "src-$${c}" -- $$(cat "../config/$${c}"); \
	done
	touch $@

install: build
	mkdir -p flashrom-doc.data/usr/share/man/man8
	set -e; \
	for c in $(configs); do \
		oh-autoinstall -s "src-$${c}" -d "flashrom-$${c}.data" -- \
			PREFIX=/usr $$(cat "../config/$${c}"); \
		mv "flashrom-$${c}.data/usr/sbin/flashrom" \
			"flashrom-$${c}.data/usr/sbin/flashrom.$${c}"; \
		mv "flashrom-$${c}.data/usr/share/man/man8/flashrom.8" \
			flashrom-doc.data/usr/share/man/man8; \
		rmdir \
			"flashrom-$${c}.data/usr/share/man/man8" \
			"flashrom-$${c}.data/usr/share/man" \
			"flashrom-$${c}.data/usr/share"; \
		oh-fixperms -d "flashrom-$${c}.data"; \
		oh-strip -d "flashrom-$${c}.data"; \
	done
	oh-fixperms -d flashrom-doc.data
	oh-shlibdeps