1 | -include config.mak |
---|
2 | |
---|
3 | VERSION = 0.8.0 |
---|
4 | DATE := $(shell date +%Y-%m-%d) |
---|
5 | # latest stable |
---|
6 | BITLBEE_VERSION = 1.2.4 |
---|
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 ($(BITLBEE),yes) |
---|
16 | all: skype.$(SHARED_EXT) skyped.1 |
---|
17 | else |
---|
18 | all: skyped.1 |
---|
19 | endif |
---|
20 | |
---|
21 | skype.$(SHARED_EXT): skype.c config.mak |
---|
22 | ifeq ($(BITLBEE),yes) |
---|
23 | $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS) |
---|
24 | endif |
---|
25 | |
---|
26 | install: all |
---|
27 | ifeq ($(BITLBEE),yes) |
---|
28 | $(INSTALL) -d $(DESTDIR)$(plugindir) |
---|
29 | $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) |
---|
30 | endif |
---|
31 | ifeq ($(SKYPE4PY),yes) |
---|
32 | $(INSTALL) -d $(DESTDIR)$(bindir) |
---|
33 | $(INSTALL) -d $(DESTDIR)$(sysconfdir) |
---|
34 | $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped |
---|
35 | perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped |
---|
36 | $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
37 | perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
38 | $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir) |
---|
39 | endif |
---|
40 | |
---|
41 | client: client.c |
---|
42 | |
---|
43 | autogen: configure.ac |
---|
44 | cp $(AMPATH)/install-sh ./ |
---|
45 | autoconf |
---|
46 | |
---|
47 | clean: |
---|
48 | rm -f skype.$(SHARED_EXT) |
---|
49 | |
---|
50 | distclean: clean |
---|
51 | rm -f config.log config.mak config.status |
---|
52 | |
---|
53 | autoclean: distclean |
---|
54 | rm -rf aclocal.m4 autom4te.cache configure install-sh |
---|
55 | |
---|
56 | # take this from the kernel |
---|
57 | check: |
---|
58 | perl checkpatch.pl --no-tree --file skype.c |
---|
59 | |
---|
60 | dist: |
---|
61 | git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf - |
---|
62 | mkdir -p bitlbee-skype-$(VERSION) |
---|
63 | git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog |
---|
64 | make -C bitlbee-skype-$(VERSION) autogen |
---|
65 | tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION) |
---|
66 | rm -rf bitlbee-skype-$(VERSION) |
---|
67 | |
---|
68 | release: |
---|
69 | git tag $(VERSION) |
---|
70 | $(MAKE) dist |
---|
71 | gpg --comment "See http://vmiklos.hu/gpg/ for info" \ |
---|
72 | -ba bitlbee-skype-$(VERSION).tar.gz |
---|
73 | |
---|
74 | doc: HEADER.html Changelog |
---|
75 | |
---|
76 | HEADER.html: README Makefile |
---|
77 | asciidoc -a toc -a numbered -a sectids -o HEADER.html README |
---|
78 | sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html |
---|
79 | sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html |
---|
80 | |
---|
81 | Changelog: .git/refs/heads/master |
---|
82 | git log --no-merges |git name-rev --tags --stdin >Changelog |
---|
83 | |
---|
84 | %.1: %.txt asciidoc.conf |
---|
85 | a2x --asciidoc-opts="-f asciidoc.conf" \ |
---|
86 | -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< |
---|