Changeset 417002e


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

systemd stuff (bug #738)

Files:
2 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
  • configure

    rf68fd5f r417002e  
    1616plugindir='$prefix/lib/bitlbee/'
    1717includedir='$prefix/include/bitlbee/'
     18systemdsystemunitdir=''
    1819libevent='/usr/'
    1920pidfile='/var/run/bitlbee.pid'
     
    6263--datadir=...                                           $datadir
    6364--plugindir=...                                         $plugindir
     65--systemdsystemunitdir=...                              $systemdsystemunitdir
    6466--pidfile=...                                           $pidfile
    6567--config=...                                            $config
     
    487489fi
    488490
     491if [ -z "$systemdsystemunitdir" ]; then
     492        if $PKG_CONFIG --exists systemd; then
     493                systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
     494        fi
     495fi
     496if [ -n "$systemdsystemunitdir" ]; then
     497        if [ "$systemdsystemunitdir" != "no" ]; then
     498                echo "SYSTEMDSYSTEMUNITDIR=$systemdsystemunitdir" >> Makefile.settings
     499        fi
     500fi
     501
    489502if [ "$gcov" = "1" ]; then
    490503        echo "CFLAGS+=--coverage" >> Makefile.settings
     
    727740fi
    728741
     742if [ -n "$systemdsystemunitdir" ]; then
     743        echo '  systemd enabled.'
     744else
     745        echo '  systemd disabled.'
     746fi
     747
    729748echo '  Using event handler: '$events
    730749echo '  Using SSL library: '$ssl
Note: See TracChangeset for help on using the changeset viewer.