1 | -include config.mak |
---|
2 | |
---|
3 | VERSION = 0.8.1 |
---|
4 | DATE := $(shell date +%Y-%m-%d) |
---|
5 | # latest stable |
---|
6 | BITLBEE_VERSION = 1.2.5 |
---|
7 | |
---|
8 | AMPATH = $(shell grep automake- $(shell which automake)|sed "s|.*'\(.*\)';|\1|") |
---|
9 | |
---|
10 | ifeq ($(AMPATH),) |
---|
11 | # Gentoo, it has some crappy wrapper |
---|
12 | AMPATH = $(shell find /usr/share/ -maxdepth 1 -name 'automake-*'|tail -n 1) |
---|
13 | endif |
---|
14 | |
---|
15 | ifeq ($(ASCIIDOC),yes) |
---|
16 | MANPAGES = skyped.1 |
---|
17 | else |
---|
18 | MANPAGES = |
---|
19 | endif |
---|
20 | |
---|
21 | ifeq ($(BITLBEE),yes) |
---|
22 | LIBS = skype.$(SHARED_EXT) |
---|
23 | else |
---|
24 | LIBS = |
---|
25 | endif |
---|
26 | |
---|
27 | all: $(LIBS) $(MANPAGES) |
---|
28 | |
---|
29 | skype.$(SHARED_EXT): skype.c config.mak |
---|
30 | ifeq ($(BITLBEE),yes) |
---|
31 | $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS) |
---|
32 | endif |
---|
33 | |
---|
34 | install: all |
---|
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: client.c |
---|
50 | |
---|
51 | autogen: configure.ac |
---|
52 | cp $(AMPATH)/install-sh ./ |
---|
53 | autoconf |
---|
54 | |
---|
55 | clean: |
---|
56 | rm -f skype.$(SHARED_EXT) |
---|
57 | |
---|
58 | distclean: clean |
---|
59 | rm -f config.log config.mak config.status |
---|
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 | dist: |
---|
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 | |
---|
76 | release: |
---|
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 | |
---|
82 | doc: HEADER.html Changelog |
---|
83 | |
---|
84 | HEADER.html: README Makefile |
---|
85 | asciidoc -a toc -a numbered -a sectids -o HEADER.html README |
---|
86 | sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html |
---|
87 | sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html |
---|
88 | |
---|
89 | Changelog: .git/refs/heads/master |
---|
90 | git log --no-merges |git name-rev --tags --stdin >Changelog |
---|
91 | |
---|
92 | %.1: %.txt asciidoc.conf |
---|
93 | a2x --asciidoc-opts="-f asciidoc.conf" \ |
---|
94 | -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< |
---|