]> git.sur5r.net Git - i3/i3lock/commitdiff
Makefile: add 'dist' target
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 6 Nov 2011 14:20:40 +0000 (14:20 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 6 Nov 2011 14:20:40 +0000 (14:20 +0000)
Makefile

index d25dd635dde1ad2e0fa445b58aefc323f69a0c56..1d82af9441d5fdcdf9b07136e370a4616fa345a5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,3 +46,12 @@ install: all
 
 uninstall:
        rm -f $(DESTDIR)$(PREFIX)/bin/i3lock
+
+dist: clean
+       [ ! -d i3lock-${VERSION} ] || rm -rf i3lock-${VERSION}
+       [ ! -e i3lock-${VERSION}.tar.bz2 ] || rm i3lock-${VERSION}.tar.bz2
+       mkdir i3lock-${VERSION}
+       cp *.c *.h i3lock.1 i3lock.pam Makefile LICENSE README i3lock-${VERSION}
+       sed -e 's/^GIT_VERSION:=\(.*\)/GIT_VERSION:=$(shell /bin/echo '${GIT_VERSION}' | sed 's/\\/\\\\/g')/g;s/^VERSION:=\(.*\)/VERSION:=${VERSION}/g' Makefile > i3lock-${VERSION}/Makefile
+       tar cfj i3lock-${VERSION}.tar.bz2 i3lock-${VERSION}
+       rm -rf i3lock-${VERSION}