diff --git a/alarm/libaccept4/PKGBUILD b/alarm/libaccept4/PKGBUILD new file mode 100644 index 000000000..3b70b857b --- /dev/null +++ b/alarm/libaccept4/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Jason Plum + +pkgname=libaccept4 +pkgdesc='Library to supply accept4() to kernels without it' +pkgver=0.1.0 +pkgrel=1 +arch=('arm') +license=('GPL') +url="http://pond-weed.com/wmt8650/index.html" +source=("http://pond-weed.com/wmt8650/libaccept4-$pkgver.tar.gz") +sha256sums=('7f51cc578a52045bfbee7c6f8b3824a67c2f2228b1e83b6ab80a9c18eadd9bb8') +# backup=( 'etc/ld.so.preload' ) +options=( strip docs !libtool emptydirs zipman purge !upx ) +install=$pkgname.install + +build() { + cd "$srcdir/libaccept4-$pkgver" + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/libaccept4-$pkgver" + make DESTDIR="${pkgdir}/" install +} + +# vim:set ts=2 sw=2 et: diff --git a/alarm/libaccept4/libaccept4.install b/alarm/libaccept4/libaccept4.install new file mode 100644 index 000000000..9b18d8031 --- /dev/null +++ b/alarm/libaccept4/libaccept4.install @@ -0,0 +1,18 @@ +# add it to the ld.so.preload +post_install() { + echo "/usr/lib/libaccept4.so" >> /etc/ld.so.preload +} + +post_upgrade() { + post_remove() + post_install() +} + +# remove fom ld.so.preload +post_remove() { + if [ -f /etc/ld.so.preload ]; then + sed -i '/libaccept4\.so/d' /etc/ld.so.preload + fi; +} + +# vim:set ts=2 sw=2 et: