]> Pileus Git - lackey/commitdiff
Add dist stuff
authorAndy Spencer <andy753421@gmail.com>
Mon, 22 Oct 2012 04:13:42 +0000 (04:13 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 22 Oct 2012 04:13:42 +0000 (04:13 +0000)
.gitignore
README [new file with mode: 0644]
config.mk.example
doc/lackey.1 [new file with mode: 0644]
makefile

index c06ce8faee2a669036143c6c4ba2854ec8b200bd..d9bf870b9079049050a6f070d317778594706261 100644 (file)
@@ -2,9 +2,10 @@
 *.log
 *.o
 *.swp
 *.log
 *.o
 *.swp
+*.tar.gz
 *~
 .vimrc
 config.mk
 lackey
 *~
 .vimrc
 config.mk
 lackey
-test
 tags
 tags
+test
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..eb3206d
--- /dev/null
+++ b/README
@@ -0,0 +1,28 @@
+lackey - curses calendar program
+================================
+lackey is a lightweight terminal based calendar program
+
+
+Installation
+------------
+Create and edit config.mk as desired (see config.mk.example)
+
+Build and install lackey:
+
+    make
+    make install
+
+
+Running lackey
+--------------
+Start lackey from from a termainl:
+
+    lackey
+
+
+Hacking
+-------
+Common source files are in the src directory. Each Curses screen has it's own
+source file in the view directory and each calendar backend has a source file
+in the cal directory. The views and calendar backends are access though the
+view.c and cal.c files, respectively.
index d3ce06a01499b24fa76b6f4557863bd2795353e0..afdb097465b2dcf2a38a50e55a1b876ee8b6c050 100644 (file)
@@ -1,2 +1,11 @@
-CFLAGS = -g -Wall -Werror --std=c99
+PREFIX  ?= /usr
+CFLAGS  ?= -g -Wall -Werror --std=c99
+
 default: all run-lackey
 default: all run-lackey
+
+run-lackey: lackey
+       @urxvt -e ./$<
+       @cat /tmp/lackey.log
+
+run-test: test
+       ./$<
diff --git a/doc/lackey.1 b/doc/lackey.1
new file mode 100644 (file)
index 0000000..49f98ba
--- /dev/null
@@ -0,0 +1,25 @@
+.TH LACKY 1 "October 2012" lackey
+.SH NAME
+lackey \- curses calendar program
+.SH SYNOPSIS
+.B lackey\fR [\fIOPTION\fR..]
+.SH DESCRIPTION
+lackey is a curses calendar program.
+.SH OPTIONS
+.TP
+todo
+.SH CONFIGURATION
+.TP
+todo
+.SH FILES
+.TP
+todo
+.SH SEE ALSO
+.BR date (1),
+.BR cal (1),
+.BR cron (1),
+.BR at (1),
+.BR remind (1),
+.BR calcurse (1)
+.SH BUGS
+Many
index be2232c267e1397295971a5556cbbcd129b3b85a..1306505b43cff45698ee673f689dc820dd872154 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,32 +1,45 @@
+# lackey - curses calendar program
+# See COPYING file for copyright and license details.
+
 -include config.mk
 
 # Settings
 -include config.mk
 
 # Settings
-CC       ?= gcc
-CFLAGS   ?= -Wall --std=c99
-CPPFLAGS ?= -Isrc
-LDFLAGS  ?= -lncursesw -lical
+VERSION   ?= 0.1-rc1
+PREFIX    ?= /usr/local
+MANPREFIX ?= $(PREFIX)/share/man
+
+# Compiler
+CC        ?= gcc
+CFLAGS    ?= -Wall --std=c99
+CPPFLAGS  ?= -Isrc
+LDFLAGS   ?= -lncursesw -lical
 
 # Sources
 
 # Sources
-PROG      = lackey
-PROG_SRC  = main view date cal util 
-TEST      = test
-TEST_SRC  = test date util
-VIEWS     = day week month year events todo settings help
-CALS      = dummy ical
+PROG      ?= lackey
+PROG_SRC  ?= main view date cal util 
+TEST      ?= test
+TEST_SRC  ?= test date util
+VIEWS     ?= day week month year events todo settings help
+CALS      ?= dummy ical
 
 # Targets
 
 # Targets
-all: $(PROG) $(TEST)
-
-run-$(PROG): $(PROG)
-       @urxvt -e ./$<
-       @cat /tmp/lackey.log
-
-run-$(TEST): $(TEST)
-       ./$<
+all: $(PROG)
 
 clean:
        rm -f src/*.o views/*.o cals/*.o $(PROG) $(TEST) 
 
 
 clean:
        rm -f src/*.o views/*.o cals/*.o $(PROG) $(TEST) 
 
+dist:
+       tar -czf $(PROG)-$(VERSION).tar.gz --transform s::$(PROG)-$(VERSION)/: \
+               README COPYING config.mk.example makefile */*.txt */*.1 */*.c */*.h
+
+install: all
+       install -m 755 -D $(PROG) $(DESTDIR)$(PREFIX)/bin/$(PROG)
+       install -m 644 -D doc/$(PROG).1 $(DESTDIR)$(MANPREFIX)/man1/$(PROG).1
+
+uninstall:
+       rm -f $(DESTDIR)$(PREFIX)/bin/$(PROG)
+       rm -f $(DESTDIR)$(MANPREFIX)/man1/$(PROG).1
+
 # Rules
 $(PROG): $(PROG_SRC:%=src/%.o) $(VIEWS:%=views/%.o) $(CALS:%=cals/%.o)
        $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
 # Rules
 $(PROG): $(PROG_SRC:%=src/%.o) $(VIEWS:%=views/%.o) $(CALS:%=cals/%.o)
        $(CC) $(CFLAGS) -o $@ $+ $(LDFLAGS)
@@ -36,3 +49,5 @@ $(TEST): $(TEST_SRC:%=src/%.o) $(CALS:%=cals/%.o)
 
 %.o: %.c $(wildcard src/*.h) makefile
        $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 %.o: %.c $(wildcard src/*.h) makefile
        $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+.PHONY: all clean dist install uninstall