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