[5155570] | 1 | -include ../../Makefile.settings |
---|
| 2 | ifdef SRCDIR |
---|
| 3 | SRCDIR := $(SRCDIR)protocls/skype/ |
---|
| 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 |
---|
[05c1bed] | 10 | |
---|
[cc7a153] | 11 | ifeq ($(ASCIIDOC),yes) |
---|
| 12 | MANPAGES = skyped.1 |
---|
| 13 | else |
---|
| 14 | MANPAGES = |
---|
| 15 | endif |
---|
| 16 | |
---|
[93f4dac] | 17 | ifeq ($(BITLBEE),yes) |
---|
[cc7a153] | 18 | LIBS = skype.$(SHARED_EXT) |
---|
[93f4dac] | 19 | else |
---|
[cc7a153] | 20 | LIBS = |
---|
[93f4dac] | 21 | endif |
---|
| 22 | |
---|
[cc7a153] | 23 | all: $(LIBS) $(MANPAGES) |
---|
| 24 | |
---|
[df1a59d4] | 25 | skype.$(SHARED_EXT): skype.c config.mak |
---|
[752a591] | 26 | ifeq ($(BITLBEE),yes) |
---|
[df1a59d4] | 27 | $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS) |
---|
[752a591] | 28 | endif |
---|
[f06e3ac] | 29 | |
---|
[93f4dac] | 30 | install: all |
---|
[65acff8] | 31 | ifeq ($(ASCIIDOC),yes) |
---|
| 32 | $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
---|
| 33 | $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(mandir)/man1 |
---|
| 34 | endif |
---|
[752a591] | 35 | ifeq ($(BITLBEE),yes) |
---|
[bbf1050] | 36 | $(INSTALL) -d $(DESTDIR)$(plugindir) |
---|
[69939608] | 37 | $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) |
---|
[752a591] | 38 | endif |
---|
[b414e30] | 39 | ifeq ($(SKYPE4PY),yes) |
---|
[f080961] | 40 | $(INSTALL) -d $(DESTDIR)$(bindir) |
---|
[a3262d1e] | 41 | $(INSTALL) -d $(DESTDIR)$(sysconfdir) |
---|
[f080961] | 42 | $(INSTALL) skyped.py $(DESTDIR)$(bindir)/skyped |
---|
[12e1162] | 43 | perl -p -i -e 's|/usr/local/etc/skyped|$(sysconfdir)|' $(DESTDIR)$(bindir)/skyped |
---|
[a3262d1e] | 44 | $(INSTALL) -m644 skyped.conf.dist $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
[12e1162] | 45 | perl -p -i -e 's|\$${prefix}|$(prefix)|' $(DESTDIR)$(sysconfdir)/skyped.conf |
---|
[55664fc] | 46 | $(INSTALL) -m644 skyped.cnf $(DESTDIR)$(sysconfdir) |
---|
[69939608] | 47 | endif |
---|
[bbf1050] | 48 | |
---|
[dfec37e] | 49 | client: client.c |
---|
| 50 | |
---|
[afeb517] | 51 | autogen: configure.ac |
---|
[ceed953] | 52 | cp $(shell ls /usr/share/automake-*/install-sh | tail -n1) ./ |
---|
[bff265c] | 53 | autoconf |
---|
| 54 | |
---|
[f06e3ac] | 55 | clean: |
---|
[ac423d0] | 56 | rm -f $(LIBS) $(MANPAGES) |
---|
[0c60f96] | 57 | |
---|
[bff265c] | 58 | distclean: clean |
---|
[e06f408] | 59 | rm -f config.log config.mak config.status |
---|
| 60 | |
---|
| 61 | autoclean: distclean |
---|
| 62 | rm -rf aclocal.m4 autom4te.cache configure install-sh |
---|
[bff265c] | 63 | |
---|
[16304ab] | 64 | # take this from the kernel |
---|
| 65 | check: |
---|
| 66 | perl checkpatch.pl --no-tree --file skype.c |
---|
| 67 | |
---|
[7279554] | 68 | test: all |
---|
| 69 | $(MAKE) -C t/ all |
---|
| 70 | |
---|
[05c1bed] | 71 | dist: |
---|
[68796a1] | 72 | git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf - |
---|
[05c1bed] | 73 | mkdir -p bitlbee-skype-$(VERSION) |
---|
| 74 | git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog |
---|
[afeb517] | 75 | make -C bitlbee-skype-$(VERSION) autogen |
---|
[1c3f19f] | 76 | tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION) |
---|
[05c1bed] | 77 | rm -rf bitlbee-skype-$(VERSION) |
---|
| 78 | |
---|
| 79 | release: |
---|
| 80 | git tag $(VERSION) |
---|
| 81 | $(MAKE) dist |
---|
[3839517] | 82 | gpg --comment "See http://vmiklos.hu/gpg/ for info" \ |
---|
| 83 | -ba bitlbee-skype-$(VERSION).tar.gz |
---|
[05c1bed] | 84 | |
---|
[5155570] | 85 | doc: skyped.1 |
---|
| 86 | |
---|
| 87 | install-doc: |
---|
| 88 | mkdir -p $(DESTDIR)$(MANDIR)/man1/ |
---|
| 89 | install -m 0644 $(SRCDIR)skyped.1 $(DESTDIR)$(MANDIR)/man1/ |
---|
| 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 | |
---|
[398eb78] | 105 | %.1: %.txt asciidoc.conf |
---|
| 106 | a2x --asciidoc-opts="-f asciidoc.conf" \ |
---|
| 107 | -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< |
---|