summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d9cc4059bd486776f10a46552d4c1ff3772ecce3 (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
# Maintainer: Klaus Alexander Seistrup <klaus@seistrup.dk>
# -*- mode: sh -*-

pkgname='timestampit'
pkgver=0.4.0
pkgrel=1
pkgdesc='Prefix each input line with a date/time stamp (formerly timestamp/stampit)'
arch=('aarch64' 'armv7h' 'i686' 'x86_64')
url='https://codeberg.org/kas/timestampit'
license=('GPL-3.0-or-later')  # SPDX-License-Identifier: GPL-3.0-or-later
depends=('glibc')
optdepends=('scdoc: for recompiling manual pages')
provides=('stampit' 'timestamp')
conflicts=('stampit' 'timestamp')
source=("$pkgname-$pkgver.tar.gz::${url}/archive/v$pkgver.tar.gz")
options=('lto')

build() {
  cd "$pkgname"

  # RFC-0023
  # 🔗 https://rfc.archlinux.page/0023-pack-relative-relocs/
  #
  # ld(1) says: “Supported for i386 and x86-64.”
  case "X${CARCH:-unknown}" in
    'Xx86_64' | 'Xi386' )
      export LDFLAGS="$LDFLAGS -Wl,-z,pack-relative-relocs"
    ;;
    * ) : pass ;;
  esac

  make -C src
}

package() {
  cd "$pkgname"

  make -C src PREFIX=/usr DESTDIR="$pkgdir" install
}

sha256sums=(
  '0fe069262785d0a3ee997561cf7bd5b837d4c42344232e5bffac0f78cacf4a9f'
)
b2sums=(
  '686acef47d08667c80271f5c9dfd1793b42560ccf1b3cf73e1bfd1214702cb05311c0a4fd0401b00b8e547f02da7520368d9a13a32749b58aab42047541da94b'
)

# eof