summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfxbru2020-04-07 18:05:42 +0200
committerfxbru2020-04-07 18:05:42 +0200
commit39f9cdc3245499f9a516ea89d6d75d9db1cd77d6 (patch)
treeba7b8224f87582f3f7e634398722338b7a930815
downloadaur-39f9cdc3245499f9a516ea89d6d75d9db1cd77d6.tar.gz
1.1.30-1
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD28
-rw-r--r--application-inspector-bin.install25
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..006673e7e4b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = application-inspector-bin
+ pkgdesc = Microsoft ApplicationInspector is a source code analyzer built for surfacing features of interest and other characteristics to answer the question 'what's in it' using static analysis with a json based rules engine (official CLI binary version)
+ pkgver = 1.1.30
+ pkgrel = 1
+ url = https://github.com/microsoft/ApplicationInspector
+ install = application-inspector-bin.install
+ arch = x86_64
+ license = MIT
+ depends = dotnet-runtime
+ provides = application-inspector
+ options = staticlibs
+ source = https://github.com/microsoft/ApplicationInspector/releases/download/v1.1.30/ApplicationInspector_linux_1.1.30.zip
+ sha256sums = 92D119044A91388F412112D03C41B9EA35C9BE01D08BB744387EDFAB1BD1F7A8
+
+pkgname = application-inspector-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ef9eeb4bb7a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Fran├žois-Xavier Bru <francoisxavier.bru at orange dot com>
+pkgname=application-inspector-bin
+_pkgname=application-inspector
+pkgver=1.1.30
+pkgrel=1
+pkgdesc="Microsoft ApplicationInspector is a source code analyzer built for surfacing features of interest and other characteristics to answer the question 'what's in it' using static analysis with a json based rules engine (official CLI binary version)"
+arch=('x86_64')
+url="https://github.com/microsoft/ApplicationInspector"
+license=('MIT')
+provides=('application-inspector')
+depends=(dotnet-runtime)
+options=(staticlibs)
+source=(https://github.com/microsoft/ApplicationInspector/releases/download/v${pkgver}/ApplicationInspector_linux_${pkgver}.zip)
+sha256sums=('92D119044A91388F412112D03C41B9EA35C9BE01D08BB744387EDFAB1BD1F7A8')
+install=${pkgname}.install
+
+package() {
+ _pkg=ApplicationInspector_${pkgver}
+
+ install -d "${pkgdir}/usr/bin"
+ install -d "${pkgdir}/opt/${_pkgname}"
+
+ cp -r "${srcdir}/${_pkg}/"* "${pkgdir}/opt/${_pkgname}"
+ chmod +x ${pkgdir}/opt/${_pkgname}/ApplicationInspector.CLI
+ ln -s /opt/${_pkgname}/ApplicationInspector.CLI "${pkgdir}"/usr/bin/ApplicationInspector
+ ln -s /opt/${_pkgname}/ApplicationInspector.CLI "${pkgdir}"/usr/bin/application-inspector
+}
+
diff --git a/application-inspector-bin.install b/application-inspector-bin.install
new file mode 100644
index 00000000000..9e83995534d
--- /dev/null
+++ b/application-inspector-bin.install
@@ -0,0 +1,25 @@
+post_install() {
+ groupadd applicationinspector
+ touch /opt/application-inspector/output.{html,json}
+ touch /opt/application-inspector/log.txt
+ chown -R root:applicationinspector /opt/application-inspector/output.{html,json}
+ chown -R root:applicationinspector /opt/application-inspector/log.txt
+ chmod -R g+w /opt/application-inspector/output.{html,json}
+ chmod -R g+w /opt/application-inspector/log.txt
+ echo " Users should be added to the 'applicationinspector' group to be able to generate HTML reports."
+ echo " $ sudo gpasswd -a <username> applicationinspector"
+ echo " Also set the BROWSER environment variable to your desired browser."
+}
+
+post_upgrade() {
+ touch /opt/application-inspector/output.{html,json}
+ touch /opt/application-inspector/log.txt
+ chown -R root:applicationinspector /opt/application-inspector/output.{html,json}
+ chown -R root:applicationinspector /opt/application-inspector/log.txt
+ chmod -R g+w /opt/application-inspector/output.{html,json}
+ chmod -R g+w /opt/application-inspector/log.txt
+}
+
+post_remove() {
+ groupdel applicationinspector
+}