source: skype/Makefile @ 304aa33

Last change on this file since 304aa33 was ac423d0, checked in by Miklos Vajna <vmiklos@…>, at 2010-04-07T10:53:24Z

clean: remove the manpage as well

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