summaryrefslogtreecommitdiff
path: root/community/hardening-wrapper/PKGBUILD
blob: a05316b8474256a9d5f45e188f318ae42c951819 (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
# Maintainer: Daniel Micay <danielmicay@gmail.com>
pkgname=hardening-wrapper
pkgver=3
pkgrel=4
pkgdesc='Wrapper script for building hardened executables by default'
arch=(i686 x86_64)
url='https://archlinux.org/'
license=('GPL')
depends=(bash)
backup=(etc/hardening-wrapper.conf)
source=(cc-wrapper.sh path.sh hardening-wrapper-i686.conf hardening-wrapper-x86_64.conf)
sha1sums=('edddffd8d8bf6c4b57d7a8fa32b65e29020c2a3c'
          '1e5f6d9931f01b26bb4b6fbb839e21d34d534cdc'
          '658aed4d1039393f0ba08152c1320fca04ce1315'
          'ff104a6624ce898010f277fe22e6f964aeb34300')

package() {
  install -Dm644 hardening-wrapper-${CARCH}.conf "$pkgdir/etc/hardening-wrapper.conf"
  install -Dm644 path.sh "$pkgdir/etc/profile.d/hardening-wrapper.sh"

  mkdir -p "$pkgdir/usr/lib/hardening-wrapper/bin"
  install -m755 cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/c89"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/c99"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/cc"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/c++"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/clang"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/clang++"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/gcc"
  ln -s ../cc-wrapper.sh "$pkgdir/usr/lib/hardening-wrapper/bin/g++"
}