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

nop:
	@:

build:
	oh-autobuild
	if [ 'x$(OPK_BUILD_ARCH)' = 'x$(OPK_HOST_ARCH)' ]; then \
		oh-autotest; \
	fi
	touch $@

install: build
	oh-autoinstall -- PREFIX="$${PWD}/dest"
	install -d dest/usr/bin/ dest/usr/lib/ dest/usr/share/
	# /usr/bin/bzip2 and links (bunzip2 and bzcat):
	mv dest/bin/bzip2 dest/usr/bin/bzip2.bzip2
	rm dest/bin/bunzip2 dest/bin/bzcat
	ln -sf bzip2.bzip2 dest/usr/bin/bunzip2.bzip2
	ln -sf bzip2.bzip2 dest/usr/bin/bzcat.bzip2
	# /usr/bin/bzip2recover:
	mv dest/bin/bzip2recover dest/usr/bin/
	# /usr/bin/bzgrep and links (bzegrep and bzfgrep):
	mv dest/bin/bzgrep dest/usr/bin/
	rm dest/bin/bzegrep dest/bin/bzfgrep
	ln -sf bzgrep dest/usr/bin/bzegrep
	ln -sf bzgrep dest/usr/bin/bzfgrep
	# /usr/bin/bzmore and links (bzless):
	mv dest/bin/bzmore dest/usr/bin/
	rm dest/bin/bzless
	ln -sf bzmore dest/usr/bin/bzless
	# /usr/bin/bzdiff and links (bzcmp):
	mv dest/bin/bzdiff dest/usr/bin/
	rm dest/bin/bzcmp
	ln -sf bzdiff dest/usr/bin/bzcmp
	# Library, development, and documentation files:
	mv dest/lib/     dest/usr/lib/$(OPK_HOST_ARCH)/
	mv dest/include/ dest/usr/include/
	mv dest/man/     dest/usr/share/
	# Library links:
	ln -sf libbz2.so.$(OPK_SOURCE_VERSION_UPSTREAM) \
		dest/usr/lib/$(OPK_HOST_ARCH)/libbz2.so.1.0
	ln -sf libbz2.so.1.0 dest/usr/lib/$(OPK_HOST_ARCH)/libbz2.so
	oh-fixperms
	oh-strip
	oh-installfiles