aboutsummaryrefslogtreecommitdiff
path: root/utils/checksec/Makefile
blob: e131d4dfda8334c4847c18bc97a89c9de2adb6fd (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
#
# Copyright (C) 2020 CZ.NIC z.s.p.o. (https://www.nic.cz/)
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk

PKG_NAME:=checksec.sh
PKG_VERSION:=2.5.0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/slimm609/checksec.sh/archive/$(PKG_VERSION)
PKG_HASH:=1034459d7cd2b0ee515c2b6b003375fec566fb59c838fc5e1961e1fcf76b54fa

PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
PKG_LICENSE_FILES:=LICENSE.txt

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/checksec/default
  SECTION:=utils
  CATEGORY:=Utilities
  URL:=https://github.com/slimm609/checksec.sh
endef

define Package/checksec
  $(call Package/checksec/default)
  TITLE:=Utility to check PIE, RELRO, ASLR etc.
  DEPENDS:=+bash +file +binutils +procps-ng +procps-ng-sysctl +openssl-util +coreutils +coreutils-stat
endef

define Package/checksec_automator
  $(call Package/checksec/default)
  TITLE:=Utility to use checksec for dirs
  DEPENDS:=+checksec +coreutils-tee +findutils-find +grep
endef

define Package/checksec/description
  Checksec is a bash script to check the properties
  of executables (like PIE, RELRO, PaX, Canaries, ASLR, Fortify Source).
endef

define Package/checksec_automator/description
  Script for checksec directory scan.
endef

Build/Compile:=:
Build/Install:=:

define Package/checksec/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/checksec $(1)/usr/bin/
endef

define Package/checksec_automator/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/checksec_automator.sh $(1)/usr/bin/
endef

$(eval $(call BuildPackage,checksec))
$(eval $(call BuildPackage,checksec_automator))