1 | -include config.mak |
---|
2 | |
---|
3 | VERSION = 0.9.0 |
---|
4 | DATE := $(shell date +%Y-%m-%d) |
---|
5 | # latest stable |
---|
6 | BITLBEE_VERSION = 3.0.1 |
---|
7 | |
---|
8 | ifeq ($(ASCIIDOC),yes) |
---|
9 | MANPAGES = skyped.1 |
---|
10 | else |
---|
11 | MANPAGES = |
---|
12 | endif |
---|
13 | |
---|
14 | ifeq ($(BITLBEE),yes) |
---|
15 | LIBS = skype.$(SHARED_EXT) |
---|
16 | else |
---|
17 | LIBS = |
---|
18 | endif |
---|
19 | |
---|
20 | all: $(LIBS) $(MANPAGES) |
---|
21 | |
---|
22 | skype.$(SHARED_EXT): skype.c config.mak |
---|
23 | ifeq ($(BITLBEE),yes) |
---|
24 | $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS) |
---|
25 | endif |
---|
26 | |
---|
27 | install: all |
---|
28 | ifeq ($(ASCIIDOC),yes) |
---|
29 | $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
---|
30 | $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(mandir)/man1 |
---|
31 | endif |
---|
32 | ifeq ($(BITLBEE),yes) |
---|
33 | $(INSTALL) -d $(DESTDIR)$(plugindir) |
---|
34 | $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) |
---|
35 | endif |
---|
36 | ifeq ($(SKYPE4PY),yes) |
---|
37 | $(INSTALL) -d $(DESTDIR)$(bindir) |
---|
38 | $(INSTALL) -d $(DESTDIR)$(sysconfdir) |
---|
39 | $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped |
---|
40 | perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped |
---|
41 | $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
42 | perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
43 | $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir) |
---|
44 | endif |
---|
45 | |
---|
46 | client: client.c |
---|
47 | |
---|
48 | autogen: configure.ac |
---|
49 | cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./ |
---|
50 | autoconf |
---|
51 | |
---|
52 | clean: |
---|
53 | rm -f $(LIBS) $(MANPAGES) |
---|
54 | |
---|
55 | distclean: clean |
---|
56 | rm -f config.log config.mak config.status |
---|
57 | |
---|
58 | autoclean: distclean |
---|
59 | rm -rf aclocal.m4 autom4te.cache configure install-sh |
---|
60 | |
---|
61 | # take this from the kernel |
---|
62 | check: |
---|
63 | perl checkpatch.pl --no-tree --file skype.c |
---|
64 | |
---|
65 | dist: |
---|
66 | git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf - |
---|
67 | mkdir -p bitlbee-skype-$(VERSION) |
---|
68 | git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog |
---|
69 | make -C bitlbee-skype-$(VERSION) autogen |
---|
70 | tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION) |
---|
71 | rm -rf bitlbee-skype-$(VERSION) |
---|
72 | |
---|
73 | release: |
---|
74 | git tag $(VERSION) |
---|
75 | $(MAKE) dist |
---|
76 | gpg --comment "See http://vmiklos.hu/gpg/ for info" \ |
---|
77 | -ba bitlbee-skype-$(VERSION).tar.gz |
---|
78 | |
---|
79 | doc: HEADER.html Changelog |
---|
80 | |
---|
81 | HEADER.html: README Makefile |
---|
82 | asciidoc -a toc -a numbered -a sectids -o HEADER.html -a icons -a data-uri --attribute iconsdir=./images/icons README |
---|
83 | sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html |
---|
84 | sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html |
---|
85 | |
---|
86 | Changelog: .git/refs/heads/master |
---|
87 | git log --no-merges |git name-rev --tags --stdin >Changelog |
---|
88 | |
---|
89 | %.1: %.txt asciidoc.conf |
---|
90 | a2x --asciidoc-opts="-f asciidoc.conf" \ |
---|
91 | -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< |
---|