summaryrefslogtreecommitdiffstats
path: root/build
blob: 4c1fa842b228cde7e13ef9d08264d91f8eac838c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/make -f

VER = 1.0
PKGS = opkhelper-$(VER) opkhelper-$(VER)-doc

$(PKGS): opkhelper.buildstamp

.SILENT: opkhelper.buildstamp
opkhelper.buildstamp:
	mkdir build && cd build && \
		../src/configure --prefix=/usr --libdir=/usr/share && \
		make && make DESTDIR=$$(pwd)/../dest install
	mv dest/usr/share/opkhelper dest/usr/share/opkhelper-$(VER)
	for file in dest/usr/bin/* dest/usr/share/man/man*/*; do \
		basename="$${file##*/}"; \
		mv "$${file}" "$${file%.*}-$(VER).$${basename##*.}"; \
		done
	oh-installfiles $(PKGS)
	oh-installdocs opkhelper-$(VER)
	oh-gencontrol $(PKGS)
	oh-buildopk $(PKGS)
	touch $@