diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | rush-1.7-glib-2.16-gets.patch | 13 | ||||
-rw-r--r-- | rush.install | 26 |
4 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..73429f8475ed --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = rush + pkgdesc = GNU Restricted User Shell + pkgver = 1.7 + pkgrel = 3 + url = http://puszcza.gnu.org.ua/software/rush/ + install = rush.install + arch = i686 + arch = x86_64 + license = GPL3 + backup = etc/rush.rc + source = http://ftp.gnu.org/gnu/rush/rush-1.7.tar.xz + source = rush-1.7-glib-2.16-gets.patch + sha256sums = 56ce434639d69817dd667d5243c49045f46101583ca9e0983f176d8b92eca301 + sha256sums = 159dd2fc0fd4feec5d43cf7763a429b9c2da5c50597b157de9e5b376d9ff85a8 + +pkgname = rush + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5d368a24f4b5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: Brandon Invergo <brandon@invergo.net> +# Contributor: B3nny <benny@b3nny.net> + +set -u +pkgname='rush' +pkgver='1.7' +pkgrel='3' +pkgdesc='GNU Restricted User Shell' +arch=('i686' 'x86_64') +url='http://puszcza.gnu.org.ua/software/rush/' +license=('GPL3') +backup=('etc/rush.rc') +install='rush.install' +source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz" + 'rush-1.7-glib-2.16-gets.patch') +sha256sums=('56ce434639d69817dd667d5243c49045f46101583ca9e0983f176d8b92eca301' + '159dd2fc0fd4feec5d43cf7763a429b9c2da5c50597b157de9e5b376d9ff85a8') + +prepare() { + set -u + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 < "${srcdir}/rush-1.7-glib-2.16-gets.patch" + sed -i -e 's/^\( *[a-z#].*\)/#\1/g' 'etc/rush.rc' + ./configure --prefix='/usr' --sysconfdir='/etc' --localstatedir='/var' --sbindir='/usr/bin' + set +u +} + +build() { + set -u + cd "${srcdir}/${pkgname}-${pkgver}" + make -s -j "$(nproc)" + set +u +} + +check() { + set -u + cd "${srcdir}/${pkgname}-${pkgver}" + make check + set +u +} + +package() { + set -u + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + set +u +} +set +u diff --git a/rush-1.7-glib-2.16-gets.patch b/rush-1.7-glib-2.16-gets.patch new file mode 100644 index 000000000000..434f63eb13f6 --- /dev/null +++ b/rush-1.7-glib-2.16-gets.patch @@ -0,0 +1,13 @@ +--- rush-1.7/gnu/stdio.in.h 2010-06-13 19:14:59.000000000 +0200 ++++ rush-1.7/gnu/stdio.in.h 2013-12-30 14:29:55.000000000 +0100 +@@ -138,8 +138,10 @@ _GL_WARN_ON_USE (fflush, "fflush is not + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ ++#if defined gets + #undef gets + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/rush.install b/rush.install new file mode 100644 index 000000000000..00187f419324 --- /dev/null +++ b/rush.install @@ -0,0 +1,26 @@ +_infodir='usr/share/info' +_filelist=('rush.info') + +post_install() { + if [ -x 'usr/bin/install-info' ]; then + local _file + for _file in "${_filelist[@]}"; do + install-info "${_infodir}/${_file}.gz" "${_infodir}/dir" 2>/dev/null + done + fi +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + if [ -x 'usr/bin/install-info' ]; then + local _file + for _file in "${_filelist[@]}"; do + install-info --delete "${_infodir}/${_file}.gz" "${_infodir}/dir" 2>/dev/null + done + fi +} + +# vim:set ts=2 sw=2 et: |