summaryrefslogtreecommitdiff
path: root/libre/parabola-hackers/PKGBUILD
blob: d55a97d730e36594e1988521060f0ac29e9d7ffb (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>

# I guese here's as good a place as any to document the release process.
#
#  1. In parabola-hackers.git, bump config.mk:VERSION.
#  2. In parabola-hackers.git, run `make dist`.
#  3. Copy the resulting parabola-hackers-$(VERSION).tar.gz to your
#     makepkg.conf:SRCDEST directory.
#  4. Bump PKGBUILD:pkgver.
#  5. Run `updpkgsums`.  This will create a GPG signature for the
#     source tarball that `make dist` created.
#  6. You know what to do from here.  `librerelease` will handle
#     uploading the source tarball that `make dist` created.
#  n. Tag the parabola-hackers.git commit cumping config.mk:VERSION
#     and push that.  I (LukeShu) usually hold off on that until right
#     before `librerelease`, in case I discover any problems during
#     the package build.

pkgbase=parabola-hackers
pkgname=(parabola-hackers parabola-hackers-nshd)
pkgver=20210824
pkgrel=1
pkgdesc='Programs for doing magic with hackers.git'
url='https://git.parabola.nu/packages/parabola-hackers.git/'
license=('GPL')
arch=('armv7h' 'i686' 'x86_64')

makedepends=('go')
source=("https://repo.parabola.nu/other/$pkgbase/$pkgbase-$pkgver.tar.gz"{,.sig})
sha256sums=('29f4b2b75185b8d689d44ec85ca8891c1cdfd50314fc3dd713b1960f7cc6085b'
            'SKIP')

prepare() {
  cd "$srcdir/$pkgbase-$pkgver"

  printf '%s\n' \
      prefix='/usr' \
      bindir='$(libexecdir)/$(PACKAGE)' \
      libexecdir='$(libdir)' \
      sysconfdir='/etc' \
      >> config.mk
}

build() {
  cd "$srcdir/$pkgbase-$pkgver"
  make
}

check() {
  cd "$srcdir/$pkgbase-$pkgver"
  make check
}

package_parabola-hackers() {
  backup=(etc/$pkgbase.yml)
  depends=('ruby' 'colordiff')

  cd "$srcdir/$pkgbase-$pkgver"
  make DESTDIR="${pkgdir}" install
  find "$pkgdir" -type f \( -name 'nshd*' -o -name shadow \) -delete
  find "$pkgdir" -type d -empty -exec rmdir -p --ignore-fail-on-non-empty -- {} +
}

package_parabola-hackers-nshd() {
  pkgdesc='NSS and PAM integration for parabola-hackers'
  license=('GPL3')
  depends=("parabola-hackers=$pkgver" 'nss-pam-ldapd')
  backup=(etc/nshd/shadow)
  install=parabola-hackers-nshd.install
  replaces=(nshd)
  conflicts=(nshd)

  cd "$srcdir/$pkgbase-$pkgver"
  make DESTDIR="${pkgdir}" install
  find "$pkgdir" -type f -not \( -name 'nshd*' -o -name shadow \) -delete
  find "$pkgdir" -type d -empty -exec rmdir -p --ignore-fail-on-non-empty -- {} +

  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  cp -t "${pkgdir}/usr/share/licenses/${pkgname}" -- LICENSE.txt LICENSE.bsd*.txt LICENSE.mit*.txt NOTICE*
}