summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 39d2943a7b25a3a5c5fd00f4df207b2c217577e4 (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: Chris Severance aur.severach aATt spamgourmet dott com
# Contributor: Gustavo Lopes <mail@geleia.net>

set -u
_pkgname=riofs
pkgname="${_pkgname}-git"
_srcdir="${pkgname}"
pkgver=v0.5.r60.gc6d8e8e
pkgrel=1
pkgdesc='FUSE userspace filesystem for Amazon AWS S3 buckets'
arch=('i686' 'x86_64')
url='https://github.com/skoobe/riofs'
license=('GPL3')
depends=('fuse' 'glib2' 'libevent' 'libxml2' 'openssl')
makedepends=('pkg-config' 'git')
source=("${_srcdir}::git+https://github.com/skoobe/riofs.git") # #commit=${pkgver##*.g}
sha256sums=('SKIP')
conflicts="${_pkgname}"
provides="${_pkgname}"

pkgver() {
  set -u
  cd "${_srcdir}"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  set +u
}

prepare() {
  set -u
  cd "${_srcdir}"
  ./autogen.sh
  ./configure --prefix='/usr' --includedir='/usr/include/riofs'
  set +u
}

build() {
  set -u
  cd "${_srcdir}"
  make -s -j $(nproc)
  set +u
}

package() {
  set -u
  cd "${_srcdir}"
  make -s DESTDIR="${pkgdir}" install
  set +u
  # Ensure there are no forbidden paths. Place at the end of package() and comment out as you find or need exceptions. (git-aurcheck)
  ! test -d "${pkgdir}/bin" || { echo "Line ${LINENO} Forbidden: /bin"; false; }
  ! test -d "${pkgdir}/sbin" || { echo "Line ${LINENO} Forbidden: /sbin"; false; }
  ! test -d "${pkgdir}/lib" || { echo "Line ${LINENO} Forbidden: /lib"; false; }
  ! test -d "${pkgdir}/share" || { echo "Line ${LINENO} Forbidden: /share"; false; }
  ! test -d "${pkgdir}/usr/sbin" || { echo "Line ${LINENO} Forbidden: /usr/sbin"; false; }
  ! test -d "${pkgdir}/usr/local" || { echo "Line ${LINENO} Forbidden: /usr/local"; false; }
  ! grep -lr "/sbin" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /sbin"; false; }
  ! grep -lr "/usr/tmp" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /usr/tmp"; false; }
  ! grep -lr "/usr/local" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /usr/local"; false; }
  ! pcre2grep -Ilr "(?<!/usr)/bin" "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /bin"; false; }
}
set +u

# vim:set ts=2 sw=2 et: