mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
parent
410c32b83e
commit
a42b0aa7ba
4 changed files with 48 additions and 0 deletions
10
srcpkgs/preload/files/preload/conf
Normal file
10
srcpkgs/preload/files/preload/conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Miminum memory that the system should have for preload to be launched.
|
||||||
|
# In megabytes.
|
||||||
|
MIN_MEMORY="256"
|
||||||
|
|
||||||
|
# Command-line arguments to pass to the daemon. Read preload(8) man page
|
||||||
|
# for available options.
|
||||||
|
OPTS="--verbose 1 -l ''"
|
||||||
|
|
||||||
|
# Option to call ionice with. Leave empty to skip ionice.
|
||||||
|
IONICE_OPTS="-c3"
|
1
srcpkgs/preload/files/preload/log/run
Symbolic link
1
srcpkgs/preload/files/preload/log/run
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/usr/bin/rsvlog
|
15
srcpkgs/preload/files/preload/run
Executable file
15
srcpkgs/preload/files/preload/run
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
exec 2>&1
|
||||||
|
[ -r conf ] && . conf
|
||||||
|
MIN_MEMORY=${MIN_MEMORY:-256}
|
||||||
|
free -m | awk '/Mem:/ {exit ($2 >= ('"$MIN_MEMORY"'))?0:1}' || exit 0
|
||||||
|
|
||||||
|
if [ -n "$IONICE_OPTS" ]; then
|
||||||
|
if [ -x "$IONICE" ]; then
|
||||||
|
RUNNER="$IONICE $IONICE_OPTS"
|
||||||
|
else
|
||||||
|
echo "ionice not found, running with normal io priority" 1>&2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec $RUNNER preload $OPTS -f 2>&1
|
22
srcpkgs/preload/template
Normal file
22
srcpkgs/preload/template
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Template file for 'preload'
|
||||||
|
pkgname=preload
|
||||||
|
version=0.6.4
|
||||||
|
revision=1
|
||||||
|
build_style=gnu-configure
|
||||||
|
hostmakedepends="help2man pkg-config"
|
||||||
|
makedepends="libglib-devel"
|
||||||
|
depends="sv-helper"
|
||||||
|
short_desc="An adaptive readahead daemon"
|
||||||
|
maintainer="bougyman <bougyman@voidlinux.eu>"
|
||||||
|
license="GPL-2"
|
||||||
|
homepage="http://sourceforge.net/projects/preload"
|
||||||
|
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
|
||||||
|
checksum=d0a558e83cb29a51d9d96736ef39f4b4e55e43a589ad1aec594a048ca22f816b
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
rm -rf etc/rc.d
|
||||||
|
rm -rf etc/logrotate.d
|
||||||
|
rm -rf etc/sysconfig
|
||||||
|
rm -rf var/log
|
||||||
|
vsv preload
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue