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

include ../source.mk

nop:
	@:

build:
	oh-autoconfigure -- \
		--prefix=/ \
		--includedir=/usr/include \
		--datarootdir=/usr/share \
		--mandir=/usr/share/man \
		--enable-symlink-install \
		--enable-verbose-makecmds \
		--enable-elf-shlibs \
		--disable-e2initrd-helper \
		--disable-uuidd \
		--disable-fuse2fs \
		--disable-ubsan \
		--disable-addrsan \
		--disable-threadsan \
		ac_cv_path_mkdir=mkdir
	oh-autobuild
	touch $@

install: build
	oh-autoinstall
	rm dest/lib/$(OPK_HOST_ARCH)/*.a
	# Put pkgconfig under /usr where it belongs:
	mkdir -p dest/usr/lib/$(OPK_HOST_ARCH)/
	mv \
		    dest/lib/$(OPK_HOST_ARCH)/pkgconfig/ \
		dest/usr/lib/$(OPK_HOST_ARCH)/
	# Bash scripts and their configuration:
	rm dest/etc/e2scrub.conf
	rm dest/sbin/e2scrub
	rm dest/sbin/e2scrub_all
	oh-fixperms
	oh-strip
	oh-installfiles
	# update-alternatives all the executables:
	for d in badblocks.data e2fsprogs.data; do \
		mkdir -p "$${d}/usr/share/$${d%.data}/"; \
		exec 3>"$${d}/usr/share/$${d%.data}/alternatives"; \
		for f in $${d}/*bin/*; do \
			mv "$${f}" "$${f}.e2p"; \
			printf '%s\n' "$${f#*.data}" 1>&3; \
		done; \
		exec 3>&-; \
	done
	oh-shlibdeps