Skip to content

Commit 0dc7e49

Browse files
author
Anand
committed
Target to make debian packages
1 parent 5b648e4 commit 0dc7e49

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ install:
1515
echo "...done"; \
1616
fi
1717

18+
debian: program # Run as $ make debian VERSION=0.x.y
19+
@echo "Building debian package for version=${VERSION}"
20+
@mkdir -p debian/varuh-${VERSION}_amd64/usr/bin/
21+
@mkdir -p debian/varuh-${VERSION}_amd64/DEBIAN/
22+
@cp varuh debian/varuh-${VERSION}_amd64/usr/bin/
23+
@sed 's/VERSION/${VERSION}/g' META > debian/varuh-${VERSION}_amd64/DEBIAN/control
24+
@cd debian/ && dpkg-deb --build --root-owner-group varuh-${VERSION}_amd64/ && cd -
25+
@if [ -f debian/varuh-${VERSION}_amd64.deb ]; then \
26+
echo "Build successful."; \
27+
else \
28+
echo "Build failed."; \
29+
fi \
30+
1831
clean:
1932
@echo "Removing ${PROGRAM}"
2033
@rm -f ${PROGRAM}

0 commit comments

Comments
 (0)