blob: 6e73f0576799cb5e3e21d3196576ba4d24b44b82 (
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
|
# $Id:$
.PHONY : all install clean uninstall encaps rename
.SUFFIXES :
.SUFFIXES : .ep .installed .packaged
BASEDIR = /usr/local
ENCAPDIR = ${BASEDIR}/encap
export ENCAPDIR
EPKG = ${BASEDIR}/bin/epkg
export EPKG
MKENCAP = ${BASEDIR}/bin/mkencap
export MKENCAP
GLIB = bcfg2-glib-2.8.6
GAMIN = bcfg2-gamin-0.1.7
.ep.installed : # Clean, compile and install an encap package
@printf "***** START .ep.installed for |$*| ***** \n"
( ${EPKG} -q -r ${ENCAPDIR}/$* || true )
( rm -rf ${ENCAPDIR}/$* || true )
( ${MKENCAP} -m /usr/local/bin/m4 -b -DUP $*.ep || true ) > $*.log 2>&1
( ${MKENCAP} -m /usr/local/bin/m4 -b -T $*.ep || true ) >> $*.log 2>&1
( ${MKENCAP} -m /usr/local/bin/m4 -b -CBI $*.ep ) >> $*.log 2>&1
${EPKG} -q -i ${ENCAPDIR}/$*
test -h ${BASEDIR}/var/encap/$*
touch $*.installed
@printf "***** STOP .ep.installed for |$*| ***** \n"
.installed.packaged : # Create .tar.gz encap packages for distribution
@printf "***** START .installed.packaged for |$*| ***** \n"
( rm ${ENCAPDIR}/$*-*.tar.gz || true )
( cd ${ENCAPDIR} && ${MKENCAP} -e $* || true )
cd ${ENCAPDIR} && ${MKENCAP} -c $*
mv ${ENCAPDIR}/$*-encap-*.tar.gz .
touch $*.packaged
@printf "***** STOP .installed.packaged for |$*| ***** \n"
all :
( $(MAKE) install > make.log 2>&1 && $(MAKE) encaps >> make.log 2>&1 ) &
install : ${EPKG} ${MKENCAP} ${GAMIN}.installed
encaps : ${EPKG} ${MKENCAP} ${GAMIN}.packaged
rename : encaps
test "$${OS}x" != "x"
for EARCHIVE in `ls *-encap-*.tar.gz`; do \
mv $${EARCHIVE} `printf $${EARCHIVE} | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' | sed s:\ :-:g | sed s:OSDIST:\$${OS}:g` ; \
done
clean :
( rm *.log || true )
( rm *.packaged || true )
( rm *.gz || true )
( rm *~ || true )
uninstall : clean
( rm *.installed || true )
( ${EPKG} -q -r ${ENCAPDIR}/bcfg2-glib* || true )
( rm -rf ${ENCAPDIR}/bcfg2-glib* || true )
( ${EPKG} -q -r ${ENCAPDIR}/bcfg2-gamin* || true )
( rm -rf ${ENCAPDIR}/bcfg2-gamin* || true )
${GAMIN}.installed : ${GLIB}.installed
${GAMIN}.packaged : ${GLIB}.packaged
|