pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

routersploit: Avoid the post-install target and properly handle package data



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Mon Jul 30 13:18:38 2018 +0200
Changeset:	cee3144b56e3468c26b853e6f485716325e6efb3

Modified Files:
	routersploit/Makefile
Added Files:
	routersploit/files/MANIFEST.in

Log Message:
routersploit: Avoid the post-install target and properly handle package data

Instead of the post-install kludge add a MANIFEST.in that lists all the package
data that need to be installed as part of routersploit so it is completely
autoconsistent.
While here also document the ${TOUCH} __init__.py kludge.

XXX: These changes should be shared upstream!

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cee3144b56e3468c26b853e6f485716325e6efb3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 routersploit/Makefile          | 21 +++++++--------------
 routersploit/files/MANIFEST.in |  3 +++
 2 files changed, 10 insertions(+), 14 deletions(-)

diffs:
diff --git a/routersploit/Makefile b/routersploit/Makefile
index 19d37e3a7f..531958d6db 100644
--- a/routersploit/Makefile
+++ b/routersploit/Makefile
@@ -22,23 +22,16 @@ REPLACE_PYTHON+=	rsf.py
 
 PYTHON_VERSIONS_INCOMPATIBLE=	27
 
+#
+# - Add a MANIFEST.in in order to install all routersploit/resources package
+#   data files
+# - Add an (empty) __init__.py in order to correctly pick up Python code in
+#   routersploit/resources subdirectories
+#
 post-extract:
+	${CP} ${FILESDIR}/MANIFEST.in ${WRKSRC}
 	${RUN} cd ${WRKSRC} && ${TOUCH} routersploit/resources/__init__.py
 
-post-install:
-	${INSTALL_DATA_DIR} \
-	    ${DESTDIR}${PREFIX}/${PYSITELIB}/routersploit/resources/ssh_keys
-	${INSTALL_DATA} ${WRKSRC}/routersploit/resources/ssh_keys/* \
-	    ${DESTDIR}${PREFIX}/${PYSITELIB}/routersploit/resources/ssh_keys
-	${INSTALL_DATA_DIR} \
-	    ${DESTDIR}${PREFIX}/${PYSITELIB}/routersploit/resources/vendors
-	${INSTALL_DATA} ${WRKSRC}/routersploit/resources/vendors/* \
-	    ${DESTDIR}${PREFIX}/${PYSITELIB}/routersploit/resources/vendors
-	${INSTALL_DATA_DIR} \
-	    ${DESTDIR}${PREFIX}/${PYSITELIB}/routersploit/resources/wordlists
-	${INSTALL_DATA} ${WRKSRC}/routersploit/resources/wordlists/*.txt \
-	    ${DESTDIR}${PREFIX}/${PYSITELIB}/routersploit/resources/wordlists
-
 .include "../../lang/python/application.mk"
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/routersploit/files/MANIFEST.in b/routersploit/files/MANIFEST.in
new file mode 100644
index 0000000000..b07d36616c
--- /dev/null
+++ b/routersploit/files/MANIFEST.in
@@ -0,0 +1,3 @@
+recursive-include routersploit/resources/ssh_keys *.json *.key
+recursive-include routersploit/resources/vendors *.dat
+recursive-include routersploit/resources/wordlists *.txt


Home | Main Index | Thread Index | Old Index