aboutsummaryrefslogtreecommitdiffstats
path: root/installer/Makefile-deb
blob: 060f432f18cbc57f0a304e38ada327b3fb67c5f7 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# makefile to create .deb packages
# using checkinstall
#
# this will also install the packages locally
#
# Dependencies are not handled

DO_INSTALL=yes

MUX_DIR=ODR-DabMux
MUX_VER=$(shell cd $(MUX_DIR) && git pull > /dev/null && git describe --long | cut -d "-" -f 1 | tail -c +2)
MUX_REV=$(shell cd $(MUX_DIR) && git pull > /dev/null && git describe --long | cut -d "-" -f 2)
DABMUX_DEB=odr-dabmux_$(MUX_VER)-$(MUX_REV)_amd64.deb

MOD_DIR=ODR-DabMod
MOD_VER=$(shell cd $(MOD_DIR) && git pull > /dev/null && git describe --long | cut -d "-" -f 1 | tail -c +2)
MOD_REV=$(shell cd $(MOD_DIR) && git pull > /dev/null && git describe --long | cut -d "-" -f 2)
DABMOD_DEB=odr-dabmod_$(MOD_VER)-$(MOD_REV)_amd64.deb

FDK_AAC_DABPLUS_DIR=fdk-aac-dabplus
FDK_AAC_DABPLUS_VER=$(shell cd $(FDK_AAC_DABPLUS_DIR) && git pull > /dev/null && git describe --long | cut -d "-" -f 1 | tail -c +2)
FDK_AAC_DABPLUS_REV=$(shell cd $(FDK_AAC_DABPLUS_DIR) && git pull > /dev/null && git describe --long | cut -d "-" -f 2)
FDK_AAC_DABPLUS_DEB=fdk-aac-dabplus_$(FDK_AAC_DABPLUS_VER)-$(FDK_AAC_DABPLUS_REV)_amd64.deb

KA9Q_FEC_DEB := ka9q-fec_3.0.1-1_amd64.deb
UHD_DEB := uhd_3.7.0-1_amd64.deb
ZEROMQ_DEB := zeromq_4.0.4-1_amd64.deb

all: $(DABMUX_DEB) $(FDK_AAC_DABPLUS_DEB)

$(KA9Q_FEC_DEB):
	cd ka9q-fec && \
	./bootstrap && \
	./configure && \
	make && \
	sudo checkinstall --fstrans --pkgname="ka9q-fec" --pkgversion=3.0.1 --pkgrelease=1 --maintainer="matthias@mpb.li" --deldoc -y --install=$(DO_INSTALL) && \
	mv $(KA9Q_FEC_DEB) ..

$(UHD_DEB):
	cd uhd && \
	git checkout release_003_007_000 && \
	if [ -d build ] ; \
	then cd build ; \
	else mkdir build && cd build && cmake ../host ; \
	fi ; \
	make -j2 && \
	sudo checkinstall --fstrans --pkgname="uhd" --pkgversion=3.7.0 --pkgrelease=1 --maintainer="matthias@mpb.li" --deldoc -y --install=$(DO_INSTALL) && \
	mv $(UHD_DEB) ../..

$(ZEROMQ_DEB):
	cd zeromq-4.0.4 && \
	./configure && \
	make clean && \
	make -j2 && \
	sudo checkinstall --fstrans --pkgname="zeromq" --pkgversion=4.0.4 --pkgrelease=1 --maintainer="matthias@mpb.li" --deldoc -y --install=$(DO_INSTALL) && \
	mv $(ZEROMQ_DEB) ..

$(DABMUX_DEB): $(KA9Q_FEC_DEB) $(ZEROMQ_DEB)
	cd $(MUX_DIR) && \
	git pull && \
	./bootstrap.sh && \
	./configure --enable-input-zeromq --enable-output-zeromq && \
	make clean && \
	make -j2 && \
	checkinstall --fstrans --pkgname="odr-dabmux" --pkgversion=$(MUX_VER) --pkgrelease=$(MUX_REV) --maintainer="matthias@mpb.li" --deldoc -y --install=$(DO_INSTALL) && \
	mv $(DABMUX_DEB) ..

$(DABMOD_DEB): $(UHD_DEB) $(ZEROMQ_DEB) $(KA9Q_FEC_DEB)
	cd ODR-DabMod && \
	git pull && \
	./bootstrap.sh && \
	./configure --enable-input-zeromq --enable-fft-simd --disable-debug --with-debug-malloc=no && \
	make clean && \
	make -j2 && \
	sudo checkinstall --fstrans --pkgname="odr-dabmod" --pkgversion=$(MOD_VER) --pkgrelease=$(MOD_REV) --maintainer="matthias@mpb.li" --deldoc -y --install=$(DO_INSTALL) && \
	mv $(DABMOD_DEB) ..

$(FDK_AAC_DABPLUS_DEB): $(ZEROMQ_DEB)
	cd fdk-aac-dabplus && \
	git pull && \
	autoreconf -i && \
	./configure --enable-example --enable-zmq && \
	make clean && \
	make -j2 && \
	sudo checkinstall --fstrans --pkgname="fdk-aac-dabplus" --pkgversion=$(FDK_AAC_DABPLUS_VER) --pkgrelease=$(FDK_AAC_DABPLUS_REV) --maintainer="matthias@mpb.li" --deldoc -y --install=$(DO_INSTALL) && \
	mv $(FDK_AAC_DABPLUS_DEB) ..