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