Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
- Move back non-sysv packages in /usr/bin
- Split off sysv-compatible binaries into 'install_sysv'
  • Loading branch information
konimex committed Mar 28, 2018
1 parent 82bf65d commit 20a1ca1
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@ all:
$(CC) $(CFLAGS) pause.c -o pause $(LDFLAGS)

install:
install -d ${DESTDIR}${PREFIX}/bin
install -d ${DESTDIR}${PREFIX}/lib/runit-artix/bin
install -m755 pause ${DESTDIR}${PREFIX}/bin/pause
install -m755 modules-load ${DESTDIR}${PREFIX}/bin/modules-load
install -m755 zzz ${DESTDIR}${PREFIX}/bin/zzz
install -m755 halt ${DESTDIR}${PREFIX}/lib/runit-artix/bin/halt
install -m755 pause ${DESTDIR}${PREFIX}/lib/runit-artix/bin/pause
install -m755 shutdown ${DESTDIR}${PREFIX}/lib/runit-artix/bin/shutdown
install -m755 modules-load ${DESTDIR}${PREFIX}/lib/runit-artix/bin/modules-load
install -m755 zzz ${DESTDIR}${PREFIX}/lib/runit-artix/bin/zzz
ln -sf halt ${DESTDIR}${PREFIX}/lib/runit-artix/bin/poweroff
ln -sf halt ${DESTDIR}${PREFIX}/lib/runit-artix/bin/reboot
install -d ${DESTDIR}${PREFIX}/share/man/man1
install -m644 pause.1 ${DESTDIR}${PREFIX}/share/man/man1
install -d ${DESTDIR}${PREFIX}/share/man/man8
install -m644 zzz.8 ${DESTDIR}${PREFIX}/share/man/man8/zzz-runit.8
install -m644 shutdown.8 ${DESTDIR}${PREFIX}/share/man/man8/shutdown-runit.8
install -m644 halt.8 ${DESTDIR}${PREFIX}/share/man/man8/halt-runit.8
install -m644 zzz.8 ${DESTDIR}${PREFIX}/share/man/man8/zzz.8
install -m644 modules-load.8 ${DESTDIR}${PREFIX}/share/man/man8
ln -sf halt-runit.8 ${DESTDIR}${PREFIX}/share/man/man8/poweroff-runit.8
ln -sf halt-runit.8 ${DESTDIR}${PREFIX}/share/man/man8/reboot-runit.8
install -d ${DESTDIR}/etc/runit/sv
install -d ${DESTDIR}/etc/runit/runsvdir
install -d ${DESTDIR}/etc/runit/core-services
Expand All @@ -40,7 +37,19 @@ install:
cp -R --no-dereference --preserve=mode,links -v runsvdir/* ${DESTDIR}/etc/runit/runsvdir/
cp -R --no-dereference --preserve=mode,links -v services/* ${DESTDIR}/etc/runit/sv/

install_sysv:
install -d ${DESTDIR}${PREFIX}/bin
ln -sf runit-init ${DESTDIR}${PREFIX}/bin/init
ln -sf ${PREFIX}/lib/runit-artix/bin/halt ${DESTDIR}${PREFIX}/bin/halt
ln -sf ${PREFIX}/lib/runit-artix/bin/shutdown ${DESTDIR}${PREFIX}/bin/shutdown
ln -sf halt ${DESTDIR}${PREFIX}/bin/poweroff
ln -sf halt ${DESTDIR}${PREFIX}/bin/reboot
install -m644 shutdown.8 ${DESTDIR}${PREFIX}/share/man/man8/shutdown.8
install -m644 halt.8 ${DESTDIR}${PREFIX}/share/man/man8/halt.8
ln -sf halt.8 ${DESTDIR}${PREFIX}/share/man/man8/poweroff.8
ln -sf halt.8 ${DESTDIR}${PREFIX}/share/man/man8/reboot.8

clean:
-rm -f halt pause

.PHONY: all install clean
.PHONY: all install install_sysv clean

0 comments on commit 20a1ca1

Please sign in to comment.