]> git.sur5r.net Git - i3/i3status/blobdiff - Makefile
debian: build separate packages for dzen2/wmii
[i3/i3status] / Makefile
index 00abff12158ea8b24ba9b51353e3dd2818c24b23..a184c76c64e689adaa4706457a32faea26ed3e02 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,16 @@ CFLAGS+=-std=gnu99
 CFLAGS+=-pedantic
 CFLAGS+=-DPREFIX=\"\"
 
+VERSION=$(shell git describe --tags --abbrev=0)
+
 ifeq ($(shell uname),Linux)
 CFLAGS+=-DLINUX
+CFLAGS+=-D_GNU_SOURCE
 endif
 
 # Define this if you want i3status to spit out dzen2-compatible output on stdout
-CFLAGS+=-DDZEN
+#CFLAGS+=-DDZEN
+CFLAGS+=$(EXTRA_CFLAGS)
 
 i3status: i3status.o i3status.h
 
@@ -21,14 +25,17 @@ distclean: clean
 
 install:
        install -m 755 -d $(DESTDIR)/usr/bin
-       install -m 755 -d $(DESTDIR)/etc/init.d
+       install -m 755 -d $(DESTDIR)/etc
        install -m 755 -d $(DESTDIR)/usr/share/man/man1
        install -m 755 i3status $(DESTDIR)/usr/bin/i3status
-       install -m 755 i3status.init $(DESTDIR)/etc/init.d/i3status
        install -m 644 i3status.conf $(DESTDIR)/etc/i3status.conf
        install -m 644 i3status.1 $(DESTDIR)/usr/share/man/man1
 
 release:
-       tar cjf i3status.tar.bz2 *.c *.h *.1 *.conf *.init Makefile
+       [ -f i3status-${VERSION} ] || rm -rf i3status-${VERSION}
+       mkdir i3status-${VERSION}
+       cp *.c *.h *.1 *.conf Makefile i3status-${VERSION}
+       tar cjf i3status-${VERSION}.tar.bz2 i3status-${VERSION}
+       rm -rf i3status-${VERSION}
 
 all: i3status