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

include ../source.mk

common_opts = \
	--disable-shared \
	--disable-curl --disable-ssl-curl \
	--enable-sha256 \
	--with-opkglibdir=/var/lib

nop:
	@:

build-opkg:
	oh-autoconfigure -B obj-opkg -- \
		$(common_opts) \
		--disable-gpg
	oh-autobuild -B obj-opkg
	touch $@

build-opkg-gpg:
	oh-autoconfigure -B obj-opkg-gpg -- \
		$(common_opts) \
		--enable-gpg
	oh-autobuild -B obj-opkg-gpg
	touch $@

build: build-opkg build-opkg-gpg

install: build
	oh-autoinstall -B obj-opkg-gpg
	mv dest/usr/bin/opkg-cl dest/usr/bin/opkg-gpg
	oh-autoinstall -B obj-opkg
	mv dest/usr/bin/opkg-key dest/usr/bin/opkg-key-orig
	mv dest/usr/bin/update-alternatives \
		dest/usr/bin/update-alternatives-orig
	rm -Rf dest/usr/include/ \
		dest/usr/lib/$(OPK_HOST_ARCH)/pkgconfig/ \
		dest/usr/lib/$(OPK_HOST_ARCH)/libopkg.a \
		dest/usr/lib/$(OPK_HOST_ARCH)/libopkg.la
	mv dest/usr/share/man/man1/opkg-cl.1 dest/usr/share/man/man1/opkg.1
	oh-fixperms
	oh-strip -k
	oh-installfiles
	oh-shlibdeps