Skip to content

Commit

Permalink
add init.d and friends to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
john30 committed Feb 5, 2022
1 parent 2a29a25 commit 9649fb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ EXTRA_DIST = LICENSE \
README.md \
VERSION

install-data-hook:
@if [ -f "/etc/debian_version" ]; then \
mkdir -p $(DESTDIR)/etc/default/ $(DESTDIR)/etc/init.d/ $(DESTDIR)/lib/systemd/system/; \
cp $(srcdir)/contrib/debian/default/ebusd $(DESTDIR)/etc/default/; \
cp $(srcdir)/contrib/debian/init.d/ebusd $(DESTDIR)/etc/init.d/; \
cp $(srcdir)/contrib/debian/systemd/ebusd.service $(DESTDIR)/lib/systemd/system/; \
fi

test:
$(MAKE) -C src/lib/ebus/test
if CONTRIB
Expand Down
7 changes: 1 addition & 6 deletions make_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,7 @@ echo "*************"
echo " pack"
echo "*************"
echo
mkdir -p $RELEASE/DEBIAN $RELEASE/etc/default $RELEASE/etc/logrotate.d || exit 1
mkdir -p $RELEASE/lib/systemd/system || exit 1
cp contrib/debian/systemd/ebusd.service $RELEASE/lib/systemd/system/ebusd.service || exit 1
mkdir -p $RELEASE/etc/init.d || exit 1
cp contrib/debian/init.d/ebusd $RELEASE/etc/init.d/ebusd || exit 1
cp contrib/debian/default/ebusd $RELEASE/etc/default/ebusd || exit 1
mkdir -p $RELEASE/DEBIAN $RELEASE/etc/logrotate.d || exit 1
if [ -n "$mqtt" ]; then
mkdir -p $RELEASE/etc/ebusd || exit 1
cp contrib/etc/ebusd/mqtt*.cfg $RELEASE/etc/ebusd/ || exit 1
Expand Down

0 comments on commit 9649fb0

Please sign in to comment.