summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/rush/PKGBUILD39
-rw-r--r--pcr/rush/rush-1.7-glib-2.16-gets.patch13
-rw-r--r--pcr/rush/rush.install22
3 files changed, 74 insertions, 0 deletions
diff --git a/pcr/rush/PKGBUILD b/pcr/rush/PKGBUILD
new file mode 100644
index 000000000..3fde49dd8
--- /dev/null
+++ b/pcr/rush/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer (Arch): Brandon Invergo <brandon@invergo.net>
+# Contributor (Arch): B3nny <benny@b3nny.net>
+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')
+noextract=()
+md5sums=('02fae838fe8f5dc5b4e3a2e4da0182b8'
+ 'dcd87b8bf9738796621030930384f97d')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < "$srcdir/rush-1.7-glib-2.16-gets.patch"
+ sed -i 's/^\( *[a-z#].*\)/#\1/g' etc/rush.rc
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make check
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+}
+
diff --git a/pcr/rush/rush-1.7-glib-2.16-gets.patch b/pcr/rush/rush-1.7-glib-2.16-gets.patch
new file mode 100644
index 000000000..434f63eb1
--- /dev/null
+++ b/pcr/rush/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/pcr/rush/rush.install b/pcr/rush/rush.install
new file mode 100644
index 000000000..1613db9ce
--- /dev/null
+++ b/pcr/rush/rush.install
@@ -0,0 +1,22 @@
+infodir=usr/share/info
+filelist=(rush.info)
+
+post_install() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+pre_remove() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in "${filelist[@]}"; do
+ install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et: