Skip to content

Commit

Permalink
Fix installation paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Jul 14, 2017
1 parent c50801e commit b88c271
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog for squash_dir

*squash_dir-13.13
Martin Väth <martin at mvath.de>:
- Fix installation paths (use systemd unitdir and remove split /usr)

*squash_dir-13.12
Martin Väth <martin at mvath.de>:
- Update docs to use /etc/portage/make.conf instead of /etc/make.conf
Expand Down
5 changes: 3 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ Call as root (after creating the corresponding directories if necessary):
cp -p init.d/squash_dir /etc/init.d
cp -p conf.d/squash_dir /etc/conf.d
cp -p sbin/* /usr/sbin
cp -p systemd/* /usr/lib/systemd/system
cp -p systemd/* \
"`pkg-config --variable=systemdsystemunitdir systemd`"
cp -p zsh/_squash_dir /usr/share/zsh/site-functions
If you want to install the openrc-wrapper from here (instead of using the
recommend way to install it from the openrc-wrapper project), use also
cp -p bin/* /usr/bin
cp -p bin/* /bin
cp -p zsh/_openrc-wrapper /usr/share/zsh/site-functions

Here you can find the patches which redirect the progress bar of
Expand Down
12 changes: 6 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ install-data-local:
then $(INSTALL_DATA) -D "$(srcdir)/zsh/_squash_dir" "$(DESTDIR)$(ZSH_COMPLETION)/_squash_dir" && \
$(INSTALL_WRAPPER) -D "$(srcdir)/zsh/_openrc-wrapper" "$(DESTDIR)$(ZSH_COMPLETION)/_openrc-wrapper" ; \
fi
$(AM_V_at)if test x"$(SYSTEMSYSTEMUNITDIR)" != x"" ; \
then $(INSTALL_DATA) -D "$(srcdir)/systemd/squash_dir.service" "$(DESTDIR)$(SYSTEMSYSTEMUNITDIR)/squash_dir.service" && \
$(INSTALL_DATA) -D "$(srcdir)/systemd/squash_dir@.service" "$(DESTDIR)$(SYSTEMSYSTEMUNITDIR)/squash_dir@.service" ; \
$(AM_V_at)if test x"$(SYSTEMDSYSTEMUNITDIR)" != x"" ; \
then $(INSTALL_DATA) -D "$(srcdir)/systemd/squash_dir.service" "$(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)/squash_dir.service" && \
$(INSTALL_DATA) -D "$(srcdir)/systemd/squash_dir@.service" "$(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)/squash_dir@.service" ; \
fi

uninstall-local:
$(AM_V_at)if test x"$(ZSH_COMPLETION)" != x"" ; \
then $(RM) "$(DESTDIR)$(ZSH_COMPLETION)/_squash_dir" && \
$(RM_WRAPPER) "$(DESTDIR)$(ZSH_COMPLETION)/_openrc-wrapper" ; \
fi
$(AM_V_at)if test x"$(SYSTEMSYSTEMUNITDIR)" != x"" ; \
then $(RM) "$(DESTDIR)$(SYSTEMSYSTEMUNITDIR)/squash_dir.service" && \
$(RM) "$(DESTDIR)$(SYSTEMSYSTEMUNITDIR)/squash_dir@.service" ; \
$(AM_V_at)if test x"$(SYSTEMDSYSTEMUNITDIR)" != x"" ; \
then $(RM) "$(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)/squash_dir.service" && \
$(RM) "$(DESTDIR)$(SYSTEMDSYSTEMUNITDIR)/squash_dir@.service" ; \
fi
13 changes: 7 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ AS_VAR_IF([ZSH_COMPLETION], [],
AC_SUBST([ZSH_COMPLETION])

AC_MSG_CHECKING([systemd system units])
AS_VAR_SET([SYSTEMSYSTEMUNITDIR], ["$libdir/systemd/system"])
AS_VAR_SET([SYSTEMDSYSTEMUNITDIR],
["`pkg-config --variable=systemdsystemunitdir system 2>/dev/null || echo /lib/systemd/system`"])
AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=STR],
[install systemd unit files in directory STR])],
[AS_CASE([$withval],
[/*], [AS_VAR_COPY([SYSTEMSYSTEMUNITDIR], [withval])],
[no], [AS_VAR_SET([SYSTEMSYSTEMUNITDIR], [])])])
AS_VAR_IF([SYSTEMSYSTEMUNITDIR], [],
[/*], [AS_VAR_COPY([SYSTEMDSYSTEMUNITDIR], [withval])],
[no], [AS_VAR_SET([SYSTEMDSYSTEMUNITDIR], [])])])
AS_VAR_IF([SYSTEMDSYSTEMUNITDIR], [],
[AC_MSG_RESULT([no])],
[AC_MSG_RESULT([yes, into $SYSTEMSYSTEMUNITDIR])])
AC_SUBST([SYSTEMSYSTEMUNITDIR])
[AC_MSG_RESULT([yes, into $SYSTEMDSYSTEMUNITDIR])])
AC_SUBST([SYSTEMDSYSTEMUNITDIR])

AC_MSG_CHECKING([openrc wrapper])
AS_VAR_SET([wrapper], [:])
Expand Down
4 changes: 2 additions & 2 deletions systemd/squash_dir@.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ConditionPathIsSymbolicLink=/etc/init.d/squash_%i
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/bin/openrc-wrapper squash_%i start
ExecStop=/usr/bin/openrc-wrapper squash_%i stop
ExecStart=/bin/openrc-wrapper squash_%i start
ExecStop=/bin/openrc-wrapper squash_%i stop

[Install]
WantedBy=multi-user.target

0 comments on commit b88c271

Please sign in to comment.