Changeset 417002e for Makefile


Ignore:
Timestamp:
2011-03-18T00:57:14Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c14959d
Parents:
f68fd5f
Message:

systemd stuff (bug #738)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rf68fd5f r417002e  
    2727subdirobjs = $(foreach dir,$(subdirs),$(dir)/$(dir).o)
    2828
    29 all: $(OUTFILE) $(OTR_PI)
     29all: $(OUTFILE) $(OTR_PI) systemd
    3030        $(MAKE) -C doc
    3131
     
    3333        @echo -e '\nmake uninstall does not remove files in '$(DESTDIR)$(ETCDIR)', you can use make uninstall-etc to do that.\n'
    3434
    35 install: install-bin install-doc install-plugins
     35install: install-bin install-doc install-plugins install-systemd
    3636        @if ! [ -d $(DESTDIR)$(CONFIG) ]; then echo -e '\nThe configuration directory $(DESTDIR)$(CONFIG) does not exist yet, don'\''t forget to create it!'; fi
    3737        @if ! [ -e $(DESTDIR)$(ETCDIR)/bitlbee.conf ]; then echo -e '\nNo files are installed in '$(DESTDIR)$(ETCDIR)' by make install. Run make install-etc to do that.'; fi
    3838        @echo
    3939
    40 .PHONY:   install   install-bin   install-etc   install-doc install-plugins \
     40.PHONY:   install   install-bin   install-etc   install-doc install-plugins install-systemd \
    4141        uninstall uninstall-bin uninstall-etc uninstall-doc \
    4242        all clean distclean tar $(subdirs)
     
    110110endif
    111111
     112systemd:
     113ifdef SYSTEMDSYSTEMUNITDIR
     114        sed 's|@sbindir@|$(BINDIR)|' init/bitlbee.service.in > init/bitlbee.service
     115        sed 's|@sbindir@|$(BINDIR)|' init/bitlbee@.service.in > init/bitlbee@.service
     116endif
     117
     118install-systemd:
     119ifdef SYSTEMDSYSTEMUNITDIR
     120ifeq ($(USER),root)
     121        mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
     122        install -m 0644 init/bitlbee.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
     123        install -m 0644 init/bitlbee@.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
     124        install -m 0644 init/bitlbee.socket $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)
     125else
     126        @echo Not root, so not installing systemd files.
     127endif
     128endif
     129
    112130tar:
    113131        fakeroot debian/rules clean || make distclean
Note: See TracChangeset for help on using the changeset viewer.