source: protocols/skype/Makefile @ 14d0b02

Last change on this file since 14d0b02 was 7fa5c19, checked in by Wilmer van der Gaast <wilmer@…>, at 2012-02-11T12:55:45Z

Rename SRCDIR directory to _SRCDIR_. I guess #907 was caused by SRCDIR
unexpectedly being set to something already.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1-include ../../Makefile.settings
2ifdef _SRCDIR_
3_SRCDIR_ := $(_SRCDIR_)protocols/skype/
4endif
5
6VERSION = 0.9.0
7DATE := $(shell date +%Y-%m-%d)
8# latest stable
9BITLBEE_VERSION = 3.0.1
10INSTALL = install
11ASCIIDOC = yes
12
13ifeq ($(ASCIIDOC),yes)
14MANPAGES = skyped.1
15else
16MANPAGES =
17endif
18
19ifeq ($(BITLBEE),yes)
20LIBS = skype.$(SHARED_EXT)
21else
22LIBS =
23endif
24
25all: $(LIBS) $(MANPAGES)
26
27skype.$(SHARED_EXT): $(_SRCDIR_)skype.c config.mak
28ifeq ($(BITLBEE),yes)
29        $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(_SRCDIR_)skype.c $(LDFLAGS)
30endif
31
32install: all install-doc
33ifeq ($(BITLBEE),yes)
34        $(INSTALL) -d $(DESTDIR)$(plugindir)
35        $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir)
36endif
37ifeq ($(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)
45endif
46
47client: $(_SRCDIR_)client.c
48
49autogen: configure.ac
50        cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./
51        autoconf
52
53clean:
54        rm -f $(LIBS) $(MANPAGES)
55
56distclean: clean
57        rm -f config.log config.mak config.status $(MANPAGES)
58
59autoclean: distclean
60        rm -rf aclocal.m4 autom4te.cache configure install-sh
61
62# take this from the kernel
63check:
64        perl checkpatch.pl --no-tree --file skype.c
65
66test: all
67        $(MAKE) -C t/ all
68
69dist:
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
77release:
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
83doc: $(MANPAGES)
84
85install-doc: doc
86ifeq ($(ASCIIDOC),yes)
87        $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1
88        $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(MANDIR)/man1
89endif
90
91uninstall-doc:
92        rm -f $(DESTDIR)$(MANDIR)/man1/skyped.1*
93
94HEADER.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
99Changelog: .git/refs/heads/master
100        git log --no-merges |git name-rev --tags --stdin >Changelog
101
102AUTHORS: .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 . $<
Note: See TracBrowser for help on using the repository browser.