rebuild systemd to use timers.target and BINDIR templates
This commit is contained in:
parent
0c4aed99a2
commit
1e4bd9a0ce
7 changed files with 33 additions and 82 deletions
47
Makefile
47
Makefile
|
|
@ -14,7 +14,7 @@ DESTDIR ?=
|
|||
MANPAGES = \
|
||||
petrified.1
|
||||
|
||||
all: doc
|
||||
all: doc build-systemd
|
||||
|
||||
doc: $(MANPAGES)
|
||||
petrified.1: README.pod
|
||||
|
|
@ -36,26 +36,37 @@ install-doc:
|
|||
install -Dm0644 extra/petrified.crontab extra/petrified.dispatch \
|
||||
extra/petrified.logrotate "$(DESTDIR)$(DOCPREFIX)/petrified/extra"
|
||||
|
||||
install-systemd:
|
||||
build-systemd:
|
||||
sed -e 's|@BINDIR@|$(BINPREFIX)|' systemd/petrified-system.service.in > \
|
||||
systemd/petrified-system.service
|
||||
sed -e 's|@BINDIR@|$(BINPREFIX)|' systemd/petrified-user.service.in > \
|
||||
systemd/petrified-user.service
|
||||
|
||||
clean-systemd:
|
||||
rm systemd/petrified-system.service systemd/petrified-user.service
|
||||
|
||||
install-systemd: build-systemd
|
||||
# system unit
|
||||
install -dm0755 "$(DESTDIR)$(LIBPREFIX)/systemd/system"
|
||||
install -Dm0644 systemd/system/petrified.target \
|
||||
systemd/system/petrified.timer \
|
||||
systemd/system/petrified.service \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system"
|
||||
install -Dm0644 systemd/petrified-system.service \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.service"
|
||||
install -Dm0644 systemd/petrified.timer \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.timer"
|
||||
# user unit
|
||||
install -dm0755 "$(DESTDIR)$(LIBPREFIX)/systemd/user"
|
||||
install -Dm0644 systemd/user/petrified.target \
|
||||
systemd/user/petrified.timer \
|
||||
systemd/user/petrified.service \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/user"
|
||||
install -Dm0644 systemd/petrified-user.service \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified.service"
|
||||
install -Dm0644 systemd/petrified.timer \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified.timer"
|
||||
|
||||
uninstall-main:
|
||||
$(RM) "$(DESTDIR)$(BINPREFIX)/petrified" \
|
||||
rm "$(DESTDIR)$(BINPREFIX)/petrified" \
|
||||
"$(DESTDIR)$(MANPREFIX)/man1/petrified.1" \
|
||||
"$(DESTDIR)$(ETCPREFIX)/petrified.conf"
|
||||
rmdir "$(DESTDIR)$(VARPREFIX)/cache/petrified"
|
||||
|
||||
uninstall-doc:
|
||||
$(RM) "$(DESTDIR)$(DOCPREFIX)/petrified/README.pod" \
|
||||
rm "$(DESTDIR)$(DOCPREFIX)/petrified/README.pod" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/LICENSE" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/extra/petrified.crontab" \
|
||||
"$(DESTDIR)$(DOCPREFIX)/petrified/extra/petrified.dispatch" \
|
||||
|
|
@ -64,14 +75,12 @@ uninstall-doc:
|
|||
"$(DESTDIR)$(DOCPREFIX)/petrified" \
|
||||
|
||||
uninstall-systemd:
|
||||
$(RM) "$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.target" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.timer" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified@.service"
|
||||
$(RM) "$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified.target" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified.timer" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified@.service"
|
||||
rm "$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.timer" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/system/petrified.service"
|
||||
rm "$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified.timer" \
|
||||
"$(DESTDIR)$(LIBPREFIX)/systemd/user/petrified.service"
|
||||
|
||||
clean:
|
||||
clean: clean-systemd
|
||||
$(RM) $(MANPAGES)
|
||||
|
||||
.PHONY: clean doc install uninstall
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue