38 lines
864 B
Makefile
38 lines
864 B
Makefile
#!/bin/bash
|
|
|
|
# file: Makefile
|
|
|
|
# By neox
|
|
|
|
# License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
|
|
|
|
default: debian/tyto.deb
|
|
|
|
VERSION=$(shell git describe --tags | cut -c 2-)
|
|
|
|
### MAKE DEB
|
|
|
|
.INTERMEDIATE: debian/control debian/debian-binary debian/control.tar.gz debian/data.tar.gz
|
|
|
|
.PHONY: clean
|
|
|
|
debian/tyto.deb: debian/debian-binary debian/control.tar.gz debian/data.tar.gz
|
|
cd debian && ar -r tyto.deb debian-binary control.tar.gz data.tar.gz
|
|
|
|
debian/data.tar.gz:
|
|
cd src && tar czvf ../debian/data.tar.gz usr var
|
|
|
|
debian/control: debian/control_template
|
|
cat $< | sed "s/VERSION/$(VERSION)/g" > $@
|
|
|
|
debian/control.tar.gz: debian/control
|
|
cd debian && tar czvf control.tar.gz control #preinst postinst prerm postrm
|
|
|
|
debian/debian-binary:
|
|
echo 2.0 > debian/debian-binary
|
|
|
|
clean:
|
|
-rm debian/*.tar.gz
|
|
-rm debian/debian-binary
|
|
-rm debian/*.deb
|