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 | |
---|
11 | ifeq ($(ASCIIDOC),yes) |
---|
12 | MANPAGES = skyped.1 |
---|
13 | else |
---|
14 | MANPAGES = |
---|
15 | endif |
---|
16 | |
---|
17 | ifeq ($(BITLBEE),yes) |
---|
18 | LIBS = skype.$(SHARED_EXT) |
---|
19 | else |
---|
20 | LIBS = |
---|
21 | endif |
---|
22 | |
---|
23 | all: $(LIBS) $(MANPAGES) |
---|
24 | |
---|
25 | skype.$(SHARED_EXT): $(SRCDIR)skype.c config.mak |
---|
26 | ifeq ($(BITLBEE),yes) |
---|
27 | $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(SRCDIR)skype.c $(LDFLAGS) |
---|
28 | endif |
---|
29 | |
---|
30 | install: all |
---|
31 | ifeq ($(ASCIIDOC),yes) |
---|
32 | $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
---|
33 | $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(mandir)/man1 |
---|
34 | endif |
---|
35 | ifeq ($(BITLBEE),yes) |
---|
36 | $(INSTALL) -d $(DESTDIR)$(plugindir) |
---|
37 | $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) |
---|
38 | endif |
---|
39 | ifeq ($(SKYPE4PY),yes) |
---|
40 | $(INSTALL) -d $(DESTDIR)$(bindir) |
---|
41 | $(INSTALL) -d $(DESTDIR)$(sysconfdir) |
---|
42 | $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped |
---|
43 | perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped |
---|
44 | $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
45 | perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
46 | $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir) |
---|
47 | endif |
---|
48 | |
---|
49 | client: $(SRCDIR)client.c |
---|
50 | |
---|
51 | autogen: configure.ac |
---|
52 | cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./ |
---|
53 | autoconf |
---|
54 | |
---|
55 | clean: |
---|
56 | rm -f $(LIBS) $(MANPAGES) |
---|
57 | |
---|
58 | distclean: clean |
---|
59 | rm -f config.log config.mak config.status skyped.1 |
---|
60 | |
---|
61 | autoclean: distclean |
---|
62 | rm -rf aclocal.m4 autom4te.cache configure install-sh |
---|
63 | |
---|
64 | # take this from the kernel |
---|
65 | check: |
---|
66 | perl checkpatch.pl --no-tree --file skype.c |
---|
67 | |
---|
68 | test: all |
---|
69 | $(MAKE) -C t/ all |
---|
70 | |
---|
71 | dist: |
---|
72 | git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf - |
---|
73 | mkdir -p bitlbee-skype-$(VERSION) |
---|
74 | git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog |
---|
75 | make -C bitlbee-skype-$(VERSION) autogen |
---|
76 | tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION) |
---|
77 | rm -rf bitlbee-skype-$(VERSION) |
---|
78 | |
---|
79 | release: |
---|
80 | git tag $(VERSION) |
---|
81 | $(MAKE) dist |
---|
82 | gpg --comment "See http://vmiklos.hu/gpg/ for info" \ |
---|
83 | -ba bitlbee-skype-$(VERSION).tar.gz |
---|
84 | |
---|
85 | doc: skyped.1 |
---|
86 | |
---|
87 | install-doc: |
---|
88 | mkdir -p $(DESTDIR)$(MANDIR)/man1/ |
---|
89 | install -m 0644 $(SRCDIR)skyped.1 $(DESTDIR)$(MANDIR)/man1/ |
---|
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 $< |
---|