source: protocols/skype/Makefile @ 66911fc

Last change on this file since 66911fc was 43b1cd7, checked in by Miklos Vajna <vmiklos@…>, at 2011-04-12T00:10:57Z

Merge bitlbee-skype into bitlbee

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