Skip to content

Commit

Permalink
Add debian package creation to dist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Hujer committed Jan 25, 2015
1 parent 6c4f477 commit ffeeb5b
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ uninstall:

.PHONY: dist
## Creates the distribution archives.
dist: dist/makehelp.tar.gz dist/makehelp.tar.bz2 dist/makehelp.zip
dist: dist/makehelp.tar.gz dist/makehelp.tar.bz2 dist/makehelp.zip dist/makehelp.deb

dist/makehelp.tar.gz: dist/makehelp.tar
dist/makehelp.tar.bz2: dist/makehelp.tar
Expand All @@ -43,6 +43,25 @@ dist/makehelp.tar dist/makehelp.zip:

.PHONY: clean
clean:
$(RM) -r dist
$(RM) -r dist control data/ data.tar.gz control.tar.gz debian-binary

control:
echo "Package: makehelp\nVersion: 1.4.0\nSection: user/hidden\nPriority: optional\nArchitecture: all\nInstalled-Size: `du -cks bin/ include/ | tail -n 1 | cut -f 1`\nMaintainer: Christian Hujer <[email protected]>\nDescription: makehelp - Extract and print help information from Makefiles." >$@

control.tar.gz: control
tar czf $@ $^

data.tar.gz: data/
tar czf $@ --transform 's,^\./,/,' -C $< .

data/:
$(MAKE) PREFIX=data/usr/

debian-binary:
mkdir -p $(dir $@)
echo 2.0 >$@

dist/makehelp.deb: debian-binary control.tar.gz data.tar.gz
ar -Drc $@ $^

include include/makehelp/Help.mak

0 comments on commit ffeeb5b

Please sign in to comment.