[5155570] | 1 | -include ../../Makefile.settings |
---|
[7fa5c19] | 2 | ifdef _SRCDIR_ |
---|
| 3 | _SRCDIR_ := $(_SRCDIR_)protocols/skype/ |
---|
[5155570] | 4 | endif |
---|
[f06e3ac] | 5 | |
---|
[bb0775c] | 6 | VERSION = 0.9.0 |
---|
[398eb78] | 7 | DATE := $(shell date +%Y-%m-%d) |
---|
[68c162b] | 8 | # latest stable |
---|
[35249d6] | 9 | BITLBEE_VERSION = 3.0.1 |
---|
[e46db53] | 10 | INSTALL = install |
---|
| 11 | ASCIIDOC = yes |
---|
[05c1bed] | 12 | |
---|
[cc7a153] | 13 | ifeq ($(ASCIIDOC),yes) |
---|
| 14 | MANPAGES = skyped.1 |
---|
| 15 | else |
---|
| 16 | MANPAGES = |
---|
| 17 | endif |
---|
| 18 | |
---|
[93f4dac] | 19 | ifeq ($(BITLBEE),yes) |
---|
[cc7a153] | 20 | LIBS = skype.$(SHARED_EXT) |
---|
[93f4dac] | 21 | else |
---|
[cc7a153] | 22 | LIBS = |
---|
[93f4dac] | 23 | endif |
---|
| 24 | |
---|
[cc7a153] | 25 | all: $(LIBS) $(MANPAGES) |
---|
| 26 | |
---|
[7fa5c19] | 27 | skype.$(SHARED_EXT): $(_SRCDIR_)skype.c config.mak |
---|
[752a591] | 28 | ifeq ($(BITLBEE),yes) |
---|
[7fa5c19] | 29 | $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(_SRCDIR_)skype.c $(LDFLAGS) |
---|
[752a591] | 30 | endif |
---|
[f06e3ac] | 31 | |
---|
[e46db53] | 32 | install: all install-doc |
---|
[752a591] | 33 | ifeq ($(BITLBEE),yes) |
---|
[bbf1050] | 34 | $(INSTALL) -d $(DESTDIR)$(plugindir) |
---|
[69939608] | 35 | $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) |
---|
[752a591] | 36 | endif |
---|
[b414e30] | 37 | ifeq ($(SKYPE4PY),yes) |
---|
[f080961] | 38 | $(INSTALL) -d $(DESTDIR)$(bindir) |
---|
[a3262d1e] | 39 | $(INSTALL) -d $(DESTDIR)$(sysconfdir) |
---|
[f080961] | 40 | $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped |
---|
[12e1162] | 41 | perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped |
---|
[a3262d1e] | 42 | $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
[12e1162] | 43 | perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
[55664fc] | 44 | $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir) |
---|
[69939608] | 45 | endif |
---|
[bbf1050] | 46 | |
---|
[7fa5c19] | 47 | client: $(_SRCDIR_)client.c |
---|
[dfec37e] | 48 | |
---|
[afeb517] | 49 | autogen: configure.ac |
---|
[ceed953] | 50 | cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./ |
---|
[bff265c] | 51 | autoconf |
---|
| 52 | |
---|
[f06e3ac] | 53 | clean: |
---|
[ac423d0] | 54 | rm -f $(LIBS) $(MANPAGES) |
---|
[0c60f96] | 55 | |
---|
[bff265c] | 56 | distclean: clean |
---|
[e46db53] | 57 | rm -f config.log config.mak config.status $(MANPAGES) |
---|
[e06f408] | 58 | |
---|
| 59 | autoclean: distclean |
---|
| 60 | rm -rf aclocal.m4 autom4te.cache configure install-sh |
---|
[bff265c] | 61 | |
---|
[16304ab] | 62 | # take this from the kernel |
---|
| 63 | check: |
---|
| 64 | perl checkpatch.pl --no-tree --file skype.c |
---|
| 65 | |
---|
[7279554] | 66 | test: all |
---|
| 67 | $(MAKE) -C t/ all |
---|
| 68 | |
---|
[05c1bed] | 69 | dist: |
---|
[68796a1] | 70 | git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf - |
---|
[05c1bed] | 71 | mkdir -p bitlbee-skype-$(VERSION) |
---|
| 72 | git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog |
---|
[afeb517] | 73 | make -C bitlbee-skype-$(VERSION) autogen |
---|
[1c3f19f] | 74 | tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION) |
---|
[05c1bed] | 75 | rm -rf bitlbee-skype-$(VERSION) |
---|
| 76 | |
---|
| 77 | release: |
---|
| 78 | git tag $(VERSION) |
---|
| 79 | $(MAKE) dist |
---|
[3839517] | 80 | gpg --comment "See http://vmiklos.hu/gpg/ for info" \ |
---|
| 81 | -ba bitlbee-skype-$(VERSION).tar.gz |
---|
[05c1bed] | 82 | |
---|
[e46db53] | 83 | doc: $(MANPAGES) |
---|
[5155570] | 84 | |
---|
[e46db53] | 85 | install-doc: doc |
---|
| 86 | ifeq ($(ASCIIDOC),yes) |
---|
| 87 | $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1 |
---|
| 88 | $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(MANDIR)/man1 |
---|
| 89 | endif |
---|
[5155570] | 90 | |
---|
| 91 | uninstall-doc: |
---|
| 92 | rm -f $(DESTDIR)$(MANDIR)/man1/skyped.1* |
---|
[d1c9e35] | 93 | |
---|
[ff99090] | 94 | HEADER.html: README Makefile |
---|
[bb9a15f] | 95 | asciidoc -a toc -a numbered -a sectids -o HEADER.html -a icons -a data-uri --attribute iconsdir=./images/icons README |
---|
[3b495c0] | 96 | sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html |
---|
[1f59f2f] | 97 | sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html |
---|
[e23a46e] | 98 | |
---|
| 99 | Changelog: .git/refs/heads/master |
---|
[7e600c9] | 100 | git log --no-merges |git name-rev --tags --stdin >Changelog |
---|
[398eb78] | 101 | |
---|
[ab094d9] | 102 | AUTHORS: .git/refs/heads/master |
---|
| 103 | git shortlog -s -n |sed 's/.*\t//'> AUTHORS |
---|
| 104 | |
---|
[7fa5c19] | 105 | %.1: $(_SRCDIR_)%.txt $(_SRCDIR_)asciidoc.conf |
---|
| 106 | a2x --asciidoc-opts="-f $(_SRCDIR_)asciidoc.conf" \ |
---|
[e46db53] | 107 | -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage -D . $< |
---|