123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- set -e
- program=perp
- version=2.07
- release=8
- pkgcategory=boot
- tarname=${program}-${version}.tar.gz
- fetch="
- https://dragora.mirror.garr.it/current/sources/$tarname
- https://b0llix.net/perp/distfiles/$tarname
- "
- description="
- A persistent process supervisor and service managment framework.
- The perp package provides a set of daemons and utilities to reliably
- start, monitor, log, and control a collection of persistent processes.
- A \"persistent process\" is any program intended to be long-running,
- highly available, and purpose critical. Also known and often described
- as a service, a persistent process normally provides some essential,
- on-demand system service. Programs that serve email, domain name
- queries, and http requests are all examples of services that are
- normally run as persistent processes.
- These are the programs that you want to start at system boot, and to
- continue running for as long as the system itself. These are the
- programs you need running in uninterrupted service, day and night,
- forever and ever.
- perp helps make sure that they do.
- "
- homepage=https://b0llix.net/perp
- license=Custom
- docs="CHANGES LICENSE README THANKS"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "$srcdir"
-
- chmod -R u+w,go-w,a+rX-s .
-
-
- patch -Np1 -i "${worktree}/patches/perp/perp-patches"
-
- patch -Np1 -i "${worktree}/patches/perp/runchoom-use-oom_score_adj"
- patch -Np0 -i "${worktree}/patches/perp/flags-conf.mk.diff"
- make -j${jobs} CC="cc -static" \
- CPPFLAGS="$QICPPFLAGS" QICFLAGS="$QICFLAGS"
- make -j${jobs} V=1 strip
- make -j${jobs} DESTDIR="$destdir" install
-
- DESTDIR="$destdir" ./perp/perp-setup /etc/perp
-
- mkdir -p "${destdir}/var/run/perp"
- chmod 700 "${destdir}/var/run/perp"
-
- cp -p "${worktree}/archive/perp/etc/tinylog.conf" \
- "${destdir}/etc/"
- chmod 644 "${destdir}/etc/tinylog.conf"
-
- cp -p "${worktree}/archive/perp/etc/rc.log-boot" \
- "${destdir}/etc/perp/.boot/rc.log"
- cp -p "${worktree}/archive/perp/etc/rc.perp-boot" \
- "${destdir}/etc/perp/.boot/rc.perp"
- chmod 755 "${destdir}/etc/perp/.boot/rc.log" \
- "${destdir}/etc/perp/.boot/rc.perp"
-
- mkdir -p "${destdir}/etc/profile.d"
- cp -p "${worktree}/archive/perp/etc/profile.d/perp.sh" \
- "${destdir}/etc/profile.d/"
- chmod 644 "${destdir}/etc/profile.d/perp.sh"
-
- touch "${destdir}/etc/.graft-config" \
- "${destdir}/etc/perp/.boot/.graft-config" \
- "${destdir}/etc/profile.d/.graft-config"
-
- rm -f "${destdir}/usr/sbin/perp-setup" \
- "${destdir}/${mandir}/man8/perp-setup.8"
-
- if test -d "${destdir}/$mandir"
- then
- (
- cd "${destdir}/$mandir"
- find . -type f -exec lzip -9 {} +
- find . -type l | while read -r file
- do
- ln -sf "$(readlink -- "$file").lz" "${file}.lz"
- rm -- "$file"
- done
- )
- fi
-
- mkdir -p "${destdir}/$docsdir"
- cp -p $docs "${destdir}/$docsdir"
- }
|