source: protocols/skype/Makefile @ c945ee3

Last change on this file since c945ee3 was 5155570, checked in by unknown <vmiklos@…>, at 2011-07-03T14:15:13Z

Install skyped documentation if skype is enabled

  • Property mode set to 100644
File size: 2.7 KB
Line 
1-include ../../Makefile.settings
2ifdef SRCDIR
3SRCDIR := $(SRCDIR)protocls/skype/
4endif
5
6VERSION = 0.9.0
7DATE := $(shell date +%Y-%m-%d)
8# latest stable
9BITLBEE_VERSION = 3.0.1
10
11ifeq ($(ASCIIDOC),yes)
12MANPAGES = skyped.1
13else
14MANPAGES =
15endif
16
17ifeq ($(BITLBEE),yes)
18LIBS = skype.$(SHARED_EXT)
19else
20LIBS =
21endif
22
23all: $(LIBS) $(MANPAGES)
24
25skype.$(SHARED_EXT): skype.c config.mak
26ifeq ($(BITLBEE),yes)
27        $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS)
28endif
29
30install: all
31ifeq ($(ASCIIDOC),yes)
32        $(INSTALL) -d $(DESTDIR)$(mandir)/man1
33        $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(mandir)/man1
34endif
35ifeq ($(BITLBEE),yes)
36        $(INSTALL) -d $(DESTDIR)$(plugindir)
37        $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir)
38endif
39ifeq ($(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)
47endif
48
49client: client.c
50
51autogen: configure.ac
52        cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./
53        autoconf
54
55clean:
56        rm -f $(LIBS) $(MANPAGES)
57
58distclean: clean
59        rm -f config.log config.mak config.status
60
61autoclean: distclean
62        rm -rf aclocal.m4 autom4te.cache configure install-sh
63
64# take this from the kernel
65check:
66        perl checkpatch.pl --no-tree --file skype.c
67
68test: all
69        $(MAKE) -C t/ all
70
71dist:
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
79release:
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
85doc: skyped.1
86
87install-doc:
88        mkdir -p $(DESTDIR)$(MANDIR)/man1/
89        install -m 0644 $(SRCDIR)skyped.1 $(DESTDIR)$(MANDIR)/man1/
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: %.txt asciidoc.conf
106        a2x --asciidoc-opts="-f asciidoc.conf" \
107                -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $<
Note: See TracBrowser for help on using the repository browser.