[bff265c] | 1 | -include config.mak |
---|
[f06e3ac] | 2 | |
---|
[a73d6b2] | 3 | VERSION = 0.8.1 |
---|
[398eb78] | 4 | DATE := $(shell date +%Y-%m-%d) |
---|
[68c162b] | 5 | # latest stable |
---|
[a73d6b2] | 6 | BITLBEE_VERSION = 1.2.5 |
---|
[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 |
---|
[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 |
---|
[c1bf7c5] | 52 | cp $(AMPATH)/install-sh ./ |
---|
[bff265c] | 53 | autoconf |
---|
| 54 | |
---|
[f06e3ac] | 55 | clean: |
---|
[df1a59d4] | 56 | rm -f skype.$(SHARED_EXT) |
---|
[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 | |
---|
[05c1bed] | 68 | dist: |
---|
[68796a1] | 69 | git archive --format=tar --prefix=bitlbee-skype-$(VERSION)/ HEAD | tar xf - |
---|
[05c1bed] | 70 | mkdir -p bitlbee-skype-$(VERSION) |
---|
| 71 | git log --no-merges |git name-rev --tags --stdin > bitlbee-skype-$(VERSION)/Changelog |
---|
[afeb517] | 72 | make -C bitlbee-skype-$(VERSION) autogen |
---|
[1c3f19f] | 73 | tar czf bitlbee-skype-$(VERSION).tar.gz bitlbee-skype-$(VERSION) |
---|
[05c1bed] | 74 | rm -rf bitlbee-skype-$(VERSION) |
---|
| 75 | |
---|
| 76 | release: |
---|
| 77 | git tag $(VERSION) |
---|
| 78 | $(MAKE) dist |
---|
[3839517] | 79 | gpg --comment "See http://vmiklos.hu/gpg/ for info" \ |
---|
| 80 | -ba bitlbee-skype-$(VERSION).tar.gz |
---|
[05c1bed] | 81 | |
---|
[e23a46e] | 82 | doc: HEADER.html Changelog |
---|
[d1c9e35] | 83 | |
---|
[ff99090] | 84 | HEADER.html: README Makefile |
---|
[71dd27d] | 85 | asciidoc -a toc -a numbered -a sectids -o HEADER.html README |
---|
[3b495c0] | 86 | sed -i 's|@VERSION@|$(VERSION)|g' HEADER.html |
---|
[1f59f2f] | 87 | sed -i 's|@BITLBEE_VERSION@|$(BITLBEE_VERSION)|g' HEADER.html |
---|
[e23a46e] | 88 | |
---|
| 89 | Changelog: .git/refs/heads/master |
---|
[7e600c9] | 90 | git log --no-merges |git name-rev --tags --stdin >Changelog |
---|
[398eb78] | 91 | |
---|
| 92 | %.1: %.txt asciidoc.conf |
---|
| 93 | a2x --asciidoc-opts="-f asciidoc.conf" \ |
---|
| 94 | -a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $< |
---|