n2n/packages/debian/Makefile.in
Hamish Coleman c3c72e2656
test on all available runner environments and add autogenerated crossbuilt dpkg packages (#852)
* Make test workflow smoke test use the same internal name as descriptive name

* Refactor workflow to be test_os then build for that OS

* Run tests on all available github runner environments

* Ensure that dpkg builds will fail if the compile fails

* Allow explicitly overriding the debian package architecture

* Pass the detected architecture into the dpkg build process

* Use the possibly overridden MACHINE variable to calculate the short machine name

* Remove unused variable

* Remove unused AC_SUBST

* Allow EXTN to be overridden instead of MACHINE

* Add crossbuilding for dpkg builds

* Ubnuts dont got no crossbuild for mips

* Use the correct value for EXTN
2021-10-14 15:54:19 +05:45

42 lines
1.3 KiB
Makefile

#
# Change it according to your setup
#
N2N_HOME=$(PWD)/../..
N2N_BUILD=${N2N_HOME}/packages/debian/n2n
all: clean pkg
pkg:
make -C ../../
if test -e "${N2N_BUILD}"; then /bin/rm -fr ${N2N_BUILD}; fi
mkdir -p ${N2N_BUILD}/usr/sbin ${N2N_BUILD}/usr/share/man/man1 ${N2N_BUILD}/usr/share/man/man7 ${N2N_BUILD}/usr/share/man/man8
mkdir -p ${N2N_BUILD}/usr/share/doc/n2n/examples
install -m755 ../../supernode ${N2N_BUILD}/usr/sbin/
install -m755 ../../edge ${N2N_BUILD}/usr/sbin/
install -m644 ../../edge.8.gz ${N2N_BUILD}/usr/share/man/man8/
install -m644 ../../supernode.1.gz ${N2N_BUILD}/usr/share/man/man1/
install -m644 ../../n2n.7.gz ${N2N_BUILD}/usr/share/man/man7/
install -m644 ../../community.list ${N2N_BUILD}/usr/share/doc/n2n/examples/
install -m644 ../../doc/*.md ${N2N_BUILD}/usr/share/doc/n2n/
@/bin/rm -f ../n2n*.deb
dpkg-buildpackage -rfakeroot -d -us -uc -a@EXTN@
-dpkg-sig --sign builder -k D1EB60BE ../n2n_*deb
@\rm -f ../n2n_*dsc ../n2n_*.gz ../n2n_*changes
@/bin/mv ../n2n_*deb .
@echo
@echo "Package built."
@/bin/ls n2n_*deb
@echo "-------------------------------"
-dpkg -I n2n_*deb
-dpkg --contents n2n_*deb
@echo "-------------------------------"
distclean:
echo "dummy distclean"
install:
echo "dummy install"
clean:
rm -rf *~ *deb