-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (33 loc) · 1.21 KB
/
Makefile
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
info:
@echo "make clean - remove all automatically created files"
@echo "make update - update the FreeRADIUS module from github"
@echo "make builddeb - build .deb file locally"
SRCDIRS=debian conffiles
SRCFILES=Makefile
BUILDDIR_RADIUS=DEBUILD/privacyidea-ucs-radius.orig
# UCS 4.4
BUILDER_IP=10.0.2.59
clean:
rm -fr DEBUILD
rm -f meta/*~
rm -fr deploy
builddeb:
make clean
mkdir -p DEBUILD
(cd DEBUILD; git clone https://github.com/privacyidea/FreeRADIUS.git privacyidea-ucs-radius.orig)
(cd ${BUILDDIR_RADIUS}; git checkout v${VERSION})
cp -r ${SRCDIRS} ${BUILDDIR_RADIUS}
cp LICENSE ${BUILDDIR_RADIUS}/debian/copyright
(cd DEBUILD; tar -zcf privacyidea-ucs-radius_${VERSION}.orig.tar.gz --exclude=debian/* privacyidea-ucs-radius.orig)
################# Build
#(cd ${BUILD}; debuild --no-lintian -uc -us)
(cd ${BUILDDIR_RADIUS}; dpkg-buildpackage -us -uc)
sync-up:
rsync -r ../privacyidea-ucs-radius root@${BUILDER_IP}:
remote-build:
ssh root@${BUILDER_IP} "cd privacyidea-ucs-radius; VERSION=${VERSION} make builddeb"
sync-down:
rsync -r root@${BUILDER_IP}:privacyidea-ucs-radius/* .
ifndef VERSION
$(error VERSION not set. Set VERSION - a git tag - to build like VERSION=3.1)
endif