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