Skip to content

Commit

Permalink
feat: swapspace
Browse files Browse the repository at this point in the history
  • Loading branch information
toastercup committed Mar 8, 2022
1 parent a11913e commit f0b1b17
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
46 changes: 46 additions & 0 deletions swapspace/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Maintainer: Mike Swanson <[email protected]>

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"
}
16 changes: 16 additions & 0 deletions swapspace/swapspace.service
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f0b1b17

Please sign in to comment.