summaryrefslogtreecommitdiff
path: root/pcr/rush/PKGBUILD
blob: e8f92948de4e883a703c3d8bcb4ad861aef5909c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Maintainer (aur):  Chris Severance aur.severach aATt spamgourmet dott com
# Contributor: Brandon Invergo <brandon@invergo.net>
# Contributor: B3nny <benny@b3nny.net>
# Contributor: Wael Karram <wael@waelk.tech>

# parabola changes and rationale:
#  - added .install file to update icon database
#  - added patch to fix build errors with gcc7

set -u
pkgname='rush'
pkgver='2.3'
pkgrel='1'
pkgdesc='GNU Restricted User Shell'
arch=('i686' 'x86_64' 'armv7h')
url='http://puszcza.gnu.org.ua/software/rush/'
license=('GPL3')
#makedepends=('patch')
backup=('etc/rush.rc')
install='rush.install'
_verwatch=("${url}download.html" "${pkgname}-\([0-9\.]\+\)\.tar.xz" 't')
source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"
        'rush-1.7-glib-2.16-gets.patch'
        'intprops.patch')
sha256sums=('8cae258247cd2623e856ea5e2c62cd7f09e9e3e043e6fc63bbd1abec3d3fdd93'
            '159dd2fc0fd4feec5d43cf7763a429b9c2da5c50597b157de9e5b376d9ff85a8'
            'eb916fff92a4a33fff4951f1f219e8c9fb12f3a6c0dd462da30e451b26789a28')

prepare() {
  set -u
  cd "${pkgname}-${pkgver}"
  #patch -Np1 -i "$srcdir"/intprops.patch
  #if [ "$(vercmp ${pkgver} '1.8')" -lt 0 ]; then
  #  patch -p1 < "${srcdir}/rush-1.7-glib-2.16-gets.patch"
  #fi
  sed -i -e 's:^\s*[^#]:#&:g' 'etc/rush.rc'
  ./configure --prefix='/usr' --sysconfdir='/etc' --localstatedir='/var' --sbindir='/usr/bin'
  set +u
}

build() {
  set -u
  cd "${pkgname}-${pkgver}"
  local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
  make -s -j "${_nproc}"
  set +u
}

check() {
  set -u
  cd "${pkgname}-${pkgver}"
  make check
  set +u
}

package() {
  set -u
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  set +u
}
set +u