summaryrefslogtreecommitdiff
path: root/community/hardening-wrapper/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/hardening-wrapper/PKGBUILD')
-rw-r--r--community/hardening-wrapper/PKGBUILD31
1 files changed, 31 insertions, 0 deletions
diff --git a/community/hardening-wrapper/PKGBUILD b/community/hardening-wrapper/PKGBUILD
new file mode 100644
index 000000000..a05316b84
--- /dev/null
+++ b/community/hardening-wrapper/PKGBUILD
@@ -0,0 +1,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++"
+}