Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
c2d37b622d | |||
143e47426b | |||
3ba7859e13 | |||
c49cc9da46 | |||
0f53485b8f | |||
fac5641334 | |||
3c676da913 | |||
f442674723 | |||
bbcfaffc49 | |||
3d77e1c107 | |||
fe6537b985 | |||
72dca1a0e6 | |||
fac97d41d0 |
@@ -1,37 +1,17 @@
|
||||
# Contributor: linuxer <linuxer@artixlinux.org>
|
||||
# Developer: Timofey Titovets <nefelim4ag@gmail.com>
|
||||
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
pkgname=ananicy-openrc
|
||||
_alias=ananicy
|
||||
pkgver=2.2.0.r55.g5559e01
|
||||
pkgrel=1
|
||||
pkgdesc="Ananicy - is Another auto nice daemon, with community rules support"
|
||||
arch=('any')
|
||||
url="https://github.com/Nefelim4ag/Ananicy.git"
|
||||
license=('GPL3')
|
||||
depends=('openrc' 'bash' 'schedtool')
|
||||
makedepends=('git' 'make')
|
||||
#source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Nefelim4ag/Ananicy.git"
|
||||
source=("$pkgname"::'git+https://github.com/Nefelim4ag/Ananicy.git#branch=master'
|
||||
"ananicy.initd")
|
||||
b2sums=('SKIP'
|
||||
'beb8ec94c37ccc6065a567477857f8f552299a00d6c0e45e1cbce05bc0e17b0126e0a7914867b90bb7e3aed3c3be3e409836b73a1799b5b4911372629428a5da')
|
||||
pkgver=20210116
|
||||
pkgrel=2
|
||||
pkgdesc="OpenRC script for ananicy"
|
||||
arch=(any)
|
||||
url="https://gitea.artixlinux.org/linuxer"
|
||||
license=('GPL')
|
||||
depends=('openrc' 'ananicy')
|
||||
install=$pkgname.install
|
||||
source=("ananicy.initd")
|
||||
md5sums=('07ee4621e0c4d831d345a880234d89c5')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p $pkgdir/etc/init.d/
|
||||
cp "ananicy.initd" $pkgdir/etc/init.d/ananicy
|
||||
cd "$srcdir/$pkgname/"
|
||||
make install PREFIX="$pkgdir"
|
||||
sed -i "833i \ \ \ \ os.system('sysctl -e kernel.sched_autogroup_enabled=0')\n" $pkgdir/usr/bin/ananicy
|
||||
chmod +x $pkgdir/usr/bin/ananicy
|
||||
mkdir -p "$pkgdir/usr/"
|
||||
mv -v "$pkgdir/lib" "$pkgdir/usr/"
|
||||
rm -R "$pkgdir/usr/lib"
|
||||
install=ananicy-openrc.install
|
||||
install -Dm755 ananicy.initd "$pkgdir"/etc/init.d/ananicy
|
||||
}
|
||||
|
@@ -1,82 +0,0 @@
|
||||
# `ananicy-openrc` is a fork of ananicy for Artix Linux OpenRC Init
|
||||
|
||||
## Description
|
||||
Ananicy (ANother Auto NICe daemon) — is a shell daemon created to manage processes' [IO](http://linux.die.net/man/1/ionice) and [CPU](http://linux.die.net/man/1/nice) priorities, with community-driven set of rules for popular applications (anyone may add his own rule via github's [pull request](https://help.github.com/articles/using-pull-requests/) mechanism).
|
||||
|
||||
I think it's only for desktop usage.
|
||||
|
||||
I just wanted a tool for auto set programs nice in my system, i.e.:
|
||||
* Why do I have a lags, while compiling kernel and playing a game?
|
||||
* Why does dropbox client eat all my IO?
|
||||
* Why does torrent/dc client make my laptop run slower?
|
||||
* ...
|
||||
|
||||
Use ananicy to fix this problems!
|
||||
|
||||
## Versions
|
||||
```
|
||||
X.Y.Z where
|
||||
X - Major version,
|
||||
Y - Script version - reset on each major update
|
||||
Z - Rules version - reset on each script update
|
||||
```
|
||||
Read more about semantic versioning [here](http://semver.org/)
|
||||
|
||||
## Configuration
|
||||
Rules files should be placed under /etc/ananicy.d/ directory and have *.rules extension.
|
||||
Inside .rules file every process is described on a separate line, general syntax is described below:
|
||||
|
||||
```
|
||||
{ "name": "gcc", "type": "Heavy_CPU", "nice": 19, "ioclass": "best-effort", "ionice": 7, "cgroup": "cpu90" }
|
||||
```
|
||||
|
||||
All fields except 'name' are optional.
|
||||
|
||||
'name' used for match processes by exec bin name
|
||||
```
|
||||
~ basename $(sudo realpath /proc/1/exe)
|
||||
systemd
|
||||
```
|
||||
|
||||
Currently match by other things, not supported.
|
||||
|
||||
You can check what Ananicy see, by:
|
||||
```
|
||||
ananicy dump proc
|
||||
```
|
||||
|
||||
Ananicy load all rules in ram while starting, so to apply rules, you must restart service.
|
||||
|
||||
Available ionice values:
|
||||
```
|
||||
$ man ionice
|
||||
```
|
||||
|
||||
## Simple rules for writing rules
|
||||
CFQ IO Scheduller also use 'nice' for internal scheduling, so it's mean processes with same IO class and IO priority, but with different nicceness will take advantages of 'nice' also for IO.
|
||||
|
||||
1. Try don't chage 'nice' of system wide process like initrd.
|
||||
2. Please try use full process name (or name with ^$ symbols like NAME=^full_name$)
|
||||
3. When writing rule - try use only 'nice', it must be enough in most cases.
|
||||
4. Don't try set to high priority! Niceness can fix some performance problems, but can't give you more.
|
||||
Example: pulseaudio uses 'nice' -11 by default, if you set other cpu hungry task, with 'nice' {-20..-12} you can catch a sound glitches.
|
||||
5. For CPU hungry backround task like compiling, just use NICE=19.
|
||||
|
||||
About IO priority:
|
||||
|
||||
1. It's usefull use '{"ioclass": "idle"}' for IO hungry background tasks like: file indexers, Cloud Clients, Backups and etc.
|
||||
2. It's not cool set realtime to all tasks. The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. So try use ioclass first.
|
||||
|
||||
### Missing `schedtool`
|
||||
If you see this error in the output
|
||||
```
|
||||
Jan 24 09:44:18 tony-dev ananicy[13783]: ERRO: Missing schedtool! Abort!
|
||||
```
|
||||
Fix it in Ubuntu with
|
||||
```
|
||||
sudo apt install schedtool
|
||||
```
|
||||
|
||||
### Submitting new rules
|
||||
|
||||
Please use pull request, thanks
|
@@ -1,33 +1,14 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/openrc-run
|
||||
|
||||
start() {
|
||||
/usr/bin/ananicy start
|
||||
pidfile="/run/ananicy.pid"
|
||||
command="/usr/bin/ananicy"
|
||||
command_args="start"
|
||||
command_background=true
|
||||
|
||||
stop_post() {
|
||||
/sbin/sysctl -e kernel.sched_autogroup_enabled=1
|
||||
}
|
||||
|
||||
stop() {
|
||||
/sbin/sysctl -e kernel.sched_autogroup_enabled=1
|
||||
start-stop-daemon --stop --pidfile "$pidfile"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart}"
|
||||
|
||||
exit 1
|
||||
|
||||
esac
|
||||
exit $?
|
||||
|
@@ -1,39 +1,17 @@
|
||||
# Contributor: linuxer <linuxer@artixlinux.org>
|
||||
# Developer: Timofey Titovets <nefelim4ag@gmail.com>
|
||||
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
pkgname=ananicy-runit
|
||||
_alias=ananicy
|
||||
pkgver=2.2.0.r55.g5559e01
|
||||
pkgrel=1
|
||||
pkgdesc="Ananicy - is Another auto nice daemon, with community rules support"
|
||||
arch=('any')
|
||||
url="https://github.com/Nefelim4ag/Ananicy.git"
|
||||
license=('GPL3')
|
||||
depends=('runit' 'bash' 'schedtool')
|
||||
makedepends=('git' 'make')
|
||||
#source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Nefelim4ag/Ananicy.git"
|
||||
source=("$pkgname"::'git+https://github.com/Nefelim4ag/Ananicy.git#branch=master'
|
||||
"ananicy.finish"
|
||||
"ananicy.run")
|
||||
b2sums=('SKIP'
|
||||
'b45d85b9c912585ff1fa237d0b841994c275f658e098096689315501721037cc141b6bda8d7e9220dfb0cb0ec3c6f62b4850550036556f65e636da628a908edb'
|
||||
'25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b')
|
||||
install=$pkgname.install
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
pkgver=20210116
|
||||
pkgrel=2
|
||||
pkgdesc="Runit script for runit"
|
||||
arch=(any)
|
||||
url="https://gitea.artixlinux.org/linuxer"
|
||||
license=('GPL')
|
||||
depends=('runit' 'ananicy')
|
||||
source=("run"
|
||||
"finish")
|
||||
b2sums=('25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b'
|
||||
'b45d85b9c912585ff1fa237d0b841994c275f658e098096689315501721037cc141b6bda8d7e9220dfb0cb0ec3c6f62b4850550036556f65e636da628a908edb')
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/etc/runit/sv/$_alias"
|
||||
cp "ananicy.finish" $pkgdir/etc/runit/sv/$_alias/finish
|
||||
cp "ananicy.run" $pkgdir/etc/runit/sv/$_alias/run
|
||||
cd "$srcdir/$pkgname/"
|
||||
make install PREFIX="$pkgdir"
|
||||
mkdir -p "$pkgdir/usr/"
|
||||
sed -i "833i \ \ \ \ os.system('sysctl -e kernel.sched_autogroup_enabled=0')\n" $pkgdir/usr/bin/ananicy
|
||||
mv -v "$pkgdir/lib" "$pkgdir/usr/"
|
||||
rm -R "$pkgdir/usr/lib"
|
||||
install=ananicy-runit.install
|
||||
install -Dm755 run finish -t "$pkgdir"/etc/runit/sv/ananicy
|
||||
}
|
||||
|
@@ -1,87 +0,0 @@
|
||||
# `ananicy-runit` is a fork of ananicy for Artix Linux Runit Init
|
||||
|
||||
## Description
|
||||
Ananicy (ANother Auto NICe daemon) — is a shell daemon created to manage processes' [IO](http://linux.die.net/man/1/ionice) and [CPU](http://linux.die.net/man/1/nice) priorities, with community-driven set of rules for popular applications (anyone may add his own rule via github's [pull request](https://help.github.com/articles/using-pull-requests/) mechanism).
|
||||
|
||||
I think it's only for desktop usage.
|
||||
|
||||
I just wanted a tool for auto set programs nice in my system, i.e.:
|
||||
* Why do I have a lags, while compiling kernel and playing a game?
|
||||
* Why does dropbox client eat all my IO?
|
||||
* Why does torrent/dc client make my laptop run slower?
|
||||
* ...
|
||||
|
||||
Use ananicy to fix this problems!
|
||||
|
||||
## Versions
|
||||
```
|
||||
X.Y.Z where
|
||||
X - Major version,
|
||||
Y - Script version - reset on each major update
|
||||
Z - Rules version - reset on each script update
|
||||
```
|
||||
Read more about semantic versioning [here](http://semver.org/)
|
||||
|
||||
Enable
|
||||
```
|
||||
$ sudo ln -s /etc/runit/sv/ananicy /run/runit/service
|
||||
$ sudo sc up ananicy
|
||||
```
|
||||
## Configuration
|
||||
Rules files should be placed under /etc/ananicy.d/ directory and have *.rules extension.
|
||||
Inside .rules file every process is described on a separate line, general syntax is described below:
|
||||
|
||||
```
|
||||
{ "name": "gcc", "type": "Heavy_CPU", "nice": 19, "ioclass": "best-effort", "ionice": 7, "cgroup": "cpu90" }
|
||||
```
|
||||
|
||||
All fields except 'name' are optional.
|
||||
|
||||
'name' used for match processes by exec bin name
|
||||
```
|
||||
~ basename $(sudo realpath /proc/1/exe)
|
||||
systemd
|
||||
```
|
||||
|
||||
Currently match by other things, not supported.
|
||||
|
||||
You can check what Ananicy see, by:
|
||||
```
|
||||
ananicy dump proc
|
||||
```
|
||||
|
||||
Ananicy load all rules in ram while starting, so to apply rules, you must restart service.
|
||||
|
||||
Available ionice values:
|
||||
```
|
||||
$ man ionice
|
||||
```
|
||||
|
||||
## Simple rules for writing rules
|
||||
CFQ IO Scheduller also use 'nice' for internal scheduling, so it's mean processes with same IO class and IO priority, but with different nicceness will take advantages of 'nice' also for IO.
|
||||
|
||||
1. Try don't chage 'nice' of system wide process like initrd.
|
||||
2. Please try use full process name (or name with ^$ symbols like NAME=^full_name$)
|
||||
3. When writing rule - try use only 'nice', it must be enough in most cases.
|
||||
4. Don't try set to high priority! Niceness can fix some performance problems, but can't give you more.
|
||||
Example: pulseaudio uses 'nice' -11 by default, if you set other cpu hungry task, with 'nice' {-20..-12} you can catch a sound glitches.
|
||||
5. For CPU hungry backround task like compiling, just use NICE=19.
|
||||
|
||||
About IO priority:
|
||||
|
||||
1. It's usefull use '{"ioclass": "idle"}' for IO hungry background tasks like: file indexers, Cloud Clients, Backups and etc.
|
||||
2. It's not cool set realtime to all tasks. The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. So try use ioclass first.
|
||||
|
||||
### Missing `schedtool`
|
||||
If you see this error in the output
|
||||
```
|
||||
Jan 24 09:44:18 tony-dev ananicy[13783]: ERRO: Missing schedtool! Abort!
|
||||
```
|
||||
Fix it in Ubuntu with
|
||||
```
|
||||
sudo apt install schedtool
|
||||
```
|
||||
|
||||
### Submitting new rules
|
||||
|
||||
Please use pull request, thanks
|
0
ananicy-runit/ananicy.finish → ananicy-runit/finish
Executable file → Normal file
0
ananicy-runit/ananicy.finish → ananicy-runit/finish
Executable file → Normal file
0
ananicy-runit/ananicy.run → ananicy-runit/run
Executable file → Normal file
0
ananicy-runit/ananicy.run → ananicy-runit/run
Executable file → Normal file
@@ -1,39 +1,16 @@
|
||||
# Contributor: linuxer <linuxer@artixlinux.org>
|
||||
# Developer: Timofey Titovets <nefelim4ag@gmail.com>
|
||||
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
pkgname=ananicy-s6
|
||||
_alias=ananicy
|
||||
pkgver=2.2.0.r55.g5559e01
|
||||
pkgver=20210116
|
||||
pkgrel=1
|
||||
pkgdesc="Ananicy - is Another auto nice daemon, with community rules support"
|
||||
arch=('any')
|
||||
url="https://github.com/Nefelim4ag/Ananicy.git"
|
||||
license=('GPL3')
|
||||
depends=('s6' 'bash' 'schedtool')
|
||||
makedepends=('git' 'make')
|
||||
#source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Nefelim4ag/Ananicy.git"
|
||||
source=("$pkgname"::'git+https://github.com/Nefelim4ag/Ananicy.git#branch=master'
|
||||
"ananicy.type"
|
||||
"ananicy.run")
|
||||
b2sums=('SKIP'
|
||||
'0d8b60c573270d0117b3613fa99b65d94b1a91c0029a07bfb1157d2a990e59636c4785b67dbf64bdf1cd17a77c55f71a041170c9a6edb81689053e6ee158d46e'
|
||||
'25551175031c7426bcb0a4169960a464494a0e16908865d9bd8abed8bb6ffb4958ebeded19fccd7483387f9ce02336582aa587ff7284ec85ae2ccfa663ffc89b')
|
||||
install=$pkgname.install
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
pkgdesc="s6 init script for ananicy"
|
||||
arch=(any)
|
||||
url="https://gitea.artixlinux.org/linuxer"
|
||||
license=('GPL')
|
||||
depends=('ananicy' 's6')
|
||||
source=("run" "type")
|
||||
md5sums=('2bf8c6d175765f910a4469314c2d5fb6'
|
||||
'42c13bdd7f61c06ac59c1aaca9c0f07a')
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir/etc/s6/sv/$_alias"
|
||||
cp ananicy.run $pkgdir/etc/s6/sv/$_alias/run
|
||||
cp ananicy.type $pkgdir/etc/s6/sv/$_alias/type
|
||||
cd "$srcdir/$pkgname/"
|
||||
make install PREFIX="$pkgdir"
|
||||
sed -i "833i \ \ \ \ os.system('sysctl -e kernel.sched_autogroup_enabled=0')\n" $pkgdir/usr/bin/ananicy
|
||||
mkdir -p "$pkgdir/usr/"
|
||||
mv -v "$pkgdir/lib" "$pkgdir/usr/"
|
||||
rm -R "$pkgdir/usr/lib"
|
||||
install=ananicy-s6.install
|
||||
install -Dm644 run type -t "$pkgdir"/etc/s6/sv/ananicy
|
||||
}
|
||||
|
@@ -1,82 +0,0 @@
|
||||
# `ananicy-s6` is a fork of ananicy for Artix Linux s6 Init
|
||||
|
||||
## Description
|
||||
Ananicy (ANother Auto NICe daemon) — is a shell daemon created to manage processes' [IO](http://linux.die.net/man/1/ionice) and [CPU](http://linux.die.net/man/1/nice) priorities, with community-driven set of rules for popular applications (anyone may add his own rule via github's [pull request](https://help.github.com/articles/using-pull-requests/) mechanism).
|
||||
|
||||
I think it's only for desktop usage.
|
||||
|
||||
I just wanted a tool for auto set programs nice in my system, i.e.:
|
||||
* Why do I have a lags, while compiling kernel and playing a game?
|
||||
* Why does dropbox client eat all my IO?
|
||||
* Why does torrent/dc client make my laptop run slower?
|
||||
* ...
|
||||
|
||||
Use ananicy to fix this problems!
|
||||
|
||||
## Versions
|
||||
```
|
||||
X.Y.Z where
|
||||
X - Major version,
|
||||
Y - Script version - reset on each major update
|
||||
Z - Rules version - reset on each script update
|
||||
```
|
||||
Read more about semantic versioning [here](http://semver.org/)
|
||||
|
||||
## Configuration
|
||||
Rules files should be placed under /etc/ananicy.d/ directory and have *.rules extension.
|
||||
Inside .rules file every process is described on a separate line, general syntax is described below:
|
||||
|
||||
```
|
||||
{ "name": "gcc", "type": "Heavy_CPU", "nice": 19, "ioclass": "best-effort", "ionice": 7, "cgroup": "cpu90" }
|
||||
```
|
||||
|
||||
All fields except 'name' are optional.
|
||||
|
||||
'name' used for match processes by exec bin name
|
||||
```
|
||||
~ basename $(sudo realpath /proc/1/exe)
|
||||
systemd
|
||||
```
|
||||
|
||||
Currently match by other things, not supported.
|
||||
|
||||
You can check what Ananicy see, by:
|
||||
```
|
||||
ananicy dump proc
|
||||
```
|
||||
|
||||
Ananicy load all rules in ram while starting, so to apply rules, you must restart service.
|
||||
|
||||
Available ionice values:
|
||||
```
|
||||
$ man ionice
|
||||
```
|
||||
|
||||
## Simple rules for writing rules
|
||||
CFQ IO Scheduller also use 'nice' for internal scheduling, so it's mean processes with same IO class and IO priority, but with different nicceness will take advantages of 'nice' also for IO.
|
||||
|
||||
1. Try don't chage 'nice' of system wide process like initrd.
|
||||
2. Please try use full process name (or name with ^$ symbols like NAME=^full_name$)
|
||||
3. When writing rule - try use only 'nice', it must be enough in most cases.
|
||||
4. Don't try set to high priority! Niceness can fix some performance problems, but can't give you more.
|
||||
Example: pulseaudio uses 'nice' -11 by default, if you set other cpu hungry task, with 'nice' {-20..-12} you can catch a sound glitches.
|
||||
5. For CPU hungry backround task like compiling, just use NICE=19.
|
||||
|
||||
About IO priority:
|
||||
|
||||
1. It's usefull use '{"ioclass": "idle"}' for IO hungry background tasks like: file indexers, Cloud Clients, Backups and etc.
|
||||
2. It's not cool set realtime to all tasks. The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. So try use ioclass first.
|
||||
|
||||
### Missing `schedtool`
|
||||
If you see this error in the output
|
||||
```
|
||||
Jan 24 09:44:18 tony-dev ananicy[13783]: ERRO: Missing schedtool! Abort!
|
||||
```
|
||||
Fix it in Ubuntu with
|
||||
```
|
||||
sudo apt install schedtool
|
||||
```
|
||||
|
||||
### Submitting new rules
|
||||
|
||||
Please use pull request, thanks
|
@@ -1,3 +0,0 @@
|
||||
post_install() {
|
||||
echo "Configs in /etc/ananicy.d/"
|
||||
}
|
@@ -1 +0,0 @@
|
||||
longrun
|
0
ananicy-s6/ananicy.run → ananicy-s6/run
Executable file → Normal file
0
ananicy-s6/ananicy.run → ananicy-s6/run
Executable file → Normal file
1
ananicy-s6/type
Normal file
1
ananicy-s6/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
27
ananicy/PKGBUILD
Normal file
27
ananicy/PKGBUILD
Normal file
@@ -0,0 +1,27 @@
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
|
||||
pkgname=ananicy
|
||||
pkgver=v2.2.0.r0.gb8cb676
|
||||
pkgrel=1
|
||||
pkgdesc="Another auto nice daemon, with community rules support"
|
||||
arch=('any')
|
||||
url="https://gitea.artixlinux.org/linuxer/ananicy-nosystemd.git"
|
||||
license=('GPL3')
|
||||
provides=('ananicy')
|
||||
depends=('bash' 'schedtool' 'python')
|
||||
makedepends=('git')
|
||||
source=("$pkgname::git+https://gitea.artixlinux.org/linuxer/ananicy-nosystemd.git")
|
||||
b2sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname/"
|
||||
make install PREFIX="$pkgdir"
|
||||
|
||||
# Remove systemd
|
||||
rm -r "$pkgdir"/lib
|
||||
}
|
15
zramen-openrc/PKGBUILD
Normal file
15
zramen-openrc/PKGBUILD
Normal file
@@ -0,0 +1,15 @@
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
pkgname=zramen-openrc
|
||||
pkgver=20210118
|
||||
pkgrel=1
|
||||
pkgdesc="OpenRC script for zramen"
|
||||
arch=(any)
|
||||
url="https://gitea.artixlinux.org/linuxer"
|
||||
license=('GPL')
|
||||
depends=('zramen' 'openrc')
|
||||
source=("initd")
|
||||
md5sums=('0302133661503a44f640eb553341ddaa')
|
||||
|
||||
package() {
|
||||
install -Dm755 initd "$pkgdir"/etc/init.d/zramen
|
||||
}
|
11
zramen-openrc/initd
Normal file
11
zramen-openrc/initd
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/openrc-run
|
||||
|
||||
pidfile="/run/zramen.pid"
|
||||
command="/usr/bin/zramen"
|
||||
command_args="make"
|
||||
command_background=true
|
||||
|
||||
stop() {
|
||||
/usr/bin/zramen toss
|
||||
}
|
||||
|
19
zramen-s6/PKGBUILD
Normal file
19
zramen-s6/PKGBUILD
Normal file
@@ -0,0 +1,19 @@
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
pkgname=zramen-s6
|
||||
pkgver=20210118
|
||||
pkgrel=1
|
||||
pkgdesc="S6 script for zramen"
|
||||
arch=(any)
|
||||
url="https://gitea.artixlinux.org/linuxer"
|
||||
license=('GPL')
|
||||
depends=('zramen' 's6')
|
||||
source=("type" "run" "finish")
|
||||
b2sums=('cdcdfdfe8033b1b2ac812951b70b09b115c1d7b7de4ed0ea0808072414753faf98ca846a171f22ab788cc9e1564456354f953941d4fba8056bc650f41dcde8dc'
|
||||
'0c2ba1bcb5a07553dc0f04f8780a5dae93aafcd06fb460852c2a6c1403a8ebaab6d09f1b07338926523341fc17fe0cff6db3d755f8a4200a77ff003c53614b35'
|
||||
'18c715abcedd65f5e07f46e3e7e4d974f0c3e6f5e7474583b124744bc97530662ce4551de31e380209d63fb42abfb9f3c020f248cfa9c2ef15fd9c4d6cb11c50')
|
||||
|
||||
package() {
|
||||
install -Dm644 run "$pkgdir"/etc/s6/sv/zramen/up
|
||||
install -Dm644 finish "$pkgdir"/etc/s6/sv/zramen/down
|
||||
install -Dm644 type -t "$pkgdir"/etc/s6/sv/zramen
|
||||
}
|
3
zramen-s6/finish
Normal file
3
zramen-s6/finish
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/bin/zramen toss
|
3
zramen-s6/run
Normal file
3
zramen-s6/run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec /usr/bin/zramen make
|
1
zramen-s6/type
Normal file
1
zramen-s6/type
Normal file
@@ -0,0 +1 @@
|
||||
oneshot
|
27
zramen/PKGBUILD
Normal file
27
zramen/PKGBUILD
Normal file
@@ -0,0 +1,27 @@
|
||||
# Maintainer: linuxer <linuxer@artixlinux.org>
|
||||
pkgname=('zramen' 'zramen-runit')
|
||||
pkgbase=zramen
|
||||
pkgver=0.2.1
|
||||
pkgrel=1
|
||||
pkgdesc="Manage zram swap space"
|
||||
arch=(any)
|
||||
url="https://github.com/atweiden/zramen/"
|
||||
license=('UNLICENSE')
|
||||
source=("https://github.com/atweiden/zramen/releases/download/${pkgver}/zramen-${pkgver}.tar.gz")
|
||||
md5sums=('9902548566e92c6e71829893e501a39f')
|
||||
|
||||
package_zramen() {
|
||||
depends=("bc" "bash")
|
||||
|
||||
cd "$pkgbase-$pkgver"
|
||||
install -Dm755 zramen -t "$pkgdir"/usr/bin
|
||||
}
|
||||
|
||||
package_zramen-runit() {
|
||||
pkgdesc="runit script for zramen"
|
||||
depends=('zramen' 'runit')
|
||||
|
||||
cd "$pkgbase-$pkgver"
|
||||
install -Dm755 sv/zramen/{finish,run} -t "$pkgdir"/etc/runit/sv/zramen
|
||||
install -Dm644 sv/zramen/conf -t "$pkgdir"/etc/runit/sv/zramen
|
||||
}
|
Reference in New Issue
Block a user