mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] license-csv: Add rules to generate CSV license report.
@ 2018-03-29  7:29 Denis OSTERLAND
  2018-03-29  9:51 ` Michael Olbrich
  2018-03-29 12:08 ` Andreas Pretzsch
  0 siblings, 2 replies; 6+ messages in thread
From: Denis OSTERLAND @ 2018-03-29  7:29 UTC (permalink / raw)
  To: ptxdist

Generates CSV license report along with PDF license report.

Signed-off-by: Denis Osterland <Denis.Osterland@diehl.com>
---
 rules/post/ptxd_make_license_csv.make | 14 ++++++++++++++
 scripts/lib/ptxd_make_license_csv.sh  | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 rules/post/ptxd_make_license_csv.make
 create mode 100644 scripts/lib/ptxd_make_license_csv.sh

diff --git a/rules/post/ptxd_make_license_csv.make b/rules/post/ptxd_make_license_csv.make
new file mode 100644
index 0000000..d74fed8
--- /dev/null
+++ b/rules/post/ptxd_make_license_csv.make
@@ -0,0 +1,14 @@
+
+license-report: $(REPORTDIR)/license-report.csv
+
+$(foreach p,$(PTX_PACKAGES_INSTALL),$(eval $(addprefix $(STATEDIR)/,$(addsuffix .report-csv,$p)): $(addprefix $(STATEDIR)/,$(addsuffix .report,$p))))
+
+$(REPORTDIR)/license-report.csv: $(addprefix $(STATEDIR)/,$(addsuffix .report-csv,$(PTX_PACKAGES_INSTALL)))
+	@$(call targetinfo)
+	cat $(wildcard $(addprefix $(REPORTDIR)/*/,$(addsuffix /report.csv,$(sort $(PTX_PACKAGES_INSTALL))))) > $@
+
+$(STATEDIR)/%.report-csv:
+	@$(call targetinfo)
+	@$(call world/env, $(PTX_MAP_TO_PACKAGE_$(*))) ptxd_make_license_csv
+	@$(call touch)
+
diff --git a/scripts/lib/ptxd_make_license_csv.sh b/scripts/lib/ptxd_make_license_csv.sh
new file mode 100644
index 0000000..f6149f5
--- /dev/null
+++ b/scripts/lib/ptxd_make_license_csv.sh
@@ -0,0 +1,16 @@
+#! /bin/bash
+#
+# Copyright (C) 2017 by Denis Osterland <Denis.Osterland@diehl.com>
+#
+
+ptxd_make_license_csv() {
+	declare -A pkg_license_flags
+	ptxd_make_world_license_init || return
+
+	if [ "${pkg_section}" != "ignore" ]
+		then
+		echo "${pkg_label};${pkg_version};${pkg_section};${pkg_license};${pkg_url}" > ${pkg_license_dir}/report.csv
+		fi
+}
+export -f ptxd_make_license_csv 
+
-- 
2.7.4


Diehl AKO Stiftung & Co. KG, Pfannerstraße 75-83, 88239 Wangen im Allgäu
Bereichsvorstand: Dr.-Ing. Michael Siedentop (Sprecher), Josef Fellner (Mitglied)
Sitz der Gesellschaft: Wangen i.A. – Registergericht: Amtsgericht Ulm HRA 620609 – Persönlich haftende Gesellschafterin: Diehl Verwaltungs-Stiftung – Sitz: Nürnberg – Registergericht: Amtsgericht Nürnberg HRA 11756 –
Vorstand: Dr.-Ing. E.h. Thomas Diehl (†) (Vorsitzender), Herr Dipl.-Wirtsch.-Ing. Wolfgang Weggen (stellvertretender Vorsitzender), Dipl.-Kfm. Claus Günther, Dipl.-Kfm. Frank Gutzeit, Dr.-Ing. Heinrich Schunk, Dr.-Ing. Michael Siedentop , Dipl.-Kfm. Dr.-Ing. Martin Sommer, Dipl.-Ing. (FH) Rainer von Borstel, Vorsitzender des Aufsichtsrates: Dr. Klaus Maier
___________________________________________________________________________________________________
Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-29 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29  7:29 [ptxdist] [PATCH] license-csv: Add rules to generate CSV license report Denis OSTERLAND
2018-03-29  9:51 ` Michael Olbrich
2018-03-29 12:08 ` Andreas Pretzsch
2018-03-29 12:46   ` Denis OSTERLAND
2018-03-29 13:54     ` Michael Olbrich
2018-03-29 15:07     ` Andreas Pretzsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox