Skip to content

Commit 81c3ec6

Browse files
committed
makefile: fix deb target
1 parent 666fb7b commit 81c3ec6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ NDS_OBJS=src/auth.o src/client_list.o src/commandline.o src/conf.o \
1212
src/debug.o src/firewall.o src/fw_iptables.o src/gateway.o src/http_microhttpd.o src/http_microhttpd_utils.o \
1313
src/ndsctl_thread.o src/safe.o src/tc.o src/util.o src/template.o
1414

15-
.PHONY: all clean install checkastyle fixstyle
15+
.PHONY: all clean install checkastyle fixstyle deb
1616

1717
all: nodogsplash ndsctl
1818

@@ -70,10 +70,10 @@ fixstyle: checkastyle
7070
echo "\033[1;33mPrevious files have been corrected\033[00m" ; else \
7171
echo "\033[0;32mAll files are ok\033[00m" ; fi
7272

73-
DEBVERSION=$(shell dpkg-parsechangelog | grep ^Version |cut -f2 -d\ | sed -e 's/-[0-9]*$$//' )
73+
DEBVERSION=$(shell dpkg-parsechangelog | awk -F'[ -]' '/^Version/{print($$2); exit;}' )
7474
deb: clean
7575
mkdir -p dist/nodogsplash-$(DEBVERSION)
7676
tar --exclude dist --exclude ".git*" -cf - . | (cd dist/nodogsplash-$(DEBVERSION) && tar xf -)
77-
cd dist && tar cjf nodogsplash_$(DEBVERSION).orig.tar.bz2 nodogsplash-$(DEBVERSION)
78-
cd dist/nodogsplash-$(DEBVERSION) && dpkg-buildpackage -us -uc
77+
cd dist && tar cjf nodogsplash_$(DEBVERSION).orig.tar.bz2 nodogsplash-$(DEBVERSION) && cd -
78+
cd dist/nodogsplash-$(DEBVERSION) && dpkg-buildpackage -us -uc && cd -
7979
rm -rf dist/nodogsplash-$(DEBVERSION)

0 commit comments

Comments
 (0)