From f0b1b1778a460a1832861e21d2efa37d09c1ee3c Mon Sep 17 00:00:00 2001 From: Alex Tharp Date: Tue, 8 Mar 2022 02:26:56 -0500 Subject: [PATCH] feat: swapspace --- README.md | 1 + swapspace/PKGBUILD | 46 +++++++++++++++++++++++++++++++++++++ swapspace/swapspace.service | 16 +++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 swapspace/PKGBUILD create mode 100644 swapspace/swapspace.service diff --git a/README.md b/README.md index c485a78..03520f7 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Some neato [PKGBUILDs](https://wiki.archlinux.org/index.php/PKGBUILD) for [Arch * [hifi-git](hifi-git) - Provides the [High Fidelity](https://highfidelity.io/) virtual world project (client and servers) * [polyvox-git](polyvox-git) - Provides the [PolyVox](http://www.volumesoffun.com/polyvox-about/) library, intended for storing, manipulating, and displaying volumetric representations of objects * [python3-keybinder](python3-keybinder) - Provides the unmaintained [python3-keybinder](https://pypi.org/project/python3-keybinder/) library, a global keybinding library for X +* [swapspace](swapspace) - Provides [swapspace](https://github.com/Tookmund/Swapspace), a dynamic swap manager for Linux * [foobar2000-component-audioscrobbler-bin](foobar2000-component-audioscrobbler-bin) - Provides [foo_audioscrobbler](http://www.foobar2000.org/components/view/foo_audioscrobbler), a [Last.fm/Audioscrobbler](https://www.last.fm/) component for [foobar2000](https://www.foobar2000.org/) * [foobnix](foobnix) + [foobnix-git](foobnix-git) - Provides [Foobnix](http://foobnix.com), a lightweight and functional music player for Linux built with GTK+ and Python 3 * [hiri](hiri) - Provides [Hiri](https://www.hiri.com/), a cross-platform, [Exchange](https://en.wikipedia.org/wiki/Microsoft_Exchange_Server)-ready email client aiming to replace [Outlook](https://en.wikipedia.org/wiki/Microsoft_Outlook) diff --git a/swapspace/PKGBUILD b/swapspace/PKGBUILD new file mode 100644 index 0000000..dd40569 --- /dev/null +++ b/swapspace/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Mike Swanson + +pkgname=swapspace +pkgver=1.17 +pkgrel=2 +pkgdesc="A dynamic swap manager" +arch=('i686' 'x86_64') +url="https://github.com/Tookmund/Swapspace" +license=('GPL') +backup=(etc/swapspace.conf) +source=("$url/archive/v$pkgver.tar.gz" + swapspace.service) +b2sums=('76a609f898aa6e41c9805498e3ad9a83cd8ab21d66a4df08e4df719cf581ae568f26ea8c023209cc2b6fbd7a8d3b92ad2264269bc610f54e4a1ed689c4ae5f67' + '42690e95a18851248453542ed9d5612a786efd7803a50ef4893d2034727d5e62be7e3d945a63031de5fcaf54bceab89525de464cc5c4a137f23eb713545acfc1') + +prepare() { + cd "$srcdir/${pkgname^}-$pkgver" + + for patch in ../*.patch; do + if [ ! -f "$patch" ]; then + break; + else + patch -p1 -i "$patch" + fi + done + + autoreconf -fi +} + +build() { + cd "$srcdir/${pkgname^}-$pkgver" + ./configure \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --sbindir=/usr/bin \ + --prefix=/usr + make +} + +package() { + cd "$srcdir/${pkgname^}-$pkgver" + make DESTDIR="$pkgdir" install + + install -d "$pkgdir/usr/lib/systemd/system" + install -m644 ../swapspace.service "$pkgdir/usr/lib/systemd/system" +} diff --git a/swapspace/swapspace.service b/swapspace/swapspace.service new file mode 100644 index 0000000..af730ee --- /dev/null +++ b/swapspace/swapspace.service @@ -0,0 +1,16 @@ +[Unit] +Description=dynamic swap manager +Documentation=man:swapspace(8) +After=local-fs.target +Requires=local-fs.target +After=swap.target +Requires=swap.target + +[Service] +Type=simple +ExecStart=/usr/bin/swapspace +Restart=always +RestartSec=30 + +[Install] +WantedBy=multi-user.target