2009-03-13 13:32:32 +00:00
|
|
|
|
2011-07-29 11:45:58 +00:00
|
|
|
NAME=qasim
|
|
|
|
CONFDIR=$(DESTDIR)/etc/$(NAME)
|
2009-03-13 13:32:32 +00:00
|
|
|
BINDIR=$(DESTDIR)/usr/bin
|
|
|
|
MANDIR=$(DESTDIR)/usr/share/man
|
2011-07-29 11:45:58 +00:00
|
|
|
DOCDIR=$(DESTDIR)/usr/share/doc/$(NAME)
|
2009-04-03 16:27:49 +00:00
|
|
|
|
2011-03-10 16:56:03 +00:00
|
|
|
RUBYVERSION=1.8
|
|
|
|
RDOC=rdoc$(RUBYVERSION)
|
|
|
|
|
2009-03-13 13:32:32 +00:00
|
|
|
all:
|
2011-07-29 11:45:58 +00:00
|
|
|
$(MAKE) -C $(NAME)
|
2009-03-13 13:32:32 +00:00
|
|
|
|
|
|
|
clean:
|
2011-07-29 11:45:58 +00:00
|
|
|
$(MAKE) -C $(NAME) clean
|
2009-03-13 13:32:32 +00:00
|
|
|
|
2011-03-10 16:56:03 +00:00
|
|
|
doc: build-doc
|
|
|
|
|
|
|
|
.PHONY: build-doc
|
|
|
|
|
|
|
|
build-doc:
|
|
|
|
rm -fr doc
|
|
|
|
$(RDOC) \
|
|
|
|
--promiscuous \
|
|
|
|
--inline-source \
|
|
|
|
--line-numbers \
|
2011-07-29 11:45:58 +00:00
|
|
|
-o doc $(NAME)/ \
|
|
|
|
bin/
|
2011-03-10 16:56:03 +00:00
|
|
|
# --diagram
|
|
|
|
#
|
|
|
|
|
|
|
|
install-doc:
|
|
|
|
# # install documentation
|
|
|
|
rm -fr $(DOCDIR)
|
|
|
|
mkdir -p $(DOCDIR)
|
|
|
|
cp -a doc $(DOCDIR)
|
|
|
|
|
|
|
|
|
2009-03-13 13:32:32 +00:00
|
|
|
install:
|
|
|
|
mkdir -p $(BINDIR)
|
|
|
|
mkdir -p $(MANDIR)/man1
|
2011-07-29 11:45:58 +00:00
|
|
|
install -D -o root -g root -m 755 $(CURDIR)/bin/$(NAME)-gui.rb $(BINDIR)/$(NAME)-gui
|
|
|
|
cat $(NAME).1 | gzip > $(MANDIR)/man1/$(NAME).1.gz
|
|
|
|
## Install completion file
|
|
|
|
# install -D -o root -g root -m 644 $(CURDIR)/$(NAME).completion $(DESTDIR)/etc/bash_completion.d/$(NAME)
|
2009-08-15 17:13:52 +00:00
|
|
|
#
|
|
|
|
mkdir -p $(CONFDIR)
|
2009-03-13 13:32:32 +00:00
|
|
|
for f in `ls conf`; do \
|
2009-08-15 17:29:17 +00:00
|
|
|
cp conf/$$f $(CONFDIR)/$$f ; \
|
2009-08-15 17:13:52 +00:00
|
|
|
done
|
|
|
|
#
|
|
|
|
mkdir -p $(DOCDIR)/examples
|
|
|
|
for f in `ls examples`; do \
|
|
|
|
cat examples/$$f | gzip -f9 > $(DOCDIR)/examples/$$f.gz ; \
|
2009-03-13 13:32:32 +00:00
|
|
|
done
|
2011-07-29 11:45:58 +00:00
|
|
|
|
|
|
|
.PHONY: destdir
|
|
|
|
destdir:
|
|
|
|
rm -fr destdir
|
|
|
|
fakeroot $(MAKE) install DESTDIR=destdir
|
|
|
|
|